Skip to main content
Glama
viantonugroho11

@viantotech/mcp-storybook

find_stories_by_source_file

Find Storybook stories for a component by providing its source file path. Resolves which stories correspond to a given file.

Instructions

Reverse lookup: given a component source file path, find matching Storybook stories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceFileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It communicates that this is a read-only discovery operation ('find matching stories'), but it does not disclose match semantics, result format, behavior when no story matches, or path requirements beyond being a component source file path.

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 front-loaded sentence that states the operation type first ('Reverse lookup'), then the input, then the result. Every word earns its place with no redundancy.

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 tool with one simple required parameter and no output schema, the description is reasonably complete: it explains the input and the intended result. It could add detail about output shape or matching behavior, but the low complexity reduces the risk of an agent calling it incorrectly.

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 0%, so the description must compensate. It does so by clarifying that sourceFile is a component source file path, adding meaning beyond the bare parameter name. The parameter is simple and required, so the ambiguity is limited.

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 uses a specific verb ('find') and resource ('Storybook stories'), and clearly frames the operation as a reverse lookup from a source file path. This distinguishes it from siblings like list_stories or search_stories without needing to open their schemas.

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 phrase 'Reverse lookup' implies this tool is specifically for finding stories by source file, which differentiates it from broader search/list siblings. However, there is no explicit guidance on when to prefer this tool over alternatives or 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.