Skip to main content
Glama
dmjacas
by dmjacas

get_component_source_code

Inspect the React/TypeScript source code of a HeroUI v2 component to understand its hooks and ARIA wiring. Get a valid slug from list_components first.

Instructions

Get the React/TypeScript source implementation of a HeroUI v2 component from packages/components//src on GitHub. Useful for understanding internals, hooks and ARIA wiring. Do NOT copy this directly — import the component from @heroui/react or its individual package instead. Use list_components first to get a valid slug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentYesComponent slug as returned by list_components, e.g. "button".
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the location on GitHub and the licensing/usage restriction (do not copy, import instead). However, it does not mention what the return format is (e.g., raw file content, lines of code) or if there are any rate limits or authentication requirements, leaving a minor transparency gap.

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?

Two sentences, front-loaded with purpose, followed by usage guidelines, and no wasted words. Every sentence is essential.

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?

For a simple tool with 1 parameter and no output schema, the description covers purpose, usage guidance, and the source location. It provides a complete picture for an agent to use the tool effectively, though a brief mention of the return value (raw source code) would round it out.

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% and there is only one parameter, so the baseline is 3. The description adds value by specifying that the component slug should be exactly as returned by list_components and gives 'button' as an example, which clarifies the expected format beyond the plain schema 'string' type.

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 states the specific verb 'Get', the resource 'React/TypeScript source implementation of a HeroUI v2 component', and the location 'from packages/components/<pkg>/src on GitHub'. It clearly distinguishes from siblings like get_component_docs and list_components by specifying exactly what source code is retrieved.

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?

The description explicitly states when to use the tool ('useful for understanding internals, hooks and ARIA wiring'), includes a critical 'not to do' (do NOT copy directly) with the correct alternative (import from package), and provides a prerequisite step ('Use list_components first to get a valid slug'). This is excellent usage guidance.

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/dmjacas/heroui-v2-mcp'

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