Skip to main content
Glama

Get component source

get_component
Read-only

Retrieve a single accessible UI component by ID with plain HTML/CSS/JS and React source, WCAG criteria, labels, and accessibility notes; pro components return only a spec and lock notice.

Instructions

Return one component: plain HTML/CSS/JS source, a React version, WCAG criteria, accessibility notes and labels. Pro components return the spec and a lock notice instead of source.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesComponent id from list_components, for example "big-action-button".
include_codeNoSet false to get only metadata, criteria and notes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavior: pro components return a spec plus a lock notice instead of source, which prevents an agent from treating a missing source as an error. It does not cover behavior for an invalid or unknown id.

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?

Two sentences, zero filler, with the returned content front-loaded and the pro-component caveat following immediately. Every clause carries information an agent needs.

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 two-parameter read tool with no output schema, the description enumerates the return fields and explains the pro-component variant, which is the main surprise an agent could hit. The remaining gap is error behavior on an unknown id, a minor omission.

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%, including the id example and the include_code default, so the schema carries parameter meaning. The description adds no additional syntax or format detail for either parameter, which is the expected baseline when the schema is fully documented.

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 specific verb and resource ("Return one component") and enumerates the payload: plain HTML/CSS/JS source, React version, WCAG criteria, accessibility notes and labels. The word "one" implicitly scopes it against list_components, but no sibling is named explicitly, so it stops short of full sibling differentiation.

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

Usage Guidelines3/5

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

Usage is only implied — an agent infers it fetches details for a single component whose id came from list_components (that linkage lives in the schema, not the description). There is no explicit when-to-use versus get_ai_prompt or check_wcag_checklist, and no exclusion guidance.

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