Skip to main content
Glama

Get Component Source

get_component_source
Read-onlyIdempotent

Read an exact component source as complete JSON. Supply sourceVersionId from the selected catalog card to read that immutable revision, retaining sourceSnapshot with its complete versioned definition, manifest and template beside its exact pin and schema metadata. For an explicitly selected builtin, also supply builtinCollection:'native'|'curated-definitions' and its exact sourceVersionId; without builtinCollection resolution is scoped to the authenticated org. An unavailable exact pin refuses; never retry a head or another scope. To fork, keep the version-4 snapshot whole, change its componentId (the template root's data-composition-id too) and template, and send it to create_component. Builtins always require an exact collection and pin; ID-only builtin reads are refused. Declared slots are bound per placement in execution.assets, never caller params.

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": {
      "componentId": "<componentId>"
    },
    "name": "get_component_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
componentIdYescomponentId (path).
sourceVersionIdNo
builtinCollectionNo

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
originNo
sourceNo
tokensNo
examplesNoUsage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back.
manifestNo
tsxSourceNo
propSchemaNo
descriptionNo
ejectedFromNo
metadataStatusNoHistorical source-only reads omit unavailable discovery name/description instead of borrowing current metadata.
sourceSnapshotNoImmutable source snapshot: a version 4 template, a retired version 3 TSX module, or the historical version 2 source of a component stored before versioned sources (read-only; it never executes). source remains provenance.
sourceVersionIdNoExact immutable source pin; distinct from bundle revisions.
durationInFramesNo
componentVersionIdNoExact owned source history row; equal source hashes can have different ancestry.
registryProvenanceNoServer-derived acquisition ancestry for this exact source row; pending is not captured qualification or portable closure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / componentVersionId
      Added value: +{
      +  "description": "Exact owned source history row; equal source hashes can have different ancestry.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / registryProvenance
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Server-derived acquisition ancestry for this exact source row; pending is not captured qualification or portable closure.",
      +  "properties": {},
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / sourceSnapshot / description
      Previous value: -"Canonical immutable source snapshot (version 4 template, or a retired version 3 TSX module); source remains provenance."New value: +"Immutable source snapshot: a version 4 template, a retired version 3 TSX module, or the historical version 2 source of a component stored before versioned sources (read-only; it never executes). source remains provenance."
  3. Changed7 schema fields changed
    • removedOutput schema / properties / manifest / additionalProperties
      Removed value: -{}
    • removedOutput schema / properties / manifest / properties
      Removed value: -{}
    • removedOutput schema / properties / manifest / type
      Removed value: -"object"
    • removedOutput schema / properties / sourceSnapshot / additionalProperties
      Removed value: -{}
    • changedOutput schema / properties / sourceSnapshot / description
      Previous value: -"Canonical immutable v3 source snapshot; source remains provenance."New value: +"Canonical immutable source snapshot (version 4 template, or a retired version 3 TSX module); source remains provenance."
    • removedOutput schema / properties / sourceSnapshot / properties
      Removed value: -{}
    • removedOutput schema / properties / sourceSnapshot / type
      Removed value: -"object"
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, it discloses that unavailable exact pins refuse, head or alternative scopes must never be retried, builtins require exact collection and pin, ID-only builtin reads are refused, and caller params cannot bind slots. These are concrete behavioral constraints that materially affect invocation.

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?

The purpose is front-loaded and most sentences carry distinct information about scoping, refusal behavior, and forking. The single dense paragraph packs in multiple concepts and includes some fork-adjacent detail, making it slightly heavier than necessary but still efficient.

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?

Given the output schema and safety annotations, the description covers the key read-path semantics: immutable pinning, builtin collection requirements, scoping, refusal behavior, and fork handoff. It remains a bit thin on how componentId should be obtained or interpreted, but overall it is sufficiently complete for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%, but the description compensates by explaining sourceVersionId as an exact immutable pin from a catalog card and builtinCollection as required for explicitly selected builtins with org-scoped resolution otherwise. It says little about componentId beyond the fork note, leaving one parameter less covered.

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 opens with a specific verb and resource: read an exact component source as complete JSON. It distinguishes exact immutable revision reads from head/retry behavior and from forking via create_component, so an agent can identify the tool's role.

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 gives clear operational guidance: supply sourceVersionId from the selected catalog card, include builtinCollection for builtins, and use create_component after modifying a snapshot to fork. It does not explicitly compare against preview_component or resolve_builtin_component, so the alternative-selection guidance is strong but not complete.

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.