Skip to main content
Glama

generate_snapshot_test

Generate React component snapshot tests (Jest or Vitest, file or inline snapshots), one per props variant

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": "generate_snapshot_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
inlineNo
variantsNo[{name, props}] — one snapshot per variant (default: one with no props)
frameworkNo
importPathNoModule exporting the component (default ./<Component>)
componentNameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / importPath
      Added value: +{
      +  "description": "Module exporting the component (default ./<Component>)",
      +  "type": "string"
      +}
    • addedInput schema / properties / variants
      Added value: +{
      +  "description": "[{name, props}] — one snapshot per variant (default: one with no props)",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "props": {
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the variant-per-snapshot behavior but says nothing about whether files are written to disk and where, whether existing test files are overwritten, or what is returned to the caller — significant gaps for a code-generation tool with side effects.

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 dense sentence that front-loads the resource and packs the framework, mode, and granularity qualifiers without a wasted word.

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 five-parameter generator with no annotations and no output schema, the description covers purpose and most parameter meaning but omits output location, file-writing behavior, and default framework. An agent could invoke it correctly but not predict its side effects.

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 only 40%, but the description compensates well: it maps 'Jest or Vitest' to framework, 'file or inline snapshots' to inline, and 'one per props variant' to variants. Only importPath and componentName are left to the schema's own inline descriptions.

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 gives a specific verb and resource ('Generate React component snapshot tests') and scopes it precisely with the supported runners (Jest or Vitest), snapshot modes (file or inline), and granularity (one per props variant). That is enough to distinguish it from nearby generators like generate_rtl_test or generate_visual_regression_test, though it never names an alternative explicitly.

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 resource: use this when you need snapshot tests for React components. There is no explicit when-not guidance and no routing to siblings such as generate_visual_regression_test or generate_vitest_component_test, so the agent must infer the boundary from the name.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.