.ts file in app/tools/ is auto-discovered and registered as a tool on both A2A and MCP endpoints.
Exports
| Export | Type | Required | Description |
|---|---|---|---|
default | tool() | Yes | The tool instance |
accepts | Accepts | No | Payment config — gates the tool on MCP /mcp |
Conventions
- Auto-discovered — All
.tsfiles inapp/tools/are registered automatically - Ignored files — Files starting with
_(e.g.,_helpers.ts) are skipped - Naming — The tool is registered with the filename as its name (e.g.,
weather.ts→weather)