> This page is for Server SDKs.

> 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.

# getTools

> Get the SwaigFunction instances registered on the agent.

[swaig-function]: /docs/server-sdks/reference/typescript/agents/swaig-function

[get-registered-tools]: /docs/server-sdks/reference/typescript/agents/agent-base/get-registered-tools

Get every [`SwaigFunction`][swaig-function] registered on the agent. Runs the agent's
`defineTools()` hook first if it hasn't run yet, so tools a subclass defines there are included.
Only `SwaigFunction` instances are returned: functions registered as raw SWAIG definitions, such
as DataMap tools, are left out. For summaries of every registered tool, use
[`getRegisteredTools()`][get-registered-tools].

## Returns

`SwaigFunction[]` -- The registered tools.

## Example

```typescript {13}
import { AgentBase, FunctionResult } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'dispatch', route: '/dispatch' });
agent.setPromptText('You are Ada, the dispatcher for Bayview Taxi.');

agent.defineTool({
  name: 'get_eta',
  description: 'Get the pickup ETA for a booking',
  parameters: { type: 'object', properties: { booking_id: { type: 'string' } } },
  handler: () => new FunctionResult('The driver is 8 minutes away.'),
});

for (const tool of agent.getTools()) {
  console.log(tool.name);
}
```