Skip to main content
Glama

getCollection

Retrieve information about a Postman collection. Choose between lightweight, minimal, or full response models.

Instructions

Get information about a collection. Returns lightweight collection map by default. Use model='minimal' for root-level IDs only, or model='full' for complete payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYesThe collection ID in format <OWNER_ID>-<COLLECTION_ID>
access_keyNoCollection's read-only access key (optional, doesn't require API key)
modelNoResponse model: 'minimal' for root-level IDs, 'full' for complete payload

Implementation Reference

  • The GetCollectionTool class - the handler that executes the 'getCollection' tool logic. The run_tool method sends a GET request to /collections/{collection_id} with optional access_key and model parameters.
    class GetCollectionTool(ToolHandler):
        """Get collection information"""
        
        def __init__(self):
            super().__init__("getCollection")
        
        def get_tool_description(self) -> Tool:
            return Tool(
                name=self.name,
                description="Get information about a collection. Returns lightweight collection map by default. Use model='minimal' for root-level IDs only, or model='full' for complete payload.",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "collectionId": {
                            "type": "string",
                            "description": "The collection ID in format <OWNER_ID>-<COLLECTION_ID>"
                        },
                        "access_key": {
                            "type": "string",
                            "description": "Collection's read-only access key (optional, doesn't require API key)"
                        },
                        "model": {
                            "type": "string",
                            "enum": ["minimal", "full"],
                            "description": "Response model: 'minimal' for root-level IDs, 'full' for complete payload"
                        }
                    },
                    "required": ["collectionId"]
                },
            )
        
        async def run_tool(self, args: dict) -> list[TextContent]:
            collection_id = args["collectionId"]
            params = {}
            if args.get("access_key"):
                params["access_key"] = args["access_key"]
            if args.get("model"):
                params["model"] = args["model"]
            
            result = await postman_api_call("GET", f"/collections/{collection_id}", params=params)
            return [TextContent(type="text", text=json.dumps(result, indent=2))]
  • The input schema for the 'getCollection' tool. Defines required 'collectionId' parameter and optional 'access_key' and 'model' (enum: minimal/full) parameters.
    def get_tool_description(self) -> Tool:
        return Tool(
            name=self.name,
            description="Get information about a collection. Returns lightweight collection map by default. Use model='minimal' for root-level IDs only, or model='full' for complete payload.",
            inputSchema={
                "type": "object",
                "properties": {
                    "collectionId": {
                        "type": "string",
                        "description": "The collection ID in format <OWNER_ID>-<COLLECTION_ID>"
                    },
                    "access_key": {
                        "type": "string",
                        "description": "Collection's read-only access key (optional, doesn't require API key)"
                    },
                    "model": {
                        "type": "string",
                        "enum": ["minimal", "full"],
                        "description": "Response model: 'minimal' for root-level IDs, 'full' for complete payload"
                    }
                },
                "required": ["collectionId"]
            },
  • Registration of GetCollectionTool() in the register_all_tools() function, which creates an instance to be used by the MCP framework.
    GetCollectionTool(),
Behavior3/5

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

No annotations exist, so the description carries full burden. It reveals the default response (lightweight map) and model options, but lacks details on error handling or authentication requirements (though access_key is noted).

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

Conciseness5/5

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

Two efficient sentences, front-loaded with the primary purpose. No wasted words.

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?

For a simple retrieval tool without output schema, the description adequately covers behavior and parameter options. Could mention potential errors or required permissions for completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema already describes all parameters (100% coverage). The description adds context for the 'model' parameter, clarifying 'root-level IDs' vs 'complete payload', which goes beyond the enum values.

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 it retrieves collection information, distinguishing it from sibling tools like getCollections (plural) and createCollection. It specifies the default return type and available response models.

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?

It explains when to use different 'model' values (minimal, full) but could explicitly contrast this tool with alternatives (e.g., getCollections for listing).

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