All operations (tools, prompts, resources) now go into a single operations
array. The type is determined by the x-zuplo-route.mcp.type field on each
operation.
Step 2: Update Operation Extensions
Tools
Old Syntax:
Code
{ "paths": { "/users": { "get": { "operationId": "list-users", "summary": "List all users", "x-zuplo-route": { "handler": { "export": "urlForwardHandler", "module": "$import(@zuplo/runtime)" } }, "x-zuplo-mcp-tool": { "name": "get_all_users", "description": "Use this tool to retrieve a list of all registered users" } } } }}
New Syntax:
Code
{ "paths": { "/users": { "get": { "operationId": "list-users", "summary": "List all users", "x-zuplo-route": { "handler": { "export": "urlForwardHandler", "module": "$import(@zuplo/runtime)" }, "mcp": { "type": "tool", "name": "get_all_users", "description": "Use this tool to retrieve a list of all registered users" } } } } }}
When enabled: false, the operation is skipped during registration without
needing to remove it from the configuration.
Improved Validation
The new format includes OpenAPI schema validation via oneOf constraints,
providing better IDE support and error messages.
Quick Migration Checklist
Replace files, tools, prompts, resources arrays with single
operations array
Change path to file and operationIds to individual { file, id }
objects
Move x-zuplo-mcp-tool into x-zuplo-route.mcp with type: "tool"
Move x-zuplo-mcp-prompt into x-zuplo-route.mcp with type: "prompt"
Move x-zuplo-mcp-resource into x-zuplo-route.mcp with
type: "resource"
Move x-zuplo-mcp-graphql into x-zuplo-route.mcp with type: "graphql"
Update GraphQL field names: introspectionToolName →
introspectionTool.name, executeToolName → executeTool.name
Test your MCP server to ensure all operations are registered correctly
Backward Compatibility
The old syntax is currently marked as deprecated but still functional. However,
it will be removed in a future release, so migration is recommended as soon as
possible.