Skip to content

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.

  1. Read src/tools/base-tool.ts and a small existing tool with similar dependencies.
  2. Add the implementation under src/tools/<name>/.
  3. Define stable action names, descriptions, JSON-compatible parameter schemas, and the least permissive sensible default.
  4. Ensure discovery can import the module; avoid side effects during discovery.
  5. Add tests for validation, permission behavior, successful execution, and meaningful failure paths.
  6. Update generated catalog or capability documentation using repository scripts rather than copying a count into prose.

Run the focused tests, then:

Terminal window
npm run typecheck
npm run lint
npm test
npm run catalog:check

Do 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.