Skip to main content
Glama

get_component_api

Read-only

Retrieve a component's full property API, including prop types, defaults, and options, by passing a component, set, or instance ID. Get structured property data without scanning the entire file.

Instructions

Return a component's full property API — the prop contract behind its instances. Pass a COMPONENT, COMPONENT_SET, or INSTANCE id (an instance resolves to its main component / set). Returns { id, name, type, properties } where properties maps each property name to { type (VARIANT|BOOLEAN|TEXT|INSTANCE_SWAP|SLOT), defaultValue, variantOptions?, preferredValues?, description? }. Property names come back verbatim for set_instance_properties: VARIANT by bare name (e.g. "Size"), BOOLEAN/TEXT/INSTANCE_SWAP suffixed with #id (e.g. "Label#2:0"). Unlike get_local_components (a subtree inventory), this targets one component and is safe on large files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesA COMPONENT, COMPONENT_SET, or INSTANCE node id to read the property API of
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds that it's safe on large files and describes the return format in detail, providing behavioral context beyond the annotation.

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?

Every sentence adds value: purpose, input specification, return format, and differentiation from sibling. No unnecessary words, well structured.

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 single-parameter read-only tool with detailed return description and clear differentiation from siblings, the description is fully sufficient.

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%, but the description adds meaning by specifying acceptable node types (COMPONENT, COMPONENT_SET, INSTANCE) and explaining instance resolution, which goes beyond the generic schema description.

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 explicitly states it returns the property API of a component, specifying verb (Return), resource (component's full property API), and scope (prop contract behind instances). It also distinguishes from sibling get_local_components by noting it targets one component and is safe on large files.

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?

Clear guidance on input types (COMPONENT, COMPONENT_SET, or INSTANCE id) and behavior for instances resolving to main component/set. Contrasts with get_local_components, but does not explicitly state when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server