LoadMcpResourceTool class

Tool that injects MCP resource contents into pending LLM requests.

Inheritance

Constructors

LoadMcpResourceTool(McpToolset _mcpToolset)
Creates a resource-loader tool bound to one McpToolset.

Properties

customMetadata Map<String, dynamic>?
Arbitrary metadata attached to this tool declaration.
getter/setter pairinherited
description String
Human-readable purpose text shown to the model.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isLongRunning bool
Whether the tool can outlive a single response turn.
getter/setter pairinherited
name String
Unique tool name used in function-calling payloads.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getDeclaration() FunctionDeclaration?
Declares resource-name arguments for model function-calling.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processLlmRequest({required ToolContext toolContext, required LlmRequest llmRequest}) Future<void>
Appends available/requested MCP resources to llmRequest.
override
run({required Map<String, dynamic> args, required ToolContext toolContext}) Future<Object?>
Returns the requested resource names and load-status metadata.
override
toString() String
A string representation of this object.
inherited

Operators

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