Tool registry
Tools register in src/tools/index.ts via registry.register().
import { registry } from './registry.js';
registry.register({
name: 'my-tool',
description: 'What the tool does',
parameters: {
type: 'object',
properties: {
query: { type: 'string', description: 'Search query' },
},
required: ['query'],
},
async execute(params) {
return { ok: true };
},
});
Execution path
- LLM returns a tool call
agents/tool-runner.tsvalidates params and Scout policy- Tool
execute()runs; result is fed back to the model
Tests
Colocate my-tool.test.ts beside the implementation. Run pnpm test from core.carinaai.uk/.