Skip to main content
Glama

parseApiEndpoint

Read-only

Parses a single Swagger/OpenAPI endpoint by URL, path, and method to generate a JSON Schema-based Chinese prompt for documenting that API.

Instructions

解析 Swagger/OpenAPI 文档中的单个接口,生成 JSON Schema 格式的中文提示词

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>",
      "path": "<path>",
      "method": "<method>"
    },
    "name": "parseApiEndpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesSwagger/OpenAPI 文档的 URL 地址
pathYesAPI 接口路径(如:/pet/{petId})
methodYesHTTP 方法(小写)
headersNo可选的请求头(如需要认证时)
timeoutNo请求超时时间(毫秒,默认 30000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint and openWorldHint annotations already tell the agent this is a non-mutating operation that reaches out over the network, and the description is consistent with that. The description adds useful information about the output form (a Chinese prompt in JSON Schema format), but it does not mention network fetch failures, authentication requirements, or timeout behavior, which matter for a URL-based tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no redundant wording, and the core action and output are stated immediately. Nothing in it could be trimmed without losing substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Since there is no output schema, the description must carry the return-value information, and it does identify the output as a Chinese prompt in JSON Schema format, which is more than most tools at this level provide. It remains somewhat vague about the exact response structure and error behavior, but given 100% parameter coverage and clear annotations, that gap is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters (url, path, method, headers, timeout) are already documented in the schema, including the enum for method and the additionalProperties for headers. The description adds no syntax or format detail beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource — parsing a single endpoint of a Swagger/OpenAPI document — and adds the output form (a Chinese prompt in JSON Schema format). It does not explicitly distinguish itself from the sibling parseSchema, so an agent must infer whether 'single endpoint' versus whole-document parsing is the dividing line.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: '单个接口' (single endpoint) suggests this tool is for one endpoint rather than a whole document, which hints at the boundary with parseSchema, but there is no explicit statement of when to use this versus the alternatives or any prerequisites. Sibling downloadSwaggerJson suggests a two-step flow that is never described.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools