> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # getTool > Look up a registered SwaigFunction by name. Look up a registered `SwaigFunction` by name. ## **Parameters** **`name`** `string` — required The tool name to search for. --- ## **Returns** `SwaigFunction | undefined` -- The `SwaigFunction` instance, or `undefined` if not found or not a `SwaigFunction`. ## **Example** ```typescript {14} 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 tool = agent.getTool('get_weather'); if (tool) { console.log(tool.description); // "Get the current weather" } ``` > Look up a registered SwaigFunction by name.