Road User Tools Agent & API Platform
Convert tyre pressure
Convert between pounds per square inch, bar, and kilopascals.
Interfaces
POST
REST endpoint
/api/v1/pressure/convertMCP
Tool name
convert_pressureRequest
Send the request as JSON. MCP clients pass the same fields as tool arguments.
cURLshell
curl -X POST https://roaduser.tools/api/v1/pressure/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"value": 32,
"from": "psi",
"to": "bar"
}'Request bodyjson
{
"value": 32,
"from": "psi",
"to": "bar"
}Response
REST wraps the calculation result in the standard success envelope. MCP returns the same calculation data as structured tool output.
JSON
{
"ok": true,
"data": {
"input": {
"value": 32,
"from": "psi",
"to": "bar"
},
"conversions": {
"psi": 32,
"bar": 2.2063223338137603,
"kpa": 220.632233381376
},
"result": 2.2063223338137603
}
}{
"ok": false,
"error": {
"code": "invalid_request",
"message": "Invalid request input."
}
}Schemas
The definitions below show the complete JSON Schema used to validate inputs and describe outputs.
Input schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "number",
"description": "Pressure value to convert. Must be finite and non-negative."
},
"from": {
"type": "string",
"enum": [
"psi",
"bar",
"kpa"
],
"description": "Input pressure unit."
},
"to": {
"type": "string",
"enum": [
"psi",
"bar",
"kpa"
],
"description": "Optional target unit. When omitted, all units are returned."
}
},
"required": [
"value",
"from"
]
}Output schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "number"
},
"from": {
"type": "string",
"enum": [
"psi",
"bar",
"kpa"
]
},
"to": {
"type": "string",
"enum": [
"psi",
"bar",
"kpa"
]
}
},
"required": [
"value",
"from"
]
},
"conversions": {
"type": "object",
"additionalProperties": false,
"properties": {
"psi": {
"type": "number"
},
"bar": {
"type": "number"
},
"kpa": {
"type": "number"
}
},
"required": [
"psi",
"bar",
"kpa"
]
},
"result": {
"type": "number",
"description": "Target-unit result when a target unit is supplied."
}
},
"required": [
"input",
"conversions"
]
}