Skip to main content
Glama

spec_by_id

Read-onlyIdempotent

Retrieve a specific API specification's details by ID, returning its domain and collections to explore its structure.

Instructions

spec_by_id

Retrieves detailed information about a specific API specification by its ID, including its domain and all associated collections.

When to use

Use this tool when:

  • You need to explore a specific API's structure after discovering it via spec_list

  • The user asks "show me details about API X" or "what collections are in spec Y?"

  • You have a specId and need to get its collections before drilling into tags

Parameters

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

Returns

The specification's ID and domain, plus a list of collections with their IDs, titles, tag counts, and method counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesrequired,A unique 32-character MD5 hash identifier for the spec,pattern=^[0-9a-f]{32}$
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, covering safety. The description adds value by specifying exactly what is returned (domain, collections with IDs, titles, tag counts, method counts) and clarifying scope ('all associated collections'). It also implicitly states it does not drill into tags. This goes beyond the annotated safety profile.

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 (overview, when to use, parameters, returns). Every sentence serves a purpose, and the use of bullets and headers enhances readability. It is appropriately sized for the tool's simplicity.

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?

There is no output schema, so the description carries the full responsibility for explaining return values, and it does so thoroughly (domain and collections with specific fields). It also covers parameters and usage context. For a tool with one parameter and clear annotations, this is complete.

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 already provides full coverage (100%) for the sole parameter 'id', including its MD5 format and pattern. The description's parameter section restates this information without adding new semantic meaning. Since schema coverage is high, baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Retrieves detailed information about a specific API specification by its ID, including its domain and all associated collections.' This distinguishes it from siblings like spec_list (which lists specs) and collection_by_spec (which likely focuses on collections only). The mention of 'after discovering it via spec_list' further clarifies its role.

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?

A dedicated 'When to use' section provides explicit scenarios and contrasts with spec_list and drilling into tags. It clearly states when this tool is appropriate and implies alternatives by pointing to spec_list and tag-related tools. This is model-tier usage guidance.

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