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

import { AgentBase } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.defineTool({
name: 'get_weather',
description: 'Get the current weather',
parameters: {
type: 'object',
properties: { city: { type: 'string' } },
},
handler: async (args) => ({ response: `Weather in ${args.city}: sunny` }),
});
const tools = agent.getRegisteredTools();
console.log(tools);
// [{ name: 'get_weather', description: 'Get the current weather', parameters: { ... } }]