Skip to main content
Glama

Get UI component source code

get_component_code
Read-onlyIdempotent

Get the complete, pre-generated source files of one component for one tested target, with their SHA-256 hashes, setup instructions and pinned dependencies. Vanilla is javascript; React is typescript. Styling is always css.

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>",
      "framework": "<framework>",
      "styling": "<styling>",
      "language": "<language>"
    },
    "name": "get_component_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesComponent id from search_components.
stylingYes
versionNoConcrete version or latest.
languageYes
frameworkYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real context beyond that: the response is pre-generated source with hashes, setup instructions and pinned dependencies, and results are scoped to a single tested target. It does not discuss caching, size limits, or what happens when a version is not published for the given target, leaving some behavioral gaps.

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?

Three short sentences, front-loaded with the core action and payload before the enum constraints. No filler. The phrase 'one tested target' is slightly jargon-heavy and could be clearer, which keeps it off a 5.

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 five parameters and no output schema, the description does the right work by describing the returned artifacts (files, hashes, setup, dependencies). What is missing is the relationship to the sibling get_component and any guidance on the optional version argument, but for a read-only fetch tool the definition is otherwise sufficient to call correctly.

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 only 40%, with framework, styling and language carrying no descriptions, so the description must compensate and largely does: 'Vanilla is javascript; React is typescript' encodes the framework-to-language pairing and 'Styling is always css' explains why the styling enum has a single value. It still says nothing about the optional version parameter's default or what 'latest' resolves to.

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?

States a specific verb and resource: get the complete pre-generated source files of one component for one tested target. It also enumerates the payload (files, SHA-256 hashes, setup instructions, pinned dependencies), which distinguishes it from a metadata-style sibling like get_component. It stops short of naming the sibling it differs from, so the differentiation is implied rather than explicit.

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?

The description gives no when-to-use or when-not-to-use guidance and never mentions get_component or search_components as alternatives. The only routing hint, that the id comes from search_components, lives in the input schema rather than the description. An agent must infer that this is the second step after searching.

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.

Resources