Skip to main content
Glama

docs_generate_openapi

Generate an OpenAPI 3.x specification directly from source code, routes, or endpoint definitions. Simplifies documenting APIs by converting existing code into a structured spec.

Instructions

Generate an OpenAPI 3.x specification from source code, routes, or endpoint definitions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoAPI title for the spec
api_keyNoAPI key for authentication
versionNoAPI version string
source_codeYesSource code or route definitions to generate OpenAPI spec from
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 reveals nothing about side effects, what the tool returns, whether it requires network access or external services (the api_key parameter hints at this but is unexplained), or the supported input formats/languages. The description only restates the operation.

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 efficient sentence with zero fluff; the verb and result are front-loaded. It is appropriately compact, though the terseness leaves behavioral and usage gaps that belong to other dimensions.

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?

The core function is stated and params are fully documented in the schema, so the tool is callable. However, with no annotations and no output schema, the description should have covered output behavior, authentication context, and when to prefer this over the closely related OpenAPI/doc siblings. It is minimally viable but not 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 description coverage is 100%, so the schema already documents all four parameters and the baseline of 3 applies. The description adds marginal value by elaborating that source_code can be 'routes or endpoint definitions' and pinning the spec version to 3.x, but it does not explain the role of api_key or defaults for title/version.

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 and resource ('Generate an OpenAPI 3.x specification') and clarifies the input forms (source code, routes, endpoint definitions). It is clear and distinguishable from siblings like docs_validate_spec and openapi_generate_client by its role, though it never explicitly names an alternative to differentiate against.

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 when-to-use guidance, no prerequisites, and no exclusions. With a large set of closely related siblings (docs_generate_swagger_ui, docs_validate_spec, openapi_generate_client/server, grpcgw_add_swagger), an agent gets no help deciding which tool fits the task.

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