Skip to main content
Glama
eyaushev

Swagger Testcase MCP

generate_mock_data

Generate realistic mock data for API endpoints using Swagger/OpenAPI specifications to populate Postman collections, test cases, and documentation.

Instructions

Generate realistic mock/sample data from an endpoint's request or response schema. Useful for populating Postman, tests, or documentation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSwagger/OpenAPI spec source: URL (https://...) or local file path (/path/to/spec.json, ./spec.yaml)
pathYesEndpoint path, e.g. /api/orders
methodYesHTTP method
targetYesGenerate data for "request" body or "response" body
response_codeNoResponse status code (default: first 2xx). Only used when target="response"
countNoNumber of mock objects to generate (default: 1)
formatNoOutput format (default: json)
localeNoLocale for generated names/addresses (default: en)
use_examplesNoPrefer example values from spec (default: true)
auth_headerNoAuthorization header value, e.g. "Bearer eyJ..." or "Basic dXNlcjpwYXNz"
headersNoAdditional HTTP headers as key-value pairs, e.g. {"X-API-Key": "abc123"}
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. While it mentions the tool is 'useful for populating Postman, tests, or documentation,' it lacks critical behavioral details: it doesn't specify if this makes actual API calls, whether it requires network access, what the output looks like (e.g., JSON structure), or any performance/rate limit considerations. The description is too high-level for a tool with 11 parameters and no output schema.

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?

The description is appropriately concise and front-loaded. The first sentence clearly states the core purpose, and the second sentence adds practical context without redundancy. Every sentence earns its place, and there's no wasted verbiage.

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?

Given the tool's complexity (11 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain what the tool returns (e.g., sample data format, error handling), behavioral aspects like whether it performs network operations, or prerequisites like needing a valid OpenAPI spec. For a data generation tool with many inputs and unknown outputs, more context is needed.

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%, meaning all parameters are documented in the schema. The description adds no parameter-specific information beyond what's in the schema. It mentions generating data 'from an endpoint's request or response schema,' which aligns with the 'source', 'path', 'method', and 'target' parameters but doesn't provide additional semantics. Baseline score of 3 is appropriate since the schema does the heavy lifting.

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 clearly states the tool's purpose: 'Generate realistic mock/sample data from an endpoint's request or response schema.' It specifies the verb ('generate'), resource ('mock/sample data'), and source ('from an endpoint's request or response schema'). However, it doesn't explicitly differentiate from sibling tools like 'generate_test_cases' or 'export_test_cases', which may have overlapping purposes in testing contexts.

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 description provides implied usage context: 'Useful for populating Postman, tests, or documentation.' This gives some guidance on when to use the tool, but it doesn't explicitly state when not to use it or mention alternatives. For example, it doesn't clarify if this should be used instead of 'generate_test_cases' for mock data generation versus test case creation.

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/eyaushev/swagger-testcase-mcp'

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