Adding Tools
Built-in tools live under src/tools/. Each implementation extends BaseTool, returns a manifest from getManifest(), and registers executable actions. Parameter schemas and declared permissions are part of the tool contract.
Workflow
Section titled “Workflow”- Read
src/tools/base-tool.tsand a small existing tool with similar dependencies. - Add the implementation under
src/tools/<name>/. - Define stable action names, descriptions, JSON-compatible parameter schemas, and the least permissive sensible default.
- Ensure discovery can import the module; avoid side effects during discovery.
- Add tests for validation, permission behavior, successful execution, and meaningful failure paths.
- Update generated catalog or capability documentation using repository scripts rather than copying a count into prose.
Run the focused tests, then:
npm run typechecknpm run lintnpm testnpm run catalog:checkDo not call the executor directly to bypass permission checks. An ASK action requires an attended approval path; background or unattended work must block rather than assume consent.