Skip to main content
Glama

get_shadcn_component

Retrieve shadcn/ui component source code and usage examples by component name, with options for React or Svelte and optional demos.

Instructions

Get shadcn/ui component source code and usage examples

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": {
      "componentName": "<componentName>"
    },
    "name": "get_shadcn_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
frameworkNoFramework to get component forreact
includeDemoNoInclude usage examples
componentNameYesName of the shadcn/ui component (e.g., "button", "card", "form")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/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 of behavioral disclosure. It states the tool retrieves source code and examples, implying a read-only operation, but does not specify details like authentication requirements, rate limits, error handling, or output format. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is a single, efficient sentence: 'Get shadcn/ui component source code and usage examples.' It is front-loaded with the core purpose, has no redundant information, and every word contributes to understanding the tool's function. This is an excellent example of conciseness.

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

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage context, and output specifics. The high schema coverage helps, but without annotations or output schema, more completeness would be beneficial for effective agent use.

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?

The input schema has 100% description coverage, clearly documenting all three parameters. The description adds no additional semantic information beyond what the schema provides, such as examples of component names beyond 'button' or 'card', or clarification on what 'usage examples' entail. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get shadcn/ui component source code and usage examples.' It specifies the verb ('Get'), resource ('shadcn/ui component'), and what is retrieved ('source code and usage examples'). However, it does not explicitly differentiate from sibling tools like 'generate_component' or 'create_project', which might have overlapping functionality in a UI component context.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention any prerequisites, context for usage, or exclusions. Given sibling tools like 'generate_component' or 'analyze_design', the lack of differentiation leaves the agent without clear direction on tool selection.

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