Skip to main content
Glama
viantonugroho11

@viantotech/mcp-storybook

get_component_usage

Generate copy-paste-ready import and JSX code for any component from Storybook argTypes and preset args, so you can integrate components without writing boilerplate.

Instructions

Get copy-paste-ready component usage code (import + JSX) built from story argTypes and preset args.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo
variantNo
componentNameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the safety disclosure burden; 'Get' implies a non-mutating read and the phrase 'built from story argTypes and preset args' reveals the source data. However, it does not mention failure modes (e.g., missing story/component, unknown variant) or whether the code is fetched live versus generated statically. The transparency is adequate for a simple getter but has clear gaps.

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?

A single sentence that front-loads the key output ('copy-paste-ready component usage code') and packs import/JSX and the data source into a parenthetical and a trailing phrase. Every word earns its place, with no redundant repetition of the tool name.

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?

For a tool with no output schema and no annotations, the description explains what is returned (import + JSX code) but not how the optional parameters shape that return value. An agent could call with only componentName, but would be guessing about format and variant semantics. The core behavior is captured, yet the missing parameter guidance leaves the description incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description had to explain format, variant, and componentName, but it only alludes to component-level input. 'tsx' vs 'jsx' and the meaning of 'variant' are left entirely to the schema, and no mapping between 'preset args' and the variant parameter is given. The clue about 'story argTypes and preset args' is the only extra semantic it contributes.

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 names a specific verb ('Get') and a concrete, distinctive resource ('copy-paste-ready component usage code (import + JSX)'), and explains the source ('story argTypes and preset args'). This makes it clear the tool emits a code snippet rather than metadata or story content, which separates it from siblings like get_component or get_story. It stops short of explicitly naming alternative tools, so it gets a 4 rather than a 5.

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?

The description implies the right use case: when an agent needs a ready-to-paste usage snippet for a component. It does not state when not to use it or point to an alternative tool, so an agent must infer selection from the sibling names. That is adequate but not explicit.

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