Skip to content

MCP Server Router

The MCP Server Router Snap routes input documents based on the request method (sl_method). It also enriches tool call requests with necessary metadata before sending them downstream.

MCP Server Router screenshot

Snap views

View Description Examples of upstream and downstream Snaps
Input This Snap supports exactly one document input view.
Output This Snap supports exactly two document output views.
  • The first output view outputs the input document when the request method is tools/list.
  • The second output view outputs the request object when the request method is tools/call. If a tools list is provided in the input document, the Snap adds the corresponding tool metadata to the request object.
Error Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing on eof the following options from the When errors occur list under the Views tab. The available options are:
  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.
Learn more about Error handling in Pipelines.

Snap settings

Legend:

  • Expression icon(Expression Toggle): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamicall (if enabled). If disabled, you can provide a static value. Learn more.
  • SnapGPT (SnapGPT Icon): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (Suggest Icon): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload (Upload Icon): Uploads files. Learn more.
Field / Field set Type Description
Label String Required. Specify a unique name for the Snap. Modify this to be more appropriate, esepcially if more than one of the same Snaps is in the pipeline.
Default value: MCP Server Router
Example: Firecrawl MCP Server Router
Request String/Expression The request object generated from the MCP Server Adapter to the MCP Server Pipeline. It must include the sl_method field, which defines the request method.
Supported request methods are tools/list and tools/call.
Default value: $
Example: $original