Skip to main content
Glama

Get Component Spec

get_component

Retrieve the full component spec before generating any UI component: sizes, variants, states, and UX rules. Prevents improvised component specs.

Instructions

ALWAYS call this before generating any UI component (button, input, card, badge, modal, toast, etc.). Returns the full component spec: sizes, variants, states, and UX rules. Never improvise component specs.

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

Input Schema

NameRequiredDescriptionDefault
nameYesComponent name, lowercase. E.g. 'button', 'input', 'card', 'badge', 'modal', 'toast'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it discloses the returned fields and asserts this is the authoritative source, which is useful behavioral context. It says nothing about what happens for an unknown component name, whether the result is cached or authoritative, or the response format, so key behavior remains unstated.

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?

Three short sentences, front-loaded with the imperative trigger before the return description and the prohibition. No filler; every sentence carries a distinct instruction.

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

Completeness4/5

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

For a simple one-parameter getter with no annotations or output schema, the description covers when to call it and roughly what comes back. Only the return shape and unknown-name behavior are left open, which is a minor gap at this complexity level.

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 coverage is 100% and the single parameter already documents lowercase naming with examples like 'button' and 'modal'. The description's component-type list is largely redundant with the schema's example list and adds no new meaning about the parameter.

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 states a specific verb and resource ('Returns the full component spec') and enumerates the payload ('sizes, variants, states, and UX rules'), so an agent knows exactly what it gets. It does not name any sibling such as get_tokens or get_design_system to sharpen the boundary, so it falls short of the sibling-differentiation bar for a 5.

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

Usage Guidelines4/5

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

The trigger is explicit and mandatory: 'ALWAYS call this before generating any UI component' with a concrete list of component types, plus a prohibition ('Never improvise component specs'). There is no stated when-not condition or named alternative tool, so it stops short of full routing guidance.

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