Skip to main content
Glama

import_mocks

Import mock definitions from OpenAPI, Postman, HAR, WireMock, cURL, or mockd formats. Supports inline content or file paths with format auto-detection and dry-run preview.

Instructions

Import mocks from inline content or a file on the mockd server's filesystem. Supports OpenAPI, Postman, HAR, WireMock, cURL, and mockd YAML/JSON formats. Format is auto-detected if not specified. Use dryRun=true to preview without applying. Use the file parameter for large specs that are too large for inline content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoMock definition content (YAML, JSON, OpenAPI spec, Postman collection, HAR, WireMock, or cURL)
dryRunNoParse and validate without applying. Returns a summary of what would be imported.
fileNoPath to a file on the mockd server's filesystem to import. Use this for large specs (OpenAPI, Postman, etc.) that are too large for inline content. Mutually exclusive with content.
formatNoFormat hint for parsingauto
replaceNoReplace all existing mocks (true) or merge with existing (false)
Behavior3/5

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

With no annotations, the description must cover behavioral traits. It mentions dryRun preview and replace parameter, but does not fully disclose default behavior (e.g., merging by default), authentication needs, or side effects. Partial but not comprehensive.

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?

Four sentences efficiently convey purpose, supported formats, usage tips, and parameter hints. No unnecessary content, well-structured.

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

Completeness4/5

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

Given no output schema, the description covers key aspects: input methods, formats, dryRun, and replace. It lacks details on return values or error handling but is fairly complete for an import tool.

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

Parameters5/5

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

Schema coverage is 100% and the description adds value beyond schema by explaining format auto-detection, dryRun for preview, and file for large specs. All parameters are well-addressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Import mocks from inline content or a file on the mockd server's filesystem' and lists supported formats. It distinguishes from sibling tools like export_mocks and manage_mock by focusing on import functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use dryRun and file parameters, and notes format auto-detection. However, it does not explicitly state when not to use this tool or mention alternatives like manage_mock for individual mocks.

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/getmockd/mockd'

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