Create an MCP Tool Workflow v2
Publish a narrow Workflow as an MCP tool by defining a typed argument schema, performing one business action, and returning structured content.
Build the tool contract
- Create a Workflow.
- Add the MCP receive Method to the Workflow.
- Set a concise, unique
ToolNamethat describes an action. - Define the input fields under the receive Step's
Argumentsobject. Use clear names, types, shapes, and descriptions. - Add the domain Steps that validate and perform the operation.
- Add the MCP respond Method at the Workflow root.
- Map the result to
StructuredContentand setIsErrorappropriately.
Use exactly one matched receive/respond pair. Keep the respond Step at the root even when domain logic uses If, TryCatch, or another container.
Workflow returns are unused on an MCP tool. The tool result is provided through the StructuredContent return on the respond Step. Adjust the descendant schema for this return as required.
Test the tool
- Run the Workflow in Debug with representative Arguments.
- Inspect the captured MCP response in Logs.
- Test validation, not-found, authorization, provider failure, and success paths.
- Confirm that error paths set
IsError: trueand still return useful structured content. - Save the tested revision.
Publish and authorize
- Publish or promote the Workflow to the target Environment.
- Enable it in that Environment.
- Create a
Delegate MCP userAPI Key for the same Environment. - Assign the Workflow and permitted users.
- Copy the Environment's
/mcpURL from the MCP screen and register it in the client. - Confirm tool discovery and make a controlled call.
Tool discovery is the intersection of publish, status, API-key Workflow assignment, permitted user, and effective user access. Do not troubleshoot these as interchangeable states.
See also
See Workflow MCP Server, MCP Screen, and Agent-ready Business Action.