Skip to main content
Glama

Run Tests

run_tests

Run project tests in a disposable sandbox and get pass/fail counts, failing test names, and exit code. Auto-detects the test runner for quick verification.

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

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly. It discloses the return contents (exit code, stdout/stderr, duration, parseable summary), and importantly warns that when test_summary.detected is false, the agent should trust the exit code rather than zero counts.

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 compact and front-loaded: purpose first, then usage guidance, then return behavior, then the override hint. Every sentence adds distinct value, and there is no redundant filler.

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 tool operates in a sandbox, has an output schema, and the description explains the key caveat about detection reliability. It covers purpose, alternatives, return semantics, auto-detection, and command override, making it complete for an agent to invoke correctly.

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 all parameters well. The description adds minor reinforcement by saying 'Pass command to override detection,' but it does not substantially add meaning beyond the parameter descriptions already present.

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 states a specific action ('Run the project's test suite inside a sandbox and parse the results') with a clear resource and outcome. It also distinguishes itself from execute_experiment by explicitly naming when this tool should be preferred, so an agent can tell them apart.

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 usage rule: 'USE THIS instead of execute_experiment when you want to know whether the project still works.' It also explains the auto-detection behavior and how to override it with 'command', which gives the agent enough context to decide correctly.

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/AbhiteshPundir/sandbox-mcp'

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