-
-
Notifications
You must be signed in to change notification settings - Fork 52
Custom Tools
Naveen Raj edited this page Apr 11, 2026
·
1 revision
Turn any automation workflow or Python logic into an agent tool — without writing an MCP server.
Convert any n8n workflow into an agent tool via webhook.
Steps:
- Build a workflow in n8n (or any webhook-compatible automation tool)
- Copy the webhook URL
- In Synapse, open Settings → Custom Tools
- Click Add Tool and fill in:
-
Name — what the agent calls this tool (e.g.,
send_slack_message) - Description — what the tool does (the agent reads this to decide when to use it)
- Webhook URL — your n8n webhook endpoint
- Input Schema — JSON schema for the parameters the agent should pass
-
Name — what the agent calls this tool (e.g.,
- Save — the agent now has this tool
The agent sees the name, description, and schema, and calls it like any other tool. n8n handles the actual logic and its 400+ node library.
Example: Slack notifier tool
{
"name": "send_slack_message",
"description": "Sends a message to a Slack channel",
"url": "https://your-n8n.com/webhook/slack-notify",
"schema": {
"channel": { "type": "string", "description": "Slack channel name" },
"message": { "type": "string", "description": "Message content" }
}
}Write a Python function and expose it as an agent tool.
Steps:
- Open Settings → Custom Tools
- Click Python Tool tab
- Write your function in the editor — the function signature defines the tool's inputs
- Add a docstring — this becomes the tool's description for the agent
- Save — the tool is immediately available
Example: Price lookup tool
def get_stock_price(ticker: str) -> dict:
"""
Fetches the current stock price for a given ticker symbol.
Returns price, volume, and change percentage.
"""
import requests
response = requests.get(f"https://api.example.com/quote/{ticker}")
return response.json()The Python Tool Editor supports:
- Full Python 3 syntax
- Access to the vault (read/write files)
- Standard library + common packages
- Real-time syntax checking
| Use Case | Recommended |
|---|---|
| Multi-step workflows with existing n8n automations | n8n webhook |
| Integrating with internal APIs you've already automated | n8n webhook |
| Simple Python logic (calculations, data transformation) | Python script |
| Calling external APIs with custom auth | Python script |
| Complex workflows with 400+ n8n nodes | n8n webhook |
| Prototyping a new tool quickly | Python script |
- Descriptions are critical — the agent decides when to use a tool based on its description. Be specific and accurate.
- Input schemas — define only the parameters the agent needs to provide; handle defaults and secrets server-side
- Return structured data — return dicts/JSON rather than plain text so agents can extract specific fields
- Test the webhook before wiring it to an agent — use a REST client to verify inputs and outputs
- MCP Servers — connect full MCP server implementations
- Built-in Tools — tools that ship with Synapse out of the box