Skip to main content
Glama

docs_generate_swagger_ui

Turn an OpenAPI specification into an interactive Swagger UI HTML page for visualizing and testing API endpoints.

Instructions

Generate a Swagger UI HTML page from an OpenAPI specification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
themeNoSwagger UI theme (e.g., 'default', 'dark')
api_keyNoAPI key for authentication
openapi_specYesOpenAPI specification in JSON or YAML format
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states only the core action, but does not reveal whether the page is returned as a string, written to disk, or where it goes; it also does not explain the role of api_key or whether the operation has side effects. This leaves an agent guessing about the tool's actual behavior.

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?

A single, well-formed sentence that front-loads the action and resource. It contains no filler, repeated information, or unnecessary words, making it immediately scannable for an agent.

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?

For a simple tool with one required parameter and strong schema coverage, the description is minimally adequate. However, with no output schema and no annotations, it should clarify what the tool returns or produces (e.g., an HTML string vs. a file) and whether api_key is required for certain specs. These gaps keep it from being fully self-sufficient.

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?

The input schema already provides meaningful descriptions for all three parameters, including format examples for theme and the JSON/YAML format for openapi_spec. The tool description adds no additional parameter semantics beyond what the schema already covers, so the baseline of 3 applies.

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 specific action ('Generate'), the resource ('Swagger UI HTML page'), and the input ('from an OpenAPI specification'). This distinguishes it from sibling tools like docs_generate_openapi (which generates the spec itself) and swagger_setup (which likely configures Swagger rather than producing a renderable page).

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?

The description implies a use case — you have an OpenAPI spec and want a Swagger UI HTML page — but it offers no explicit guidance on when to choose this tool over alternatives such as swagger_setup or docs_generate_openapi. There are no exclusions, prerequisites, or context clues beyond the basic action.

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/barnburner121/claude-plugin-marketplace'

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