Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 443 Bytes

add-new-tool.md

File metadata and controls

9 lines (8 loc) · 443 Bytes

How to add a tool ?

  1. Look at ./src/tools/readFile.ts for an example
  2. Create a new file ./src/tools/<camelCaseToolName>.ts
  3. Write and export an interface for your tool args
    • Create the input validation schema using zod
    • Create the type infering it from the schema
    • Export the tool as default export, complying with the Tool interface from ./src/tool.utils.ts
    • Make sure the tool name matches the file's name