Skip to main content
Glama
delano
by delano

update_server_response

Update a mock server response's name, HTTP status code, headers, body, active status, or delay. Provide the mock server ID and response ID.

Instructions

Update a server response

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mockIdYesThe mock server ID
serverResponseIdYesThe server response ID
serverResponseYes

Implementation Reference

  • Handler function that executes the update_server_response tool logic. Makes a PUT request to update a server response on a mock server.
    async updateServerResponse(args: any): Promise<ToolCallResponse> {
      const response = await this.client.put(
        `/mocks/${args.mockId}/server-responses/${args.serverResponseId}`,
        { serverResponse: args.serverResponse }
      );
      return this.createResponse(response.data);
    }
  • Routes the 'update_server_response' tool call to the updateServerResponse handler in the switch statement.
    case 'update_server_response':
      return await this.updateServerResponse(args);
  • Schema definition for the update_server_response tool, including its input parameters and types.
    {
      name: 'update_server_response',
      description: 'Update a server response',
      inputSchema: {
        type: 'object',
        required: ['mockId', 'serverResponseId', 'serverResponse'],
        properties: {
          mockId: {
            type: 'string',
            description: 'The mock server ID'
          },
          serverResponseId: {
            type: 'string',
            description: 'The server response ID'
          },
          serverResponse: {
            type: 'object',
            properties: {
              name: {
                type: 'string',
                description: 'Updated response name'
              },
              code: {
                type: 'number',
                description: 'Updated HTTP status code'
              },
              headers: {
                type: 'array',
                description: 'Updated response headers',
                items: {
                  type: 'object',
                  properties: {
                    key: { type: 'string' },
                    value: { type: 'string' }
                  }
                }
              },
              body: {
                type: 'string',
                description: 'Updated response body'
              },
              active: {
                type: 'boolean',
                description: 'Change active status'
              },
              delay: {
                type: 'number',
                description: 'Updated response delay'
              }
            }
          }
        }
      }
    },
Behavior1/5

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

With no annotations, the description carries the full burden of disclosing behavioral traits like destructiveness, permissions, or whether updates are partial or full. The description only states 'Update a server response' and provides no such information, leaving the agent uninformed about side effects or requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no fluff, but it is overly minimal. For a tool with nested parameters and multiple fields, a slightly longer description could improve usability without sacrificing conciseness. It is not verbose but borders on insufficient.

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 (3 required parameters with nested object, multiple fields) and no output schema, the description should provide more context, such as what a server response is, how it relates to mocks, and what the update operation entails. The current description lacks completeness.

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?

The input schema has high coverage with descriptions for all parameters and nested fields, so the baseline is 3. The description 'Update a server response' does not add meaning beyond what the schema already provides, such as explaining the relationship between mockId and serverResponseId. It is adequate but not enhanced.

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 'Update a server response' clearly states the action (update) and the resource (server response), but it does not elaborate on what a server response is in this context, nor does it differentiate from sibling tools like create_server_response or delete_server_response. It is not a tautology but could be more specific.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as create_server_response or update_mock. There is no mention of prerequisites, edge cases, or when not to use it. The description is silent on usage context.

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