Skip to main content
Glama

Generate and run tests

test_component

Run standalone cloud verification on code you already have: give it a component (filePath/exportName/signature) plus acceptance criteria, and it generates a black-box verification test, validates that test against a mechanical stub, then executes your REAL code against it in the cloud (isolate or container, per stack). No code generation happens here — use build_feature for that. Returns a testId immediately; call stream_test to follow progress and get the pass/fail verdict. Call get_usage_guide for detailed usage guidance.

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": {
      "stackType": "<stackType>",
      "component": "<component>",
      "code": "<code>",
      "acceptanceCriteria": "<acceptanceCriteria>"
    },
    "name": "test_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe REAL implementation to test. Never shown to the model that generates the verification test.
componentYesMUST match the real code exactly — the generated verification test imports/calls by these exact names.
stackTypeYesRuntime target stack: JavaScript/TypeScript ("worker", "typescript", "node", "react"), or Swift/Kotlin when the value starts with "swift"/"kotlin".
contextFilesNoOptional ambient read-only files the code under test may import.
acceptanceCriteriaYesWhat the code must do — the verification test is generated from this alone.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / stackType / description
      Previous value: -"Runtime target stack (JavaScript/TypeScript only at launch), e.g. \"worker\", \"typescript\", \"node\", \"react\"."New value: +"Runtime target stack: JavaScript/TypeScript (\"worker\", \"typescript\", \"node\", \"react\"), or Swift/Kotlin when the value starts with \"swift\"/\"kotlin\"."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false, so the description carries real weight and does: it discloses the internal pipeline (generate black-box test, validate against a mechanical stub, then execute real code in the cloud in an isolate or container per stack) and the async boundary (returns a testId immediately rather than the verdict). That is exactly the behavior an agent needs to plan a call that does compute-heavy work asynchronously.

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?

Four sentences, front-loaded with the core action, followed by scope exclusion, the async contract, and the escalation path. Every sentence carries distinct information and none repeats the previous one.

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

Completeness5/5

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

There is no output schema, and the description compensates by stating what is returned (a testId) and how the final pass/fail verdict is obtained. For a five-parameter tool with a nested component object, nothing an agent needs in order to invoke it correctly is missing.

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 the baseline is 3. The description restates the component shape (filePath/exportName/signature) and the role of acceptance criteria, but those points are already documented in the schema, so it adds little meaning beyond what the parameters themselves declare.

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 opening sentence states a specific verb and resource ('Run standalone cloud verification on code you already have') and the description explicitly contrasts itself with the sibling build_feature ('No code generation happens here'). An agent can tell exactly what this tool does and what it does not do without opening the schema.

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

Usage Guidelines5/5

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

It gives an explicit precondition (you must already have code), names the alternative for the other case (build_feature), and lays out the sequencing: call this, get a testId, then use stream_test for progress/verdict. It even routes to get_usage_guide for deeper guidance, leaving nothing to inference.

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.

Resources