Skip to main content
Glama

get_component_source

Retrieve the source code of any UI component file across React, Vue, Angular, React Native, or Flutter by specifying framework, component ID, and file name.

Instructions

Read the source code of a specific component file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesComponent ID
fileYesFile name (e.g. Button.tsx)
frameworkYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. The word 'Read' implies a safe read-only operation, but the description does not state whether the full file is returned, how errors or missing files are handled, or whether any special permissions/framework context are needed.

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 sentence with no filler or redundancy; the core action is front-loaded. It is appropriately concise for a simple tool, though it sacrifices useful context for brevity.

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

Completeness2/5

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

For a tool with three required parameters and no output schema, the description is minimal. It does not clarify return format, the meaning of the framework parameter in practice, or how 'file' should be specified relative to the component, leaving significant gaps for an agent.

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 67%, with id and file already described in the schema and framework constrained by an enum. The description itself contributes no parameter-level meaning, so it adds little beyond the structured schema, but the schema covers most of the burden.

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 clear verb ('read') and a specific resource ('source code of a specific component file'), which effectively conveys the core action and object. However, it does not differentiate this tool from the sibling get_component, so an agent must infer the boundary from the name alone.

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?

No guidance is given about when to use this tool versus siblings like get_component or search_components. There are no usage contexts, prerequisites, or exclusions stated, leaving the agent to guess based on the tool name.

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