Skip to main content
Glama

Get component spec

get_component
Read-only

Returns the full specification for one component: import path, props schema, usage example, anti-patterns, when-to-use and when-not-to-use notes, Figma spec, and dependencies. Read-only. Call it before writing code that uses a component, so props and import path come from the design system instead of memory. The name argument must be the exact component name as returned by list_components or search_components (case-sensitive, no package prefix); an unknown name returns a not-found error rather than a near match, so resolve the name first with search_components if you are guessing. The result may carry a provenance warning when the record was LLM-generated and not yet reviewed - treat those fields as unverified. It covers one component at a time; use list_components to enumerate and get_component_updates for version-to-version changes.

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": {
      "name": "<name>",
      "project_id": "<project_id>"
    },
    "name": "get_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesExact component name, e.g. "Button"
project_idYesUUID as returned by list_projects - not the project name, title, or slug, and not guessable. Fetch it once and reuse the same id across tools. An id outside the caller's organization returns "Project not found or access denied" rather than empty data, and a project withheld by a plan limit returns a plan error that retrying cannot clear. The component must belong to a package assigned to this project; a name that exists elsewhere in the organization is still not found here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / project_id / description
      Previous value: -"Project ID from list_projects"New value: +"UUID as returned by list_projects - not the project name, title, or slug, and not guessable. Fetch it once and reuse the same id across tools. An id outside the caller's organization returns \"Project not found or access denied\" rather than empty data, and a project withheld by a plan limit returns a plan error that retrying cannot clear. The component must belong to a package assigned to this project; a name that exists elsewhere in the organization is still not found here."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only, non-destructive, closed-world, so the description is free to add higher-value behavior: an unknown name returns a hard not-found error rather than a fuzzy match, results may carry a provenance warning for unreviewed LLM-generated records that should be treated as unverified, and project scoping errors differ by cause. These are failure-mode and trust details an agent cannot infer from 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.

Conciseness4/5

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

The return payload is front-loaded before the calling advice, and every sentence carries information: trigger, name-resolution rule, provenance caveat, scope boundary. It is dense but not padded; a slight trim of the repeated project/name scoping caveats would tighten it further.

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?

With no output schema, the description correctly carries the burden by listing the returned fields and flagging the possible provenance warning. Combined with its error-behavior notes and explicit sibling routing, an agent has everything needed to call this correctly on the first attempt.

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 coverage is 100%, so the baseline is 3; the description adds operational meaning on top by insisting the name be the exact case-sensitive string emitted by list_components or search_components with no package prefix, and by explaining that a name valid elsewhere in the organization still fails here. It largely restates the project_id constraints already in the schema rather than extending them.

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 ("Returns the full specification for one component") and then enumerates exactly what that specification contains: import path, props schema, usage example, anti-patterns, when-to-use notes, Figma spec, and dependencies. It is clearly separable from list_components (enumeration) and get_component_updates (version deltas), both named in the text.

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?

It gives an explicit trigger ("Call it before writing code that uses a component") and an explicit alternative for name resolution ("resolve the name first with search_components if you are guessing"). It also states the tool's scope limit (one component at a time) and routes enumeration and version-diff needs to list_components and get_component_updates.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.