Who is impacted
Migrate existing action functions used for on-demand reads, writes, or operations that combine multiple API calls.What is changing
Tools replace actions for on-demand operations. They support typed input and output, connection metadata, checkpoints, authenticated provider requests, and logging. Tools also let you describe how agents should use them and attach custom tags.Check compatibility before migrating
Tools do not support asynchronous calls or completion webhooks. If your action relies on these features, contact us before migrating.Migrate callers first
The tool-call API and Node SDKcallTool can call existing deployed actions and catalog tools. You can migrate synchronous callers before changing the implementation.
Replace:
POST /action/trigger with POST /connections/<CONNECTION-ID>/tools/create-issue/calls. Move the action name into the URL and send { "input": ... } as the body. Both APIs return the operation’s output directly.
Use a Nango Environment API key from Environment Settings > API Keys as Authorization: Bearer <NANGO-API-KEY>. Scoped keys need environment:tools:call, which replaces environment:actions:execute. Existing keys with the old scope keep working.
Migrate the implementation
- Replace
createActionwithcreateTool, imported fromnango. - Keep the input and output schemas and the externally visible name.
- Change
exec: async (nango, input)toexec: async (nango, trigger)and read the input fromtrigger.input. - Remove action-only configuration such as
versionandendpoint. Move ametadataschema todata.metadata. Move descriptive provider scopes fromscopestometa.requiredScopes, for examplescopes.all('repo'); they remain indicative, not enforced. Usemeta.instructionsfor agent guidance. - Replace
nango.ActionErrorwithnango.Error. The payload is returned aserror.payloadwith thefunction_runtime_errorcode. - Import the tool from
index.ts, dry run it with realistic input and--validate, then deploy. See Tools for a complete example.
Example: Create a GitHub issue
This function reads the repository from connection metadata and creates an issue using the caller’s title and body. The diff shows how to convert it from an action to a tool:github/actions/create-issue.ts to github/tools/create-issue.ts and update its import in index.ts: