# CallTool

<!-- https://uncage.vercel.app/docs/api/core/type-aliases/calltool/ -->

```ts
type CallTool = (tool, args, ctx) => Promise<ToolCallResult>;
```

Defined in: core/src/runs.ts:41

Routes a site tool call made during a run (connected mode: to the hub, then the site). `signal`
aborts when the run is cancelled or shut down; the pending call should then be abandoned (core
has already rejected it to the adapter).

## Parameters

| Parameter | Type |
| ------ | ------ |
| `tool` | `string` |
| `args` | `unknown` |
| `ctx` | \{ `runId`: `string`; `sessionId`: `string`; `signal`: `AbortSignal`; \} |
| `ctx.runId` | `string` |
| `ctx.sessionId` | `string` |
| `ctx.signal` | `AbortSignal` |

## Returns

`Promise`\<`ToolCallResult`\>
