convert_units
Pack: mathjs · Endpoint: https://gateway.pipeworx.io/mathjs/mcp
Convert between units: length, weight, temperature, volume, time, etc. Returns converted value. E.g., “5 m to ft”, “100 kg to lbs”, “32 degF to degC”. Use for unit conversions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value | number | yes | Numeric value to convert (e.g., 5) |
from | string | yes | Source unit (e.g., “inches”, “kg”, “celsius”, “mph”) |
to | string | yes | Target unit (e.g., “cm”, “lbs”, “fahrenheit”, “km/h”) |
Example call
Arguments
{
"value": 5,
"from": "m",
"to": "ft"
}
curl
curl -X POST https://gateway.pipeworx.io/mathjs/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"convert_units","arguments":{"value":5,"from":"m","to":"ft"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('convert_units', {
"value": 5,
"from": "m",
"to": "ft"
});
More examples
{
"value": 100,
"from": "kg",
"to": "lbs"
}
Response shape
Always returns: input, output, to
| Field | Type | Description |
|---|---|---|
input | string | The input value with source unit |
output | string | The converted value with target unit |
to | string | The target unit |
Full JSON Schema
{
"type": "object",
"properties": {
"input": {
"type": "string",
"description": "The input value with source unit"
},
"output": {
"type": "string",
"description": "The converted value with target unit"
},
"to": {
"type": "string",
"description": "The target unit"
}
},
"required": [
"input",
"output",
"to"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"mathjs": {
"url": "https://gateway.pipeworx.io/mathjs/mcp"
}
}
}
See Getting Started for client-specific install steps.