GmailToolset class

Google Gmail API toolset wrapper.

Inheritance

Constructors

GmailToolset({String? clientId, String? clientSecret, Object? toolFilter, ServiceAccountAuth? serviceAccount, String? toolNamePrefix, Map<String, Object?>? discoverySpec, Map<String, Object?>? openApiSpec, GoogleDiscoverySpecFetcher? specFetcher, GoogleApiRequestExecutor? requestExecutor})
Creates a Gmail toolset.

Properties

additionalHeaders → Map<String, String>
Extra headers added to outgoing HTTP requests.
finalinherited
additionalScopes → List<String>?
Optional list of additional OAuth scopes to request.
finalinherited
apiName → String
Google API short name used by the Discovery API.
finalinherited
apiVersion → String
Google API version string used by the Discovery API.
finalinherited
clientId ↔ String?
OAuth client id used for interactive auth flows.
getter/setter pairinherited
clientSecret ↔ String?
OAuth client secret used for interactive auth flows.
getter/setter pairinherited
discoverySpec → Map<String, Object?>?
Optional preloaded Discovery specification.
finalinherited
discoveryUrl → String?
Optional custom Discovery URL to use for the API.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
openApiSpec → Map<String, Object?>?
Optional preloaded OpenAPI specification.
finalinherited
requestExecutor → GoogleApiRequestExecutor?
Optional custom request executor for generated tools.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serviceAccount ↔ ServiceAccountAuth?
Optional service-account auth override.
getter/setter pairinherited
specFetcher → GoogleDiscoverySpecFetcher?
Optional custom Discovery specification fetcher.
finalinherited
toolFilter ↔ Object?
Tool filter expressed as a ToolPredicate or a list of tool names.
getter/setter pairinherited
toolNamePrefix ↔ String?
Optional prefix added by getToolsWithPrefix.
getter/setter pairinherited
useInvocationCache → bool
Whether tools are listed once per invocation and reused for the rest of it.
no setterinherited

Methods

close() → Future<void>
Releases resources held by this toolset.
inherited
configureAuth(String clientId, String clientSecret) → void
Configures OAuth client credentials for generated tools.
inherited
configureSaAuth(ServiceAccountAuth serviceAccount) → void
Configures service-account auth for generated tools.
inherited
getAuthConfig() → AuthConfig?
Returns auth config for this toolset, if tool listing/calls require auth.
inherited
getTools({ReadonlyContext? readonlyContext}) → Future<List<BaseTool>>
Returns tools available for the current readonlyContext.
inherited
getToolsWithPrefix({ReadonlyContext? readonlyContext}) → Future<List<BaseTool>>
Returns getTools with an optional toolNamePrefix applied.
inherited
isToolSelected(BaseTool tool, ReadonlyContext? readonlyContext) → bool
Returns whether tool should be visible in readonlyContext.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processLlmRequest({required ToolContext toolContext, required LlmRequest llmRequest}) → Future<void>
Mutates outgoing llmRequest before model execution.
inherited
setToolFilter(Object filter) → void
Replaces the tool filter used to select generated tools.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited