Skip to main content
Glama

generate_request_example

Create curl, axios, or fetch request code from a cached Swagger/OpenAPI operation to test or integrate an API endpoint.

Instructions

Generate curl, axios, or fetch code from one cached operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
formatNocurl
methodNo
baseUrlNoOptional API base URL. Falls back to spec server URL.
serviceYes
workspaceYesAbsolute path to the business project that owns .swagger-mcp.
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden. It implies a read-only generation step and hints at a cache dependency ('cached operation'), but does not say what happens when the operation is not cached, whether it writes files, or whether it requires a prior refresh_service call.

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, well-formed sentence with the action front-loaded and the output variants listed inline. Nothing is wasted, but there is also no second sentence to add the missing routing or prerequisite information.

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 7 parameters, no annotations, and no output schema, the description is too thin: it does not explain the shape of the returned code string, how the operation is identified (operationId vs path/method), or that a service must be cached first. An agent would have to guess at the call sequence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 29%: just baseUrl and workspace are documented in the schema, while path, method, service, and operationId are bare. The description only mirrors the format enum (curl/axios/fetch) and explains nothing about how path/method/operationId select the operation or how they interact.

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 (generate) and resource (request code) plus the three output formats, which distinguishes it from read-oriented siblings like get_operation and get_schema. It is clear but does not name which sibling it replaces or complements, nor what 'cached operation' refers to.

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?

No when-to-use guidance: nothing says to call this after list_services/refresh_service, nothing says it requires a previously cached spec, and no alternative (e.g. get_operation) is referenced. The one contextual hint is the phrase 'cached operation', which is not elaborated.

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