> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Interface: ToolProvider

ToolProvider interface for Query() and Mutation() tool calls.
Framework-agnostic — works with MCP, REST, GraphQL, or any backend.

## Example

```ts
// Function map (Renderer normalizes this automatically)
<Renderer toolProvider={{
  get_users: (args) => fetch(`/api/users`).then(r => r.json()),
}} />

// MCP client (Renderer wraps extractToolResult automatically)
<Renderer toolProvider={mcpClient} />
```

## Methods

### callTool()

> **callTool**(`toolName`: `string`, `args`: `Record`\<`string`, `unknown`>): `Promise`\<`unknown`>

#### Parameters

| Parameter  | Type                           |
| ---------- | ------------------------------ |
| `toolName` | `string`                       |
| `args`     | `Record`\<`string`, `unknown`> |

#### Returns

`Promise`\<`unknown`>
