Tools
Tools in DummyMCP are defined in the UI. They are defined as a name, description, input schema as well as your mock response.
The input schema for tools is defined as JSON. To learn how to define your input schema, see the Tool Definition Structure section of the MCP specification and have a look at the Example Tool Patterns section.
See the example below for an input schema for a get_weather
tool.
{
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and country e.g. Bogotá, Colombia"
}
},
"required": [
"location"
],
"additionalProperties": false
}
Tool Responses
Resources in DummyMCP are defined intuitively through the UI.
Response Templating
Use Liquid templating to create dynamic responses that incorporate the arguments passed to your tool. Access arguments using {{arguments.parameter_name}}
syntax.
Complete Example
Here's an example of a dynamic tool response that uses faker tags to return a fake JSON user profile:
{
"id": "{% faker 'internet.uuid' %}",
"first_name": "{% faker 'name.first_name' %}",
"last_name": "{% faker 'name.last_name' %}",
"email": "{% faker 'internet.email' %}"
}
See the Liquid Templating section for more information.
Resources
Resources in DummyMCP are defined intuitively through the UI.
Resource Templates
Resource templates are a way to create dynamic resources. To do so, select the 'This resource is a Template?' checkbox on the new resource form. Enter the URI in the 'URI Template' field using URI variables, e.g.
https://somedomain.com/{file_name}.txt
Dynamic Resource Content
Resource content fully supports Liquid templating. This is particularly useful for Resource Templates. You can access the URI and URI variables using {{uri}}
and {{uri_variables.variable_name}}
syntax.
See the section on Liquid Templating for more information.
Prompts
Prompts in DummyMCP are defined intuitively through the UI.
Dynamic Prompt Messages
The content of prompt messages fully supports Liquid templating. You can access the arguments passed to the prompt using {{arguments.parameter_name}}
syntax. This is particularly useful when you want to change the prompt message based on the arguments passed to the prompt.
See the section on Liquid Templating for more information.
Liquid Templating
DummyMCP supports Liquid templating for both tool responses and resource content. This is particularly useful when you want your mock data to be dynamic and realistic.
Conditional logic, Loops and more
Shopify Liquid is a powerful templating language that supports conditional logic, loops and many more features.
See the Liquid documentation for more information.
Fake Data Generation
DummyMCP includes unofficial Liquid tags for generating realistic fake data in your responses. Use these tags to create dynamic mock data:
Liquid Tag | Description | Example Output |
---|---|---|
{% faker "internet.uuid" %} |
Generate a random UUID | 8fd16d67-5cd3-448c-b498-8c35ac67b9cd |
{% faker "number.number" %} |
Generate a random number | 42 |
{% faker "name.first_name" %} |
Generate a random first name | John |
{% faker "name.last_name" %} |
Generate a random last name | Smith |
{% faker "company.name" %} |
Generate a random company name | Dach, Fadel and Hegmann |
{% faker "company.industry" %} |
Generate a random industry | Media Production |
{% faker "company.type" %} |
Generate a random company type | Privately Held |
{% faker "company.buzzword" %} |
Generate a random business buzzword | parrallelism |
{% faker "company.bs" %} |
Generate random business speak | cultivate holistic systems |
{% faker "company.logo" %} |
Generate a random logo URL | https://pigment.github.io/fake-logos/logos/medium/color/1.png |
{% faker "internet.email" %} |
Generate a random email address | [email protected] |
{% faker "phone_number" %} |
Generate a random phone number | (555) 123-4567 |
{% faker "address.city" %} |
Generate a random city name | West Graciemouth |
{% faker "address.state" %} |
Generate a random state | Arizona |
{% faker "address.zip" %} |
Generate a random ZIP code | 75621-7339 |
{% faker "address.country" %} |
Generate a random country | United States |
{% faker "address.street_address" %} |
Generate a random street address | 7320 Olson Way |
{% faker "address.secondary_address" %} |
Generate a random secondary address | Apt. 964 |
There are some contexts in which DummyMCP injects additional variables into the Liquid context that can be referenced:
Liquid | Available in | Description |
---|---|---|
{{arguments.argument_name}} |
Tool mock responses | Reference the arguments that a tool was called with. |
{{uri}} |
Resource Content | Reference the URI that was requested to retrieve the Resrouce. |
{{uri_variables.variable_name}} |
Resource Content | Reference the URI variables that were used to retrieve the Resource. |
{{arguments.argument_name}} |
Prompt mock messages | Reference the arguments provided to the prompt. |