Skip to main content
Glama

createCollectionResponse

Document expected API responses by creating a response entry in a Postman collection request with status, headers, and body.

Instructions

Creates a request response in a collection. Recommended to pass 'name' property. See Response entry in Postman Collection Format docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYesCollection ID
requestYesParent request ID
nameNoResponse name
descriptionNoResponse description
statusNoHTTP status text
responseCodeNoHTTP response code info
headersNoResponse headers
cookiesNoCookie data
textNoRaw response body text
languageNoLanguage type
mimeNoMIME type
timeNoTime taken (ms)
methodNoRequest HTTP method
urlNoRequest URL
dataModeNoRequest body data mode
dataOptionsNoData mode options
rawModeDataNoRaw mode data
rawDataTypeNoRaw data type
requestObjectNoJSON-stringified request representation

Implementation Reference

  • Handler class CreateCollectionResponseTool: registers tool name 'createCollectionResponse', defines input schema (required: collectionId, request), and executes POST /collections/{collectionId}/responses API call.
    class CreateCollectionResponseTool(ToolHandler):
        """Create a response in a collection"""
        
        def __init__(self):
            super().__init__("createCollectionResponse")
        
        def get_tool_description(self) -> Tool:
            return Tool(
                name=self.name,
                description="Creates a request response in a collection. Recommended to pass 'name' property. See Response entry in Postman Collection Format docs.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "collectionId": {
                            "type": "string",
                            "description": "Collection ID"
                        },
                        "request": {
                            "type": "string",
                            "description": "Parent request ID"
                        },
                        "name": {
                            "type": "string",
                            "description": "Response name"
                        },
                        "description": {
                            "type": "string",
                            "description": "Response description"
                        },
                        "status": {
                            "type": "string",
                            "description": "HTTP status text"
                        },
                        "responseCode": {
                            "type": "object",
                            "description": "HTTP response code info"
                        },
                        "headers": {
                            "type": "array",
                            "description": "Response headers"
                        },
                        "cookies": {
                            "type": "string",
                            "description": "Cookie data"
                        },
                        "text": {
                            "type": "string",
                            "description": "Raw response body text"
                        },
                        "language": {
                            "type": "string",
                            "description": "Language type"
                        },
                        "mime": {
                            "type": "string",
                            "description": "MIME type"
                        },
                        "time": {
                            "type": "string",
                            "description": "Time taken (ms)"
                        },
                        "method": {
                            "type": "string",
                            "description": "Request HTTP method"
                        },
                        "url": {
                            "type": "string",
                            "description": "Request URL"
                        },
                        "dataMode": {
                            "type": "string",
                            "description": "Request body data mode"
                        },
                        "dataOptions": {
                            "type": "string",
                            "description": "Data mode options"
                        },
                        "rawModeData": {
                            "type": "string",
                            "description": "Raw mode data"
                        },
                        "rawDataType": {
                            "type": "string",
                            "description": "Raw data type"
                        },
                        "requestObject": {
                            "type": "string",
                            "description": "JSON-stringified request representation"
                        }
                    },
                    "required": ["collectionId", "request"]
                },
            )
        
        async def run_tool(self, args: dict) -> list[TextContent]:
            collection_id = args.pop("collectionId")
            body = {k: v for k, v in args.items() if v is not None}
            
            result = await postman_api_call("POST", f"/collections/{collection_id}/responses", body=body)
            return [TextContent(type="text", text=json.dumps(result, indent=2))]
  • Input schema for createCollectionResponse: requires collectionId and request, with optional fields for response details (status, responseCode, headers, cookies, body, etc.).
        inputSchema={
            "type": "object",
            "properties": {
                "collectionId": {
                    "type": "string",
                    "description": "Collection ID"
                },
                "request": {
                    "type": "string",
                    "description": "Parent request ID"
                },
                "name": {
                    "type": "string",
                    "description": "Response name"
                },
                "description": {
                    "type": "string",
                    "description": "Response description"
                },
                "status": {
                    "type": "string",
                    "description": "HTTP status text"
                },
                "responseCode": {
                    "type": "object",
                    "description": "HTTP response code info"
                },
                "headers": {
                    "type": "array",
                    "description": "Response headers"
                },
                "cookies": {
                    "type": "string",
                    "description": "Cookie data"
                },
                "text": {
                    "type": "string",
                    "description": "Raw response body text"
                },
                "language": {
                    "type": "string",
                    "description": "Language type"
                },
                "mime": {
                    "type": "string",
                    "description": "MIME type"
                },
                "time": {
                    "type": "string",
                    "description": "Time taken (ms)"
                },
                "method": {
                    "type": "string",
                    "description": "Request HTTP method"
                },
                "url": {
                    "type": "string",
                    "description": "Request URL"
                },
                "dataMode": {
                    "type": "string",
                    "description": "Request body data mode"
                },
                "dataOptions": {
                    "type": "string",
                    "description": "Data mode options"
                },
                "rawModeData": {
                    "type": "string",
                    "description": "Raw mode data"
                },
                "rawDataType": {
                    "type": "string",
                    "description": "Raw data type"
                },
                "requestObject": {
                    "type": "string",
                    "description": "JSON-stringified request representation"
                }
            },
            "required": ["collectionId", "request"]
        },
    )
  • Tool is registered in register_all_tools() at line 1849, making it available as one of the 41 MCP tools.
    CreateCollectionResponseTool(),
Behavior2/5

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

No annotations are present, so the description must disclose all behavioral traits. It only mentions the action and a recommendation to pass 'name', but no information on side effects, permissions, error states, or outcome (e.g., whether it overwrites or creates new).

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 two sentences with no redundant information. It is front-loaded with the purpose and includes a recommendation. Could be slightly improved by structuring, but acceptable.

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 has 19 parameters and no output schema, the description is too terse. It does not explain how parameters relate, the expected behavior of nested objects, or what the response is. The reference to external docs partially compensates but falls short for an agent.

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 100%, so the schema already documents each parameter. The description adds a useful recommendation about 'name', which is minor extra context. Thus baseline 3 is appropriate.

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 explicitly states it creates a request response in a collection. However, it does not differentiate from siblings like createCollectionRequest or updateCollectionRequest, which also deal with request-related objects.

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

Usage Guidelines1/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, nor any prerequisites or conditions. The description lacks context for proper selection.

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

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