TL
API & MCPDokumentasyon

Platform ng Agent at API ng Road User Tools

I-convert ang presyon ng gulong

Mag-convert sa pagitan ng pounds bawat square inch, bar, at kilopascals.

Mga interface

POST
REST endpoint/api/v1/pressure/convert
MCP
Pangalan ng toolconvert_pressure

Kahilingan

Ipadala ang kahilingan bilang JSON. Ang mga kliyente ng MCP ay pumasa sa parehong mga field bilang mga argumento ng tool.

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"
}'
Humiling ng katawanjson
{
  "value": 32,
  "from": "psi",
  "to": "bar"
}

Tugon

Binabalot ng REST ang resulta ng pagkalkula sa karaniwang sobre ng tagumpay. Ibinabalik ng MCP ang parehong data ng pagkalkula bilang output ng structured tool.

JSON
{
  "ok": true,
  "data": {
    "input": {
      "value": 32,
      "from": "psi",
      "to": "bar"
    },
    "conversions": {
      "psi": 32,
      "bar": 2.2063223338137603,
      "kpa": 220.632233381376
    },
    "result": 2.2063223338137603
  }
}

Mga scheme

Ang mga kahulugan sa ibaba ay nagpapakita ng kumpletong JSON Schema na ginamit upang patunayan ang mga input at ilarawan ang mga output.

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"
  ]
}
API at MCP dokumentasyon