Skip to main content
Glama

Run Tests

run_tests

Run the project's test suite in a disposable sandbox and get parsed results, including pass/fail counts and failing test names, to verify the project still works.

Instructions

Run the project's test suite inside a sandbox and parse the results.

USE THIS instead of execute_experiment when you want to know whether the project still works -- it detects the runner (npm, pytest, cargo, go, make) by looking at what is actually in the sandbox, and parses counts out of the output.

RETURNS exit code, stdout/stderr, duration and, when parseable, a summary with passed/failed/total and the names of failing tests. If test_summary.detected is false, trust the exit code, not the zeros.

Pass command to override detection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandNoExplicit test command. Omit to auto-detect.
timeoutNoSeconds before the run is killed.
experiment_idYesThe experiment to test in.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
job_idYes
statusYes
stderrNo
stdoutNo
commandYes
exit_codeNo
frameworkNo
duration_msNo
test_summaryNo
experiment_idYes
stderr_truncatedNo
stdout_truncatedNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Even though no annotations are provided, the description is highly transparent about what the tool does: it detects the runner by inspecting the sandbox, runs the suite, parses test counts, and returns exit code, stdout/stderr, duration, and a summary. It also adds a important caveat about trusting the exit code when test_summary.detected is false.

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 well-structured with clear sections: the core action, usage guidance, return values, and parameter override note. It is concise yet information-dense, with no redundant or vague phrasing.

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?

The description is complete for a tool of this scope: it explains what runs, how detection works, what the output contains, and how to interpret edge cases. It also fits well alongside sibling tools like execute_experiment, making the tool's niche clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are described in the schema, and the description adds useful semantic context beyond the schema. It explains the command parameter's role ('Pass command to override detection'), clarifies timeout as 'Seconds before the run is killed', and identifies experiment_id as the test target.

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 clearly states the action ('Run the project's test suite') and the context ('inside a sandbox'), with the explicit goal of parsing results. It also distinguishes this tool from execute_experiment by specifying that it is for checking whether the project still works.

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?

The description gives explicit guidance on when to use this tool ('USE THIS instead of execute_experiment when you want to know whether the project still works') and explains the auto-detection behavior. It also tells the user how to override detection with the command parameter.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/riyasaxena32/sandbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server