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

# Tools (tai42_contract.tools)

> Tool registration types and the app tools namespace.

Tools contract: the `ToolInfo` model + the `AppTools` tool/toolkit
registration sub-protocol. Vendor return types (fastmcp `Tool`, langchain
`StructuredTool`) are `TYPE_CHECKING`-only.

`AppTools` is the `app.tools` namespace of the assembled facade
(`tai42_contract.app`).

## AppTools

`tai42_contract.tools.AppTools`

```python theme={null}
class AppTools(Protocol)
```

Tool + toolkit registration / lookup surface.

### Members

#### tool\_title

`tai42_contract.tools.AppTools.tool_title`

```python theme={null}
tool_title(self, func: Callable[..., object]) -> str
```

**Parameters**

| Parameter | Type                    | Default | Description |
| --------- | ----------------------- | ------- | ----------- |
| `func`    | `Callable[..., object]` | —       | —           |

#### get\_tool

`tai42_contract.tools.AppTools.get_tool`

```python theme={null}
async get_tool(self, key: str) -> Tool
```

**Parameters**

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `key`     | `str` | —       | —           |

#### get\_tools

`tai42_contract.tools.AppTools.get_tools`

```python theme={null}
async get_tools(self) -> dict[str, Tool]
```

#### get\_client\_tools

`tai42_contract.tools.AppTools.get_client_tools`

```python theme={null}
async get_client_tools(self, names: list[str] | None = None) -> list[StructuredTool]
```

**Parameters**

| Parameter | Type                | Default | Description |
| --------- | ------------------- | ------- | ----------- |
| `names`   | `list[str] \| None` | `None`  | —           |

#### run\_tool

`tai42_contract.tools.AppTools.run_tool`

```python theme={null}
async run_tool(self, key: str, arguments: dict[str, Any], *, offload_sync: bool = False) -> Any
```

**Parameters**

| Parameter      | Type             | Default | Description |
| -------------- | ---------------- | ------- | ----------- |
| `key`          | `str`            | —       | —           |
| `arguments`    | `dict[str, Any]` | —       | —           |
| `offload_sync` | `bool`           | `False` | —           |

#### remove\_tool

`tai42_contract.tools.AppTools.remove_tool`

```python theme={null}
remove_tool(self, name: str) -> None
```

**Parameters**

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `name`    | `str` | —       | —           |

#### register\_tool\_info

`tai42_contract.tools.AppTools.register_tool_info`

```python theme={null}
register_tool_info(self, name: str, combos: Sequence[Sequence[ExtensionElement]] | None = None) -> None
```

**Parameters**

| Parameter | Type                                           | Default | Description |
| --------- | ---------------------------------------------- | ------- | ----------- |
| `name`    | `str`                                          | —       | —           |
| `combos`  | `Sequence[Sequence[ExtensionElement]] \| None` | `None`  | —           |

#### unregister\_tool\_info

`tai42_contract.tools.AppTools.unregister_tool_info`

```python theme={null}
unregister_tool_info(self, name: str) -> None
```

**Parameters**

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `name`    | `str` | —       | —           |

#### unregister\_tool\_base

`tai42_contract.tools.AppTools.unregister_tool_base`

```python theme={null}
unregister_tool_base(self, tool_name: str) -> list[str]
```

**Parameters**

| Parameter   | Type  | Default | Description |
| ----------- | ----- | ------- | ----------- |
| `tool_name` | `str` | —       | —           |

## ToolInfo

`tai42_contract.tools.ToolInfo`

```python theme={null}
class ToolInfo(BaseModel)
```

Descriptor for a registered tool.

`name` is the registered key; `base` is the underlying tool it was
bound from (a branch tool names itself, e.g. `name_chain`).

**Attributes**

| Attribute     | Type  |
| ------------- | ----- |
| `name`        | `str` |
| `base`        | `str` |
| `title`       | `str` |
| `description` | `str` |
