Skip to main content
A tool is a function for on-demand reads, writes, or operations that combine multiple API calls. Call tools from your backend with the tool-call API, the Node SDK, or an agent session. Nango catalog tools are available without deploying code. Build your own when you need custom logic or a stable contract you control.

Create a tool

In your functions project, add a tool and import it from index.ts:
github/tools/create-issue.ts
index.ts
The tool name defaults to its file name. Read input from trigger.input. Nango validates the input against the schema before execution. meta.requiredScopes documents provider permissions with scopes.all(...), scopes.any(...), or scopes.none(); Nango does not enforce them. Tools can also read connection metadata and save checkpoints when you declare data.metadata or data.checkpoint schemas. See createTool for all options. To fail a call with a custom payload, throw new nango.Error({ ... }). The tool-call API returns it as error.payload with the function_runtime_error code.

Test and deploy

Create a test connection in the Connections tab, then dry run the tool with realistic input:
A dry run calls real provider APIs and can create or change data. See Testing and CI/CD.

Call a tool

Use a Nango Environment API key from Environment Settings > API Keys. Scoped keys need environment:tools:call.
Calls are synchronous and return the tool’s output directly. Omit input for tools that take no input, sending {} as the request body.

Expose tools to an agent

Use agent sessions to scope tools and connections to a tenant. Tools participate in toolset, allow, deny, and pinned_tools policies and can be discovered through nango_tool_search. For coding agents managing Nango, the Management MCP server exposes tools_call.