Skip to main content
Glama

downloadSwaggerJson

Download Swagger/OpenAPI JSON to a local file with optional username/password authentication and custom headers, so you can retrieve and store protected API schemas.

Instructions

下载 Swagger/OpenAPI JSON 文档到本地文件,支持用户名密码认证

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>"
    },
    "name": "downloadSwaggerJson"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesSwagger/OpenAPI 文档的 URL 地址
headersNo额外的请求头(可选)
timeoutNo请求超时时间(毫秒,默认 30000)
passwordNo用于认证的密码(可选)
savePathNo保存文件的路径(可选,不提供则自动生成文件名)
usernameNo用于认证的用户名(可选)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the agent knows this performs a networked, side-effecting operation. The description usefully adds that username/password authentication is supported, but it does not state overwrite behavior, whether authentication is basic auth or another scheme, what is returned after download, or failure modes for unreachable URLs.

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

Conciseness4/5

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

A single front-loaded sentence with no filler; the action, target format, destination, and auth capability all appear immediately. It is terse rather than padded, though for a six-parameter tool with a nested headers object it is arguably too terse.

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

Completeness3/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 should indicate what the call returns (for example the resolved file path) and whether existing files are overwritten; neither is covered. It adequately conveys what the tool does and that auth is supported, but leaves an agent unable to predict the result of the call.

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 six parameters (url, headers, timeout, username, password, savePath) are already documented in the schema. The description adds only that username and password are jointly used for authentication, which is mildly useful, but it says nothing about headers or how savePath interacts with the auto-generated filename beyond what the schema already states.

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 states a specific verb+resource pair: download a Swagger/OpenAPI JSON document, and adds the destination (local file) plus auth capability. That is enough for an agent to distinguish it from parseApiEndpoint/parseSchema, which presumably parse rather than fetch-and-save, though no sibling is named explicitly.

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?

There is no explicit when-to-use or when-not guidance, and no alternative tool is named. The only implicit signal is that this is the fetch-and-persist step versus a parsing step, which the agent must infer.

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