Overview
Methods
getTools()
Get all tools (local + adopted).| Parameter | Type | Default | Description |
|---|---|---|---|
includeHidden | boolean | false | Include hidden tools in results |
getToolsForListing()
Get tools appropriate for MCP listing with elicitation support filtering.| Parameter | Type | Default | Description |
|---|---|---|---|
supportsElicitation | boolean | false | Whether client supports elicitation |
findByName()
Find a tool by its base name.findByQualifiedName()
Find a tool by its fully qualified name.getExported()
Lookup a tool by its exported (resolved) name.exportResolvedNames()
Produce unique, conflict-aware exported names for all tools.getInlineTools()
Get tools defined inline in this registry (local only, not adopted).listAllInstances()
List all tool instances (locals + adopted).listByOwner()
List tools by owner path.registerToolInstance()
Register a pre-constructed ToolInstance directly.This is typically used internally for agent-scoped or remote tools.
subscribe()
Subscribe to tool change events.getCapabilities()
Get MCP capabilities for tools.hasAny()
Check if any tools exist in the registry.adoptFromChild()
Adopt tools from a child registry.References are shared (not cloned). Changes in the child registry automatically propagate to the parent.
Change Events
The registry emits events when tools are added, updated, or removed:Indexes
The registry maintains O(1) lookup indexes:| Index | Key | Description |
|---|---|---|
byQualifiedId | qualifiedId | Unique identifier lookup |
byName | name | Base name lookup (may return multiple) |
byOwnerAndName | owner:name | Scoped name lookup |
byProviderAndName | provider:name | Provider-scoped lookup |
byOwner | ownerPath | All tools by owner |