getRegisteredTools

View as MarkdownOpen in Claude

Get a summary of all registered tools with their names, descriptions, and parameter schemas. Useful for debugging or building admin interfaces.

Parameters

None.

Returns

{ name: string; description: string; parameters: Record<string, unknown> }[] — Array of tool descriptors.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
4agent.defineTool({
5 name: 'get_weather',
6 description: 'Get the current weather',
7 parameters: {
8 type: 'object',
9 properties: { city: { type: 'string' } },
10 },
11 handler: async (args) => ({ response: `Weather in ${args.city}: sunny` }),
12});
13
14const tools = agent.getRegisteredTools();
15console.log(tools);
16// [{ name: 'get_weather', description: 'Get the current weather', parameters: { ... } }]