tools/<name>/tool.ts. The file exports a JSON Schema input schema and a handler. dari deploy reads the module locally and uploads a manifest entry plus generated schema metadata for the tool; it does not inline the schema into dari.yml.
tools/repo_search/tool.ts becomes repo_search. Keep helper modules next to it:
dari deploy treats tools/repo_search/tool.ts as the repo_search tool and includes the sibling helper files in the uploaded bundle. The only optional export is outputSchema.
Code-first TypeScript tools are compiled locally by the Dari CLI during deploy. Your machine or CI runner needs either tsx or a Node.js version that supports --experimental-strip-types.
For Python tools, use a tool directory with a tool.yml that points to the schema file and handler: