Skip to main content

ToolRegistry

@webda/mcp


Class: ToolRegistry

Defined in: packages/mcp/src/tools.ts:111

Registry of MCP tools built from operations

Constructors​

Constructor​

new ToolRegistry(resolve): ToolRegistry

Defined in: packages/mcp/src/tools.ts:117

Parameters​

resolve​

SchemaResolver

schema resolver used to build input/output schemas

Returns​

ToolRegistry

Properties​

entries​

protected entries: Map<string, ToolEntry>

Defined in: packages/mcp/src/tools.ts:112


resolve​

protected resolve: SchemaResolver

Defined in: packages/mcp/src/tools.ts:117

schema resolver used to build input/output schemas

Methods​

build()​

build(ops): void

Defined in: packages/mcp/src/tools.ts:123

Rebuild the registry from operations

Parameters​

ops​

Record<string, OperationDefinition>

visible operations of the transport

Returns​

void


get()​

get(name): ToolEntry

Defined in: packages/mcp/src/tools.ts:146

Find a tool by name

Parameters​

name​

string

tool name

Returns​

ToolEntry

the entry or undefined


list()​

list(): ToolEntry[]

Defined in: packages/mcp/src/tools.ts:137

All tool entries, sorted by name

Returns​

ToolEntry[]

tool entries