Skip to main content
Glama

collection_by_spec

Read-onlyIdempotent

List all collections (logical groups of endpoints) from a specific API spec ID to understand how endpoints are organized.

Instructions

collection_by_spec

Lists all collections (logical groups of endpoints) within a specific API specification.

When to use

Use this tool when:

  • You have a specId from spec_list or spec_by_id and want to see how endpoints are organized

  • The user says "show me collections in the meteo API" or "what groups exist in spec X?"

  • You need to navigate from spec → collection → tag → endpoint

After finding a collection of interest, use collection_by_id for its tags or endpoint_by_collection for its endpoints.

Parameters

  • specId (required): The 32-character MD5 hash ID of the specification

Returns

A list of collections with their IDs, titles, and statistics (tag count, method count).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specIdYesrequired,
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds useful behavioral context beyond annotations, such as the scope ('within a specific API specification') and the return shape (list of collections with IDs, titles, and statistics). This is consistent with annotations and enriches the agent's understanding.

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-structured with clear sections: a one-sentence purpose, a 'When to use' list, a parameter definition, and a returns summary. Every sentence serves a purpose, and the most important information is front-loaded. No wasted words.

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?

Given the tool's simplicity (one parameter, no output schema), the description covers all necessary aspects: what it does, when to use it, parameter format, and return content. It also fits into the broader navigation flow with sibling tools, making it complete for an agent to select and invoke it correctly.

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?

The input schema only says 'specId' with description 'required,' which is bare. The description compensates by specifying it is a 32-character MD5 hash ID, adding crucial semantic detail. Since there is only one parameter and it is fully explained, the description adds significant meaning beyond the schema.

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 ('Lists') and resource ('all collections within a specific API specification'), clearly distinguishing it from siblings like collection_by_id (single collection) and tag_by_collection (tags). It also defines 'collections' as 'logical groups of endpoints.'

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 explicitly states when to use this tool, including having a `specId` from `spec_list` or `spec_by_id`, user intent examples, and navigation flow. It also names alternatives (`collection_by_id`, `endpoint_by_collection`) for next steps, providing clear context and exclusions.

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