Skip to main content
Glama

manage_mock

Manage mock endpoints for HTTP, GraphQL, gRPC, WebSocket, SOAP, MQTT, and OAuth. Create, list, get, update, delete, or toggle mocks with optional stateful binding to resource tables.

Instructions

Create, retrieve, update, delete, list, or toggle mock endpoints. Use 'action' to specify the operation. For list, optionally filter by type or enabled status. For get/update/delete/toggle, provide the mock ID. For create, provide type and protocol-specific configuration.

Examples: List: {"action":"list","type":"http"} Get: {"action":"get","id":"http_060bff782a1de15f"} Create: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/hello"},"response":{"statusCode":200,"body":"{"msg":"hello"}"}}} Update: {"action":"update","id":"http_060bff782a1de15f","http":{"response":{"statusCode":201}}} Delete: {"action":"delete","id":"http_060bff782a1de15f"} Toggle: {"action":"toggle","id":"http_060bff782a1de15f","enabled":false}

Stateful binding examples (bind mocks to stateful resource tables for automatic CRUD): List: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/users"}},"extend":{"table":"users","action":"list"}} Create: {"action":"create","type":"http","http":{"matcher":{"method":"POST","path":"/api/users"}},"extend":{"table":"users","action":"create"}} Get: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/users/{id}"}},"extend":{"table":"users","action":"get"}} Update: {"action":"create","type":"http","http":{"matcher":{"method":"PUT","path":"/api/users/{id}"}},"extend":{"table":"users","action":"update"}} Delete: {"action":"create","type":"http","http":{"matcher":{"method":"DELETE","path":"/api/users/{id}"}},"extend":{"table":"users","action":"delete"}} Custom: {"action":"create","type":"http","http":{"matcher":{"method":"POST","path":"/api/users/{id}/verify"}},"extend":{"table":"users","action":"custom","operation":"VerifyUser"}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesOperation to perform
enabledNoFor toggle: set specific state. For list: filter by enabled status.
extendNoBind this mock to a stateful resource table for automatic CRUD. Create the table first with manage_state add_resource. Works with HTTP and SOAP mocks.
graphqlNoGraphQL config (create/update)
grpcNogRPC config (create/update)
httpNoHTTP mock spec (required when type=http)
idNoMock ID (required for get/update/delete/toggle)
mqttNoMQTT config (create/update)
nameNoMock name (create/update)
oauthNoOAuth config (create/update)
soapNoSOAP config (create/update)
typeNoProtocol type for create or list filter
websocketNoWebSocket config (create/update)
Behavior4/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. It covers the actions, parameters, and stateful binding behavior. However, it does not discuss side effects like idempotency (e.g., repeated create actions) or error handling, which would be beneficial for full transparency.

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?

The description is well-structured with a summary sentence, followed by action-specific examples and stateful binding examples. It is relatively long but appropriately detailed for a complex tool with 13 parameters and multiple actions. Could be slightly more concise, but the structure aids readability.

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

Completeness5/5

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

Given the complexity (13 parameters, nested objects, no output schema), the description is comprehensive. It covers all actions, parameter requirements, stateful binding, and provides numerous examples. It lacks return value details but since no output schema exists, it's not a critical gap.

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 description coverage is 100%, so baseline is 3. The description adds significant value beyond the schema by explaining which parameters are required for each action, showing concrete examples, and detailing stateful binding configuration. This helps the agent understand parameter relationships and usage.

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 the tool's purpose: 'Create, retrieve, update, delete, list, or toggle mock endpoints.' It specifies the actions and provides examples, distinguishing it from sibling tools like manage_state or manage_workspace, which handle state and workspace management respectively.

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?

The description provides explicit guidance on when to use each action (e.g., 'For get/update/delete/toggle, provide the mock ID. For create, provide type and protocol-specific configuration.') and includes examples for all actions and stateful binding. It does not explicitly mention when not to use an action or alternatives, but the context is clear enough.

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