Skip to main content
Glama

get_component_docs

Resolve a component, story, or docs ID to retrieve compact guidance, availability, IDs, example metadata, and usage caveats for Storybook component discovery.

Instructions

Returns compact metadata-derived component guidance, availability, ids, examples metadata, and usage caveats for a component, story id, or docs id.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "get_component_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesComponent identifier to resolve. Accepts normalized componentPath/title, story id, or docs id.
includeExamplesNoWhen true (default), include available story/example metadata. Does not fetch rendered docs or source code.

Output Schema

NameRequiredDescriptionDefault
queryYes
matchedYes
examplesNo
componentYes
usageNotesYes
sourceMetadataYes
argsAvailabilityYes
docsAvailabilityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. 'Compact metadata-derived' usefully signals that this is a lightweight metadata read rather than a rendered-docs or source fetch, and 'Returns' implies a non-mutating operation. However, it says nothing about caching, freshness, or what happens when an id cannot be resolved.

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?

A single front-loaded sentence that leads with the verb and result type. The enumerate-everything list ('guidance, availability, ids, examples metadata, and usage caveats') is slightly sprawling, but there is no filler or redundant framing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is a simple two-parameter read with a fully described schema and an output schema, so return-value explanation is correctly omitted. What is missing is positioning relative to the many sibling lookup tools, which matters for an agent choosing among 15 options. Adequate, but with a clear selection gap.

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 both parameters are already documented in the schema, including the default and the 'does not fetch rendered docs or source code' caveat for includeExamples. The description restates the accepted id forms but adds no format syntax or resolution-order detail beyond the schema, so baseline 3 applies.

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 uses a concrete verb ('Returns') and names the resource content precisely: metadata-derived component guidance, availability, ids, examples metadata, and usage caveats. It also states the accepted input forms (component, story id, docs id), which distinguishes it from pure listing tools. It stops short of explicitly distinguishing itself from siblings like get_component_style_dependencies or search_components, which keeps it at 4 rather than 5.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternatives are named. The phrase 'for a component, story id, or docs id' implies it is a resolution entry point when you already have an identifier, but the agent must infer that versus search_components or list_components.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.