Extend a catalog tool
Usenango pull to fetch tools from the catalog into your Nango functions project.
For example, to fetch GitHub’s get-repository tool:
index.ts. From there you can edit it by following the steps in create a custom tool.
Nango updates catalog tools automatically, which can change what they accept or return. For backend calls, use nango pull --catalog and deploy the copy as a custom tool. You can deploy it as-is. Your integration uses the version you deployed, and you decide when to update it.
Create a custom tool
First, set up a Nango functions project. This example defines a tool that creates a GitHub issue.github/tools/create-issue.ts
index.ts:
index.ts
- The tool name defaults to its filename without the extension. In this example, the name is
create-issue. - Read the tool’s arguments from
input. Nango validates them against your input schema before running the tool. - Use
meta.requiredScopesto describe the provider permissions the tool needs. Usescopes.all(...),scopes.any(...), orscopes.none(). The field is informational and not enforced by Nango. - Use
meta.tagsto annotate the tool with labels such as its category or operation type (read, write, potentially destructive, etc.).- Nango catalog tools use
read_only_hint,destructive_hint, andidempotent_hintto indicate whether a tool is read-only, can make destructive changes, or can be repeated with the same effect.
- Nango catalog tools use
createTool SDK reference for all options.
To fail a tool call, throw new nango.Error(...) inside exec. Nango returns your error message to the caller. In an agent session, the agent receives the message, so explain what went wrong and what it can do next.