Skip to main content
Glama

按路径查询 Swagger 接口

get_api_by_path
Read-onlyIdempotent

Retrieve complete API documentation by exact path and optional HTTP method. Returns recursive schema tree and flat fields for structured understanding.

Instructions

按精确路径和可选 HTTP Method 实时查询完整接口文档,返回递归 schemaTree 和 flatFields。回答用户时必须明确保留 sourceNotice。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesSwagger paths 中的精确接口路径
groupNo多分组文档的精确分组名;只有一个分组时可省略
methodNoHTTP Method;同一路径有多个方法时必须提供
docsUrlYes本次要查询的 doc.html 或 Swagger JSON 完整地址
Behavior4/5

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

Annotations already indicate read-only, idempotent, non-destructive, and open-world hints. The description adds real-time query behavior and return structure (schemaTree, flatFields), plus a disclosure requirement. No contradiction.

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?

Two sentences, no waste. Purpose and key details (real-time, schemaTree, flatFields, sourceNotice) are front-loaded.

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?

With no output schema, the description covers return type (schemaTree, flatFields) and a behavioral rule. Given the tool's simplicity and annotations covering safety, it is sufficiently complete.

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 covers all 4 parameters with descriptions (100% coverage). The description restates 'path' and 'method' but adds usage nuance (e.g., method optional if single, group optional if single group). This provides marginal extra value beyond the schema.

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

Purpose5/5

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

The description clearly states the tool's function: querying complete API documentation in real-time by exact path and optional HTTP method. It distinguishes from siblings by focusing on path-based lookup, whereas siblings like list_api_categories or search_apis serve different purposes.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives (e.g., search_apis for fuzzy matching, inspect_api_docs for browsing). The description only mentions a presentation rule (retain sourceNotice) but not selection criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qipeijun/swagger-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server