> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Module: tools

> Reference for the bijection/tools entry point.

## Type Aliases

### QueryContractReference

Ƭ **QueryContractReference**\<`Args`, `Result`>: `Readonly`\<\{ `[contractType]`: \{ `kind`: `"query"` ; `args`: `Args` ; `result`: `Result`  }  }>

A query selected from `_generated/contracts`. Its schema is bound to the
admitted program; authority is checked on every execution.

#### Type parameters

| Name | Type |
| :- | :- |
| `Args` | `any` |
| `Result` | `any` |

***

### OperationContractReference

Ƭ **OperationContractReference**\<`Args`, `Result`>: `Readonly`\<\{ `[contractType]`: \{ `kind`: `"operation"` ; `args`: `Args` ; `result`: `Result`  }  }>

A business operation selected from `_generated/contracts`.

#### Type parameters

| Name | Type |
| :- | :- |
| `Args` | `any` |
| `Result` | `any` |

***

### ToolDeclaration

Ƭ **ToolDeclaration**: `Readonly`\<\{ `kind`: `"query"` | `"operation"` | `"status"` ; `path`: `string` ; `reference`: [`QueryContractReference`](/api/modules/tools#querycontractreference) | [`OperationContractReference`](/api/modules/tools#operationcontractreference) ; `description`: `string` ; `bind?`: `string`  }>

One selected callable from `_generated/contracts`.

***

### ToolOptions

Ƭ **ToolOptions**\<`Args`>: `Object`

The required string or ID argument supplied by the session.

#### Type parameters

| Name | Type |
| :- | :- |
| `Args` | `any` |

#### Type declaration

| Name | Type |
| :- | :- |
| `bind?` | \{ \[Key in keyof Args]-?: Args\[Key] extends string ? Key : never }\[keyof `Args`] & `string` |

***

### Toolset

Ƭ **Toolset**: `Readonly`\<`Record`\<`string`, [`ToolDeclaration`](/api/modules/tools#tooldeclaration)>>

A named set of callable definitions.

## Variables

### tool

• `Const` **tool**: `Object`

Select a generated callable and the description the model reads. Validators
and paths come from the admitted program, with no definition imports.

#### Type declaration

| Name | Type |
| :- | :- |
| `query` | \<Args, Result>(`reference`: `Readonly`\<\{ `[contractType]`: \{ `kind`: `"query"` ; `args`: `Args` ; `result`: `Result`  }  }>, `description`: `string`, `options?`: [`ToolOptions`](/api/modules/tools#tooloptions)\<`Args`>) => `Readonly`\<\{ `kind`: `"query"` \| `"operation"` \| `"status"` ; `path`: `string` ; `reference`: [`QueryContractReference`](/api/modules/tools#querycontractreference) \| [`OperationContractReference`](/api/modules/tools#operationcontractreference) ; `description`: `string` ; `bind?`: `string`  }> |
| `operation` | \<Args, Result>(`reference`: `Readonly`\<\{ `[contractType]`: \{ `kind`: `"operation"` ; `args`: `Args` ; `result`: `Result`  }  }>, `description`: `string`, `options?`: [`ToolOptions`](/api/modules/tools#tooloptions)\<`Args`>) => `Readonly`\<\{ `kind`: `"query"` \| `"operation"` \| `"status"` ; `path`: `string` ; `reference`: [`QueryContractReference`](/api/modules/tools#querycontractreference) \| [`OperationContractReference`](/api/modules/tools#operationcontractreference) ; `description`: `string` ; `bind?`: `string`  }> |
| `status` | \<Args, Result>(`reference`: `Readonly`\<\{ `[contractType]`: \{ `kind`: `"operation"` ; `args`: `Args` ; `result`: `Result`  }  }>, `description`: `string`) => `Readonly`\<\{ `kind`: `"query"` \| `"operation"` \| `"status"` ; `path`: `string` ; `reference`: [`QueryContractReference`](/api/modules/tools#querycontractreference) \| [`OperationContractReference`](/api/modules/tools#operationcontractreference) ; `description`: `string` ; `bind?`: `string`  }> |

## Functions

### defineToolset

▸ **defineToolset**(`tools`): [`Toolset`](/api/modules/tools#toolset)

Validate and freeze one reusable set of tools. Session policies supply
authority and binding; sharing tools grants neither.

#### Parameters

| Name | Type |
| :- | :- |
| `tools` | `Record`\<`string`, `Readonly`\<\{ `kind`: `"query"` \| `"operation"` \| `"status"` ; `path`: `string` ; `reference`: `Readonly`\<\{ `[contractType]`: \{ `kind`: `"query"` ; `args`: `any` ; `result`: `any`  }  }> \| `Readonly`\<\{ `[contractType]`: \{ `kind`: `"operation"` ; `args`: `any` ; `result`: `any`  }  }> ; `description`: `string` ; `bind?`: `string`  }>> |

#### Returns

[`Toolset`](/api/modules/tools#toolset)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.