Skip to main content
Glama

generate_openapi_spec

Generate OpenAPI 3.0 specification from service definition

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": {
      "service": "<service>",
      "resources": "<resources>"
    },
    "name": "generate_openapi_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsNoResource fields as name:type (string, text, integer, number, decimal, boolean, uuid, date, json, email, char(N), enum(a,b,c)). A list applies to every resource; an object maps resource → list, e.g. {"orders": ["customer_id:uuid", "total_cents:integer"]}
namingNoJSON property naming for every property, including id timestamps (default snake_case)
licenseNoinfo.license, e.g. {"name": "Apache-2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0"} (default MIT with its url)
serviceYesService name
versionNoAPI version, e.g. 1.0.0 or v2 (default: 1.0.0)
withAuthNoRequire Bearer JWT auth (default: true)
resourcesYesResource names, singular or plural (e.g. order, customers, line-items)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • changedInput schema / properties / fields / description
      Previous value: -"Resource fields as name:type (string, text, integer, number, decimal, boolean, uuid, date, json). A list applies to every resource; an object maps resource → list, e.g. {\"orders\": [\"customer_id:uuid\", \"total_cents:integer\"]}"New value: +"Resource fields as name:type (string, text, integer, number, decimal, boolean, uuid, date, json, email, char(N), enum(a,b,c)). A list applies to every resource; an object maps resource → list, e.g. {\"orders\": [\"customer_id:uuid\", \"total_cents:integer\"]}"
    • addedInput schema / properties / license
      Added value: +{
      +  "description": "info.license, e.g. {\"name\": \"Apache-2.0\", \"url\": \"https://www.apache.org/licenses/LICENSE-2.0\"} (default MIT with its url)",
      +  "type": "object"
      +}
    • addedInput schema / properties / naming
      Added value: +{
      +  "description": "JSON property naming for every property, including id timestamps (default snake_case)",
      +  "enum": [
      +    "snake_case",
      +    "camelCase"
      +  ],
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Resource fields as name:type (string, text, integer, number, decimal, boolean, uuid, date, json). A list applies to every resource; an object maps resource → list, e.g. {\"orders\": [\"customer_id:uuid\", \"total_cents:integer\"]}"
      +}
  5. Changed4 schema fields changed
    • addedInput schema / properties / resources / description
      Added value: +"Resource names, singular or plural (e.g. order, customers, line-items)"
    • addedInput schema / properties / service / description
      Added value: +"Service name"
    • addedInput schema / properties / version / description
      Added value: +"API version, e.g. 1.0.0 or v2 (default: 1.0.0)"
    • addedInput schema / properties / withAuth / description
      Added value: +"Require Bearer JWT auth (default: true)"
  6. First observed

TDQS

C2.9/5.0
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 disclosure burden, yet it says nothing about whether the spec is returned inline, written to a file, or only validated; whether generation is deterministic; or what withAuth=true implies for the produced document. For a code-generating tool with seven parameters and no annotation coverage, this is a substantial gap.

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. It is efficient, though its brevity is closer to under-specification than to disciplined concision.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With seven parameters, nested objects, and no output schema, the definition should describe the shape of the generated spec (returned text vs. file path) and any side effects. Without annotations or an output schema, none of that is covered.

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%, with detailed field type syntax, naming enum, license default, and version examples already in the schema. The description adds nothing beyond 'from service definition', so baseline 3 applies.

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?

States a specific verb and artifact: 'Generate OpenAPI 3.0 specification from service definition.' Naming 'OpenAPI 3.0' implicitly separates it from generate_asyncapi_spec, but the description never explicitly contrasts the two, so an agent must infer the routing.

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 mention of the asyncapi sibling as the alternative for event-driven APIs, and no prerequisites or constraints (e.g. whether resources must already exist). The agent is left to infer applicability from the tool name alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.