Basic tool arguments
Basic tool arguments
Follow this guide to configure MCP Tools with RapidMCP
Tool arguments
Here are a few explicit examples of how to use the tool arguments. Check out the Quick Setup guide for a more detailed example to create a tool spec.
String
Tool Arguments:
(Put this part in the tool arguments section)
{
"message": "any test string"
}Template value:
(Put this part in the tool trigger section)
{
"message": "{{properties.message}}"
}Result:
This the templated result
{
"message": "Hello, world!"
}Number
Tool Arguments:
(Put this part in the tool arguments section)
{
"age": 25
}Template value:
(Put this part in the tool trigger section)
{
"person_age": "{{properties.age}}"
}Result:
This the templated result
{
"person_age": 25
}Object
Tool Arguments:
(Put this part in the tool arguments section)
Note that it's an object with any nested depth. The model will attempt to fill the values of this shape.
{
"name": "John Doe",
"meta": {
"age": 25,
"contact": {
"email": "[email protected]",
}
}
}Template value:
(Put this part in the tool trigger section)
{
"name": "{{properties.name}}",
"email": "{{properties.meta.contact.email}}",
"data": "{{properties.meta}}"
}TIP: We are reference the tool arguments object and using dot notation to access the property we want.
TIP: We can also reference the entire object at the top level
Result:
This the templated result.
{
"name": "John Doe",
"email": "[email protected]",
"data": {
"name": "John Doe",
"meta": {
"age": 25,
"contact": {
"email": "[email protected]",
}
}
}
}TIP: Notice how the entire object is referenced in the 'data' property and the object is directly templated.
Array
Tool Arguments:
(Put this part in the tool arguments section)
Note that it's an array of objects with any nested depth. The model will attempt to fill the values of this shape.
{
"array": [{
"key": "france",
}]
}Template value:
(Put this part in the tool trigger section)
{
"countries": "{{properties.array}}",
}TIP: We are reference the tool arguments array and using dot notation to access the property we want.
Result:
This the templated result.
{
"countries": [{
"key": "france",
}],
}TIP: Notice how the entire array is referenced in the 'countries' property and the array is directly templated.
Advanced examples
If you need fine grained control over the tool arguments, you can use the Advanced Examples page for more advanced examples.