Skip to main content
Glama

Generate MCP server

generate_mcp_server

Generate a complete, runnable MCP server project from OpenAPI or Postman specs and write it to a chosen directory.

Instructions

Generate a complete, runnable TypeScript MCP server project from an OpenAPI or Postman spec. Writes the project to outputDir. Use force to overwrite a non-empty directory.

Input Schema

NameRequiredDescriptionDefault
authNoAuth to use when the spec declares no security schemes of its own. Applied only to operations whose own security list is empty; credentials are read from env vars as usual.
specNoInline spec text (OpenAPI or Postman; JSON or YAML).
forceNoOverwrite a non-empty / existing project.
formatNoForce a format; defaults to auto-detect.
methodsNoKeep only these HTTP methods, e.g. [GET, POST].
languageNoOutput language. Defaults to typescript.
pathGlobNoKeep only matching paths, e.g. "/v1/**".
specPathNoPath to a local spec file (JSON or YAML).
outputDirYesDirectory to write the generated project into.
transportNoTransport(s) to generate (TypeScript only). Defaults to stdio.
serverNameNonpm/package name; defaults from the API title.
includeTagsNoKeep only operations with these tags.
toolCatalogNoAlso write tool-catalog.json (name/summary/tags per tool) for discovery layers.
pythonVariantNoPython server flavor (requires language: python): the low-level MCP SDK (default) or FastMCP. Both serve the same raw JSON-Schema tool inputs.
serverVersionNo
excludeOperationsNoDrop operations by operationId, tool name, or tag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose two useful behavioral facts: the tool writes files to outputDir and will refuse/require force for a non-empty directory, which signals destructiveness. But it omits permissions, network access, whether generation is deterministic, and what is actually produced.

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?

Three tight, front-loaded sentences with no filler; the core action comes first and the force caveat last. It is efficient, though arguably undersized for a 16-parameter generator, and the 'TypeScript' framing wastes a few words on an inaccuracy.

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 complex 16-parameter generator with no output schema, the description is thin: it never says what artifacts land in outputDir or how spec/specPath/methods/pathGlob interact with a spec that has no security schemes. Low parameter count relative to schema richness is not the issue here; the missing behavioral context is.

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 94% across 16 parameters, so the schema already documents nearly everything and the baseline is 3. The description reinforces only outputDir and force and adds no meaning for the higher-leverage options (spec vs specPath, auth, transport, language, pythonVariant).

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 gives a specific verb+resource ('Generate a complete, runnable ... MCP server project') plus the accepted input formats (OpenAPI or Postman), which is enough to separate it from siblings like extend_mcp_server and analyze_spec. However, it hardcodes 'TypeScript' even though the schema supports language: python, so the stated scope contradicts the tool's actual capability.

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?

The only usage rule given is 'Use force to overwrite a non-empty directory,' which is really a parameter hint rather than when-to-use guidance. Nothing tells the agent when to pick this over analyze_spec (inspect first) or extend_mcp_server (modify an existing project), leaving the sibling routing to inference.

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