Files
agent-fox/docs/mcp-tools/get-endpoint-detail.md
2026-04-12 20:15:41 +08:00

2.6 KiB
Raw Permalink Blame History

get_endpoint_detail

获取端点的完整详细信息,包括参数、请求体和响应格式。

参数

参数 类型 必填 说明
endpointId string 端点 ID可从 list_endpointssearch_endpoints 获取

返回结果

{
  "id": "ep_001",
  "method": "POST",
  "path": "/v1/charges",
  "summary": "Create a charge",
  "description": "Creates a new charge object. If the charge fails, the API returns an error.",
  "operationId": "createCharge",
  "moduleName": "Payments",
  "parameters": [
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": { "type": "string" },
      "description": "Unique key for idempotent requests"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": ["amount", "currency"],
          "properties": {
            "amount": { "type": "integer", "description": "Amount in cents" },
            "currency": { "type": "string", "description": "Three-letter ISO currency code" },
            "source": { "type": "string", "description": "Payment source token" }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Charge created successfully",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "amount": { "type": "integer" },
              "status": { "type": "string" }
            }
          }
        }
      }
    }
  },
  "deprecated": false
}

返回字段说明

字段 类型 说明
id string 端点 ID
method string HTTP 方法
path string API 路径
summary string 端点摘要
description string 端点详细描述
operationId string 操作标识符
moduleName string 所属模块名称
parameters array URL/查询/头部/Cookie 参数列表(原始 OpenAPI schema
requestBody object 请求体规范
responses object HTTP 响应规范(按状态码分组)
deprecated boolean 是否已弃用

Token 消耗

500-2,000 tokens,取决于参数数量和响应 schema 的复杂程度。这是 token 消耗最多的工具,但也是信息最丰富的。

使用场景

  • 需要了解如何调用某个具体端点
  • 查看请求参数的类型、是否必填、描述
  • 查看响应格式以便解析返回数据