Skip to main content
Glama

Read a component

read_component
Read-onlyIdempotent

Read a TypeScript custom component by class name. Returns the Asset ID and numbered source. Required offset and limit (null for the standard window) window the source. Line numbers are a map; do not copy them into patch_component find. An empty name lists every custom component and its asset id, and the shared modules. name shared/ reads a shared module (src/components/custom/shared/.ts). Does not list uploaded media; use search_assets. Does not list the published elements library; use search_elements. Does not write source. Place the component with patch_film using the returned Asset ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesComponent class name, or shared/<name> for a shared module. Empty lists every custom TypeScript component and shared module.
limitYesNumber of source lines to return. Pass null to read through the cap.
offsetYes1-indexed start line of the source. Pass null with limit to read from the start.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds value beyond that: it discloses the return shape (Asset ID plus numbered source), warns that line numbers are a display map not patch input, and states it does not write source. It stops short of describing the cap size or any limits on large reads.

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?

It is front-loaded with the core purpose and each sentence carries routing or behavioral value. The run of three 'Does not ...; use ...' clauses is slightly repetitive but each maps to a distinct sibling, so waste is minimal.

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?

For a read-only tool with full annotations and 100% schema coverage and no output schema, the description supplies everything an agent needs: name modes, offset/limit windowing, return contents (Asset ID, numbered source), and next-step placement via patch_film.

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 description coverage is 100%, so baseline is 3. The description still adds meaning beyond the schema: it documents the 'shared/<name>' convention with its concrete path (src/components/custom/shared/<name>.ts), the empty-name listing behavior, and the 'null for the standard window' interpretation of offset/limit.

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 opening sentence states a specific verb and resource: 'Read a TypeScript custom component by class name.' It distinguishes itself from nearby siblings (search_assets for uploaded media, search_elements for the published library, patch_component for editing) so an agent can route without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly names alternatives and the conditions that select them: 'Does not list uploaded media; use search_assets' and 'Does not list the published elements library; use search_elements.' It also gives a positive follow-up path ('Place the component with patch_film using the returned Asset ID') and warns against feeding line numbers into patch_component find.

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.