Create MCP Server Tool
POST/api/mcp-servers/tools
Adds a tool to an existing MCP server, usually a narrower variant of a tool it already has.
Pass from_tool to copy an existing tool's call (action, mapping, input schema, annotations, scopes and risk) under a new slug, name and description, and put the restriction in conditions. The gateway enforces conditions on every call, while an input schema pattern is only a hint to the AI client.
Not available on a derived server, which serves its source's tools, or on a proxied server that syncs its tools from upstream, which would remove the new tool.
On a published server the edit waits in its draft until it is published, unless publish is true.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
Tool created
Invalid tool, invalid JSONata, or a server that can't take new tools
Authentication required or invalid token
The token is valid but its scopes do not permit this operation. Every endpoint enforces the scopes described in API Tokens, so any of them can return this.
MCP server or from_tool not found
A tool with this slug already exists