ToolRegistry class

Cache layer for tool definitions Provides metadata extraction and full schema lookup LLM-agnostic: can be used without mcp_llm

Constructors

ToolRegistry()

Properties

count → int
Get tool count
no setter
hashCode → int
The hash code for this object.
no setterinherited
isInitialized → bool
Check if registry is initialized
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toolNames → List<String>
Get all tool names
no setter

Methods

cacheFromMaps(List<Map<String, dynamic>> tools) → void
Cache tools from Map list (McpClientManager.getTools() result)
cacheFromTools(List<Tool> tools) → void
Cache tools from Tool list (Client.listTools() result)
getAllMetadata() → List<ToolMetadata>
Get all metadata (lightweight, for LLM context)
getMetadata(String toolName) → ToolMetadata?
Get metadata for specific tool
getSchema(String toolName) → Map<String, dynamic>?
Get full tool schema as Map (for execution/validation)
hasTool(String toolName) → bool
Check if tool exists
invalidateAll() → void
Clear cache (call on tools/list_changed notification)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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