Skip to content

API Reference


API Reference / AgentToolRegistry

Class: AgentToolRegistry

Defined in: src/agent/ToolRegistry.ts:35

Registry and dispatcher for the tools exposed to MCP clients and agents.

Holds the catalogue and enforces Policy on every call — a write tool is checked against the live-trading gate as well as its scope. Handlers themselves contain no permission logic, so there is exactly one place where an agent call can be refused.

Constructors

Constructor

new AgentToolRegistry(options): AgentToolRegistry

Defined in: src/agent/ToolRegistry.ts:40

Parameters

options

ToolRegistryOptions

Returns

AgentToolRegistry

Methods

list()

list(): ToolDescriptor[]

Defined in: src/agent/ToolRegistry.ts:60

Returns

ToolDescriptor[]


names()

names(): string[]

Defined in: src/agent/ToolRegistry.ts:64

Returns

string[]


find()

find(name): Tool

Defined in: src/agent/ToolRegistry.ts:68

Parameters

name

string

Returns

Tool


execute()

execute(name, args?): Promise<unknown>

Defined in: src/agent/ToolRegistry.ts:82

Checks policy, then dispatches to the tool's handler.

Parameters

name

string

args?

Record<string, unknown> = {}

Returns

Promise<unknown>


availableTools()

availableTools(): ToolDescriptor[]

Defined in: src/agent/ToolRegistry.ts:98

Tools this policy may call right now, write gate included.

Returns

ToolDescriptor[]


capabilities()

capabilities(): Capabilities

Defined in: src/agent/ToolRegistry.ts:111

Capability manifest for an agent runtime.

Returns

Capabilities


getPolicy()

getPolicy(): Policy

Defined in: src/agent/ToolRegistry.ts:124

Returns

Policy


getSkills()

getSkills(): SkillRegistry

Defined in: src/agent/ToolRegistry.ts:128

Returns

SkillRegistry

Community project — not affiliated with Dhan. MIT License.