Skip to main content
Glama

collection_by_id

Read-onlyIdempotent

Retrieve a specific collection's tags, spec metadata, and method statistics using its ID. Get a complete overview before diving into endpoints.

Instructions

collection_by_id

Retrieves detailed information about a specific collection including its tags, spec metadata, and method statistics.

When to use

Use this tool when:

  • You have a collection ID and want to see its tags before drilling into endpoints

  • The user asks for details about a specific collection like "show me what's in the pets collection"

  • You need to see the spec that owns this collection

To list all collections in a spec first, use collection_by_spec instead.

Parameters

  • id (required): The 32-character MD5 hash ID of the collection

Returns

The collection's spec (ID, domain), collection details (ID, title, method count), and a list of tags with their IDs, titles, and method counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier for the collection,required
Behavior4/5

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

Annotations already indicate `readOnlyHint: true` and `idempotentHint: true`, correctly marking it as a safe read. The description adds useful context by detailing the return payload and noting that the ID is a 32-character MD5 hash, which helps set expectations without repeating the annotations.

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?

The description is well-organized with clear headers and succinct bullets. Every sentence adds value: it explains the purpose, provides use cases, defines the parameter, and summarizes the return value without fluff.

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?

For a simple single-parameter tool with no output schema, the description fully covers what it does, when to use it, what the parameter means, and what the response contains. No critical information is missing for an agent to correctly invoke it.

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?

Although the schema covers 100% of the parameter with a description, the tool description enriches it further by specifying the exact format ('32-character MD5 hash ID') and reinforcing its purpose. This goes beyond the schema's generic 'Unique identifier' text.

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 states a specific verb ('Retrieves detailed information') and resource ('specific collection'), and lists the exact contents (tags, spec metadata, method statistics). It also distinguishes from the sibling tool `collection_by_spec` by specifying that this tool is for a single collection ID, not listing all collections.

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

Usage Guidelines5/5

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

The 'When to use' section provides three concrete scenarios and explicitly points to `collection_by_spec` as the alternative for listing all collections. This gives the agent clear decision guidance and prevents confusion among siblings.

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/mmadfox/swag2mcp'

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