Skip to main content
Glama
AlexCruzGargallo

ui-react-mcp

Get usage example

get_usage_example

Generate JSX usage examples for React library components and validate optional props against the library, reporting invalid variants or sizes instead of using them silently.

Instructions

Generates a JSX example for a component. Optional props are validated against the library, so invalid variants or sizes are reported instead of silently used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesComponent name, e.g. Button
propsNoProps to include, e.g. { "variant": "danger", "size": "small" }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that optional props are validated against the library and that invalid variants/sizes are reported rather than silently used, but says nothing about error shape on invalid input, or whether the call is side-effect free.

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 tight sentences with zero filler, and the core action ('Generates a JSX example') is front-loaded before the validation caveat.

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?

No output schema exists, but the description characterizes the return value as a JSX example and explains the validation behavior for the nested props object. Close to complete for a two-parameter generator; only error/return details are left implicit.

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 100%, so the baseline is 3, and the description goes slightly beyond it by clarifying that the props parameter is validated against the library's accepted variants/sizes rather than passed through verbatim.

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?

States a specific verb and artifact: 'Generates a JSX example for a component.' This is clearly distinguishable from the read-oriented siblings (list_components, get_component, search_components), though it never names them explicitly to sharpen the contrast.

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

Usage Guidelines3/5

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

Usage is implied by the verb 'Generates' – an agent can infer this is the tool for getting example code – but there is no explicit when-to-use statement, no when-not, and no routing to or away from the sibling tools.

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