Skip to main content
Glama

Run tests

run_tests

Execute the project's test suite, auto-detect Vitest, Jest, pytest, or npm test, and return pass/fail counts with a run_id for failure summaries.

Instructions

Run the project's test suite (auto-detects vitest, jest, pytest, or npm test; in remote mode only the server's fixed, configured command runs). Returns pass/fail counts and a run_id; pass the run_id to summarize_test_failures for grouped failures and the source files to fix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoRemote mode only: which allowlisted repo ("owner/repo") to operate on. Optional when only one repo is allowlisted; ignored in local mode.
filterNoOptional test name or file pattern, e.g. "pricing" or "src/pricing.test.ts". Letters, digits, _ - . / and spaces only.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
failedYes
passedYes
run_idYes
runnerYes
commandYes
skippedYes
exit_codeYes
timed_outYes
workspaceYes
duration_msYes
output_tailYes
structured_reportYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=false, idempotentHint=false, and destructiveHint=false. The description adds valuable context beyond annotations: it auto-detects vitest/jest/pytest/npm test, notes that remote mode runs only a fixed configured command, and returns pass/fail counts plus a run_id. It does not contradict any annotation.

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 covers purpose, auto-detection, remote-mode behavior, and return-value routing without waste. Every clause earns its place.

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?

For a test-running tool with an output schema and annotations, the description supplies the missing operational context: what gets auto-detected, how remote mode differs, and what the run_id is for. Nothing an agent needs to call or use the tool 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 schema already documents both 'repo' and 'filter' thoroughly. The description does not add parameter-level semantics beyond what the schema provides, which matches the baseline 3 for high-coverage schemas.

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?

States a specific verb and resource: 'Run the project's test suite', and names the auto-detected frameworks. It also distinguishes itself from the sibling summarize_test_failures by explaining the run_id handoff, so an agent can tell the tools apart without opening schemas.

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

Usage Guidelines4/5

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

Provides clear workflow guidance: use run_tests to execute the suite, then pass the returned run_id to summarize_test_failures for grouped failures. It does not explicitly state when not to use this tool or contrast it with other siblings like search_codebase, but the primary usage context is unambiguous.

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