Skip to main content
Glama

generate_rtl_test

Generate React Testing Library tests with user-event, accessibility queries, async patterns, and MSW mocking

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_rtl_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
withMswNoInclude MSW handler mocks for API calls
withA11yNoInclude jest-axe accessibility assertions
testCasesNoComma-separated test case descriptions
withSnapshotNoInclude snapshot test
componentNameYesComponent name to test
withUserEventNoUse @testing-library/user-event (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/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, yet it only describes generated content, not the act of generation. It does not say whether output is returned as a string or written to a file, whether existing files are overwritten, or what the caller receives — all material for a code-emitting tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or repetition. It is a feature list rather than a structured explanation, but nothing in it is wasted.

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

Completeness2/5

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

With six parameters, no output schema, and no annotations, the definition should explain the return value and file-writing behavior, and it does neither. The feature list covers the toggles but leaves the agent guessing about the most consequential part of invoking a code generator.

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?

Schema description coverage is 100%, so every parameter is already documented, including the default of true for withUserEvent. The description's mention of user-event, accessibility, async patterns, and MSW loosely maps to the boolean toggles but adds no syntax or interaction detail beyond the schema; baseline 3 applies.

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+resource: 'Generate React Testing Library tests,' and enumerates the techniques used (user-event, a11y queries, async patterns, MSW). That distinguishes it from generic Jest/Vitest generators by naming the RTL framework, though it never explicitly contrasts itself with siblings like generate_jest_test or generate_vitest_component_test.

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?

There is no when-to-use or when-not-to-use guidance. An agent must infer from the framework name alone that this is the right generator for React component tests, and the description offers no routing hints toward alternatives such as generate_accessibility_test or generate_snapshot_test even though the toggles here overlap with those tools.

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.