Skip to main content
Glama
delano
by delano

create_mock

Create a mock server for a specified collection. Optionally set workspace, environment, and access controls.

Instructions

Create a new mock server. Creates in Personal workspace if workspace not specified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceNoWorkspace ID to create the mock in
mockYes

Implementation Reference

  • The actual handler function that executes the 'create_mock' tool logic. It makes a POST request to '/mocks' with the mock configuration, optionally filtered by workspace ID.
    async createMock(args: any): Promise<ToolCallResponse> {
      const params: any = {};
      if (args.workspace) params.workspaceId = args.workspace;
    
      const response = await this.client.post('/mocks', { mock: args.mock }, { params });
      return this.createResponse(response.data);
    }
  • Routes 'create_mock' tool calls to the createMock handler method in the MockTools class.
    case 'create_mock':
      return await this.createMock(args);
  • The schema definition for 'create_mock', specifying input parameters (workspace, mock object with collection/name required) and the description.
    {
      name: 'create_mock',
      description: 'Create a new mock server. Creates in Personal workspace if workspace not specified.',
      inputSchema: {
        type: 'object',
        properties: {
          workspace: {
            type: 'string',
            description: 'Workspace ID to create the mock in'
          },
          mock: {
            type: 'object',
            required: ['collection', 'name'],
            properties: {
              collection: {
                type: 'string',
                description: 'Collection ID to mock'
              },
              name: {
                type: 'string',
                description: 'Mock server name'
              },
              description: {
                type: 'string',
                description: 'Mock server description'
              },
              environment: {
                type: 'string',
                description: 'Environment ID to use'
              },
              private: {
                type: 'boolean',
                description: 'Access control setting'
              },
              versionTag: {
                type: 'string',
                description: 'Collection version tag'
              }
            }
          }
        },
        required: ['mock'] // mock object is required for creation
      }
    },
  • src/server.ts:129-129 (registration)
    Registration of MockTools definitions (including create_mock) into the server's tool registry.
    ...this.mockTools.getToolDefinitions(),
  • Helper method used by createMock to format the API response as a ToolCallResponse.
    private createResponse(data: any): ToolCallResponse {
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }]
      };
    }
Behavior2/5

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

With no annotations, the description carries full responsibility. It states the creation action and default workspace, but does not disclose other behavioral traits such as required permissions, mutation effects, or post-creation state (e.g., whether the mock is automatically published).

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 sentence with two clauses, efficiently conveying action and default behavior. It is front-loaded and contains no wasted words, though it could benefit from a more structured format.

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 lack of output schema and annotations, the description is too minimal. It omits return value information (e.g., created mock ID), prerequisites (e.g., collection must exist), and any error conditions. This leaves the agent with significant uncertainties.

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 50%. The description adds context for the workspace parameter (defaults to Personal) but provides no additional semantics for the mock object parameter, whose sub-fields are adequately described in the schema. Overall, it marginally compensates for the coverage gap.

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 'Create a new mock server' and specifies the default workspace behavior, making the tool's action and scope unambiguous. It distinguishes from sibling tools like create_api or create_collection by focusing on mock servers.

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 implicit guidance on workspace defaulting but lacks explicit instructions on when to use this tool versus alternatives (e.g., when to use create_mock vs. create_api). No exclusions or prerequisites are mentioned.

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/delano/postman-mcp-server'

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