Skip to main content
Glama

Get an AI Canvas component (full metadata + source code)

get_component
Read-onlyIdempotent

Retrieves a component’s complete record—metadata, exact TSX source code, and imported icon files—so you can inspect its implementation before installing it.

Instructions

Return the complete record for a single component: metadata + the entire .tsx source code as a string, plus the AI Canvas icon files it imports. Use after the user picks one from a search/list result and wants to see the implementation, or before installing if they want to inspect first. The source is the exact file the CLI install would write into a project.

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

Input Schema

NameRequiredDescriptionDefault
slugYesThe component slug, e.g. "ai-job-cards", "wave-lines", "halo-type". Use exact slugs from list/search results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so safety and repeatability are covered. The description adds genuinely useful context beyond them: the payload is large (full source string plus icon files), and the source is byte-identical to what the CLI install would write, which tells the agent this is the authoritative pre-install inspection path.

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 sentences, front-loaded with the return contents, followed by the trigger and the install-fidelity note. Nothing is repeated or padded, and each sentence carries distinct information.

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

Completeness5/5

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

There is no output schema, so the description must describe the return value, and it does so precisely (metadata + source string + icon files). For a one-parameter read tool with full annotation coverage, nothing an agent needs in order to call it correctly is missing.

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 'slug' parameter is already documented with example values and the instruction to use exact slugs from list/search results. The description adds no syntax, format, or fallback guidance beyond that, so 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?

The description gives a specific verb and resource ('Return the complete record for a single component') and then enumerates exactly what that record contains: metadata, the entire .tsx source as a string, and the imported icon files. That explicit content scope sets it apart from the props-oriented sibling get_component_props without the agent needing to open either schema.

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?

It states a clear usage context: 'after the user picks one from a search/list result and wants to see the implementation, or before installing if they want to inspect first.' This is a concrete trigger tied to preceding list/search calls. It stops short of naming an alternative for when the agent only needs the prop signature rather than the source, so an explicit when-not is missing.

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