Skip to main content
Glama

bulk_create_mocks

Create multiple mock API endpoints in a single atomic batch request under a project workspace. Automatically creates any referenced 'collectionName' folders that do not yet exist. Returns a JSON array of all created mock objects, each populated with its database 'id', 'slugId', ready-to-use public 'mockUrl', and nested 'rules' (plus a 'responseBodyWarning' field on any mock whose JSON responseBody looks structurally malformed). USAGE GUIDELINES: Prefer bulk_create_mocks over repeated create_mock calls whenever scaffolding 2 or more endpoints (e.g., setting up an entire service contract or multi-step stateful workflow). Before calling, run search_mocks or list_mocks to avoid creating duplicate method+path endpoints. After creation, verify key scenarios using test_mock.

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": {
      "projectId": "<projectId>",
      "mocks": "<mocks>"
    },
    "name": "bulk_create_mocks"
  }
}

Input Schema

NameRequiredDescriptionDefault
mocksYesNon-empty array of mock endpoint configurations to create in batch. Each item supports full mock settings including default response, conditional rules, stateful expressions, and outbound webhooks.
projectIdYesDatabase ID of the target project workspace (obtain from list_projects or create_project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / mocks / items / properties / method / description
      Previous value: -"HTTP method for this endpoint (e.g. GET, POST, PUT, PATCH, DELETE)."New value: +"HTTP method for this endpoint (e.g. GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)."
  2. Changed24 schema fields changed
    • changedInput schema / properties / mocks / description
      Previous value: -"List of mock configurations to create"New value: +"Non-empty array of mock endpoint configurations to create in batch. Each item supports full mock settings including default response, conditional rules, stateful expressions, and outbound webhooks."
    • changedInput schema / properties / mocks / items / properties / collectionName / description
      Previous value: -"Collection folder name to place this mock in"New value: +"Collection folder name to organize this mock in (default: 'Default Collection'). Auto-created if it does not exist."
    • addedInput schema / properties / mocks / items / properties / delayMs / description
      Added value: +"Optional default simulated latency in milliseconds before returning the fallback response."
    • addedInput schema / properties / mocks / items / properties / description / description
      Added value: +"Optional detailed description of what this mock endpoint simulates, shown in the dashboard UI."
    • changedInput schema / properties / mocks / items / properties / method / description
      Previous value: -"HTTP Method, e.g. POST, GET"New value: +"HTTP method for this endpoint (e.g. GET, POST, PUT, PATCH, DELETE)."
    • changedInput schema / properties / mocks / items / properties / name / description
      Previous value: -"Mock endpoint name"New value: +"Descriptive human-readable name for the mock endpoint (e.g. 'POST Create Charge', 'GET User Profile')."
    • changedInput schema / properties / mocks / items / properties / path / description
      Previous value: -"HTTP Path, e.g. /v1/users/{id}"New value: +"HTTP resource path. Use curly braces for path parameters, e.g. '/v1/users/{id}' or '/v2/charge/{order_id}/status'."
    • addedInput schema / properties / mocks / items / properties / responseBody / description
      Added value: +"Default fallback response body string when no rule matches. Supports all dynamic expressions ({{path.*}}, {{query.*}}, {{header.*}}, {{body.*}}, {{form.*}}, {{random.uuid}}, {{random.number:N}}, {{random.alphabet:N}}, {{random.alphanumeric:N}}, {{random.date:format:offset}}, {{faker.*}}, {{state.*}}, {{env.*}}, and '__repeat' loops). Enclose all {{...}} placeholders in double quotes inside JSON and avoid raw newlines."
    • addedInput schema / properties / mocks / items / properties / responseHeaders / description
      Added value: +"Optional default response headers serialized as a JSON string, e.g. '{\"Content-Type\":\"application/json\"}'."
    • addedInput schema / properties / mocks / items / properties / responseStatus / description
      Added value: +"Default fallback HTTP status code returned when no conditional rule matches (e.g. 200, 201)."
    • addedInput schema / properties / mocks / items / properties / rules / description
      Added value: +"Optional array of conditional response rules evaluated in ascending priority order (first match wins)."
    • changedInput schema / properties / mocks / items / properties / rules / items / properties / responseBody / description
      Previous value: -"Response body to return when this rule matches. Supports all dynamic expression placeholders (e.g. {{body.user_id}}, {{path.id}}, {{random_uuid}}). IMPORTANT: For JSON responses, do NOT include raw newline characters (\\n) in the JSON payload as it will make the JSON structure malformed."New value: +"Response body to return when this rule matches. Supports all dynamic expression placeholders:\n- Request: {{path.<var>}}, {{query.<param>}}, {{header.<Name>}}, {{body.<jsonPath>}}, {{form.<field>}} (all support ':default' fallback, e.g. {{body.amount:100000}})\n- Random & UUID: {{random.uuid}} (or {{random_uuid}}), {{random.number:<len>}}, {{random.alphabet:<len>}}, {{random.alphanumeric:<len>}}\n- Date/Time: {{random.date:<format>}} or {{random.date:<format>:<offset>}} (e.g. {{random.date:yyyy-MM-dd:+7d}}, offsets: +/-Ns, m, h, d, M, y)\n- Faker (locales: _id, _jp, _kr, _global or :ID, :JP, :KR, :GLOBAL): {{faker.name_id}}, {{faker.email}}, {{faker.phone_id}}, {{faker.company}}, {{faker.city_jp}}, {{faker.address_id}}, {{faker.jobtitle}}, {{faker.car}}, {{faker.price:<min>:<max>}}\n- State & Env: {{state.<fieldName>}}, {{env.<KEY>:<default>}}, JSON array looping with '__repeat' & {{item}}, Handlebars {{#if (eq a b)}}...{{/if}}\nIMPORTANT: For JSON responses, enclose all {{...}} placeholders in double quotes and do NOT include raw newline characters (\\n) in the JSON payload."
    • addedInput schema / properties / mocks / items / properties / soapEnabled
      Added value: +{
      +  "description": "Optional flag to enable SOAP/WSDL XML mode for this mock endpoint.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / mocks / items / properties / stateCaptureExpr / description
      Added value: +"Optional expression resolving to a Redis session key under which request/response snapshots and stateCaptureVariables are saved after processing (15-minute TTL)."
    • addedInput schema / properties / mocks / items / properties / stateCaptureVariables / description
      Added value: +"Optional JSON object string mapping state variable names to expressions (e.g. '{\"balance\":\"request.body.amount\"}') or literal values to persist in Redis state."
    • addedInput schema / properties / mocks / items / properties / stateLookupExpr / description
      Added value: +"Optional expression resolving to a Redis session key to load stateful data before rule evaluation (e.g. 'request.path.order_id' or 'request.header.Authorization')."
    • addedInput schema / properties / mocks / items / properties / tags / description
      Added value: +"Optional list of string tags/labels for filtering and search (e.g. ['payment', 'psp-a'])."
    • addedInput schema / properties / mocks / items / properties / webhookDelayMs / description
      Added value: +"Optional delay in milliseconds before firing the outbound webhook after the mock response is sent."
    • addedInput schema / properties / mocks / items / properties / webhookHeaders / description
      Added value: +"Optional JSON string of HTTP headers sent with the outbound webhook request."
    • addedInput schema / properties / mocks / items / properties / webhookMethod / description
      Added value: +"HTTP method for the outbound webhook request (defaults to POST)."
    • addedInput schema / properties / mocks / items / properties / webhookPayload / description
      Added value: +"Optional request body payload sent with the outbound webhook. Supports dynamic expression placeholders."
    • changedInput schema / properties / mocks / items / properties / webhookUrl / description
      Previous value: -"Optional: Webhook URL. LOCAL RELAY OPTION: If developing locally, use the 'simceptor://local/<path>' scheme and verify relay is active via 'check_relay_status'."New value: +"Optional outbound webhook URL fired after the mock responds. Supports dynamic expressions and 'simceptor://local/<path>' when Local Webhook Relay is active (verify with check_relay_status first)."
    • addedInput schema / properties / mocks / items / properties / wsdlContent
      Added value: +{
      +  "description": "Optional raw WSDL XML definition served when the mock is queried with '?wsdl'.",
      +  "type": "string"
      +}
    • changedInput schema / properties / projectId / description
      Previous value: -"Project DB ID"New value: +"Database ID of the target project workspace (obtain from list_projects or create_project)."
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the behavioral burden. It discloses atomic batch semantics, automatic collection folder creation, and rich return fields including responseBodyWarning. It still does not state auth requirements, batch limits, or exact partial-failure behavior, but it is substantially more transparent than typical unannotated mutation tools.

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?

Front-loaded and structured with a clear usage guidelines block. Return-field detail is lengthy but justified because there is no output schema; there is minor verbosity in enumerating result fields.

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?

The rich nested schema handles parameter documentation, and with no output schema the description valuably explains the return shape. It still lacks explicit failure/rollback semantics and limits for a complex batch mutation, leaving a small but meaningful gap.

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 coverage is 100%, so parameter meaning is primarily supplied by the structured fields. The description mentions the project workspace and collectionName auto-creation but adds no syntax or constraints beyond the schema; baseline 3 is appropriate.

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?

States a specific verb and resource ('Create multiple mock API endpoints'), scopes it to a project workspace, and distinguishes the bulk path from create_mock. An agent can identify the tool's role without opening the schema.

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

Usage Guidelines5/5

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

Explicitly tells the agent to prefer this over repeated create_mock for 2+ endpoints, names duplicate checks via search_mocks/list_mocks before calling, and points to test_mock afterward. The only minor omission is no explicit one-endpoint exclusion, but '2 or more' covers it.

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.

Resources