TL
API & MCPDokumentasyon

Platform ng Agent at API ng Road User Tools

I-convert ang metalikang kuwintas

I-convert sa pagitan ng newton meters at pound-feet.

Mga interface

POST
REST endpoint/api/v1/torque/convert
MCP
Pangalan ng toolconvert_torque

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/torque/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "value": 400,
  "from": "nm",
  "to": "lbft"
}'
Humiling ng katawanjson
{
  "value": 400,
  "from": "nm",
  "to": "lbft"
}

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": 400,
      "from": "nm",
      "to": "lbft"
    },
    "conversions": {
      "nm": 400,
      "lbft": 295.0248597109062
    },
    "result": 295.0248597109062
  }
}

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": "Torque value to convert. Must be finite and non-negative."
    },
    "from": {
      "type": "string",
      "enum": [
        "nm",
        "lbft"
      ],
      "description": "Input torque unit."
    },
    "to": {
      "type": "string",
      "enum": [
        "nm",
        "lbft"
      ],
      "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": [
            "nm",
            "lbft"
          ]
        },
        "to": {
          "type": "string",
          "enum": [
            "nm",
            "lbft"
          ]
        }
      },
      "required": [
        "value",
        "from"
      ]
    },
    "conversions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "nm": {
          "type": "number"
        },
        "lbft": {
          "type": "number"
        }
      },
      "required": [
        "nm",
        "lbft"
      ]
    },
    "result": {
      "type": "number",
      "description": "Target-unit result when a target unit is supplied."
    }
  },
  "required": [
    "input",
    "conversions"
  ]
}
API at MCP dokumentasyon