Skip to main content
Glama
tsubotax
by tsubotax

get_component

Retrieve structured component metadata—variants, sizes, accessibility requirements, HTML sample, state specs, and anatomy parts—to build accurate UI code without inferring states from HTML.

Instructions

Get component metadata including variants, sizes, accessibility requirements, HTML sample, per-state specs (stateSpecs: disabled/loading/open/empty etc. — each with delta class strings + aria changes), and anatomy parts (overlay/container/th etc. with element/roles/class). Prefer these structured fields over inferring states from the HTML sample.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesComponent ID (e.g. "button", "card", "table", "sidebar")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningfully disclose the return shape: per-state specs (disabled/loading/open/empty with delta class strings and aria changes) and anatomy parts with element/roles/class. This is real behavioral context beyond a bare "get," though it omits any statement of read-only safety, permissions, or error behavior.

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?

Two sentences, front-loaded with the tool's purpose and contents, with no filler. The first sentence is dense with comma-separated field lists, but each clause maps to actual returned data and earns its place.

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?

With no output schema and no annotations, the description must describe return values, and it does so thoroughly across variants, sizes, accessibility, HTML sample, stateSpecs, and anatomy. What remains missing is operational context (read-only nature, error cases on an unknown id), which is minor for a lookup tool.

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% for the single id parameter, including example values, so the schema already does the work. The description adds no syntax, format, or lookup semantics for id beyond what is structured. Baseline 3 applies.

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?

"Get component metadata" states a specific verb and resource, and the description then enumerates exactly what that metadata includes (variants, sizes, accessibility requirements, HTML sample, stateSpecs, anatomy parts). The resource is unambiguous against siblings like get_token, get_rules, and check_html.

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 implied by the resource: given a component id, fetch its metadata. The only explicit guidance — "Prefer these structured fields over inferring states from the HTML sample" — concerns how to interpret the output, not when to choose this tool over siblings such as check_html or get_token. No alternatives or exclusions are named.

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