Skip to main content
Glama

run_tests

Execute automated pytest tests inside the repository sandbox to validate code changes, then receive exit code, pass/fail counts, duration, and output summary for quick failure diagnosis.

Instructions

Execute automated pytest tests within the repository sandbox.

Args: test_target: Optional relative test file or test node (e.g. 'tests/test_math.py::test_add'). timeout_seconds: Maximum time allowed before terminating process (default: 30s).

Returns: JSON string with exit code, passed/failed counts, duration, and output summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_targetNo
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description bears the full burden of explaining behavior. It discloses timeout termination and return structure, which is useful, but it does not mention potential side effects of running tests, resource usage, or whether the sandbox fully isolates the process.

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, front-loaded with the core purpose, and uses a clear Args/Returns structure. Every sentence contributes useful information without redundancy or filler.

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

Completeness4/5

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

For a tool with two optional parameters, the description covers behavior, parameters, and return format. The main gap is the lack of guidance about when to use this instead of get_test_output, but the presence of an output schema and clear parameter docs make it mostly complete.

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?

Schema coverage is 0%, so the description must explain the parameters itself. It fully does: test_target is described as a relative file or node with a concrete example, and timeout_seconds includes its default and meaning. This adds substantial meaning beyond the raw schema.

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 verb ('Execute'), a well-defined resource ('automated pytest tests'), and a context ('repository sandbox'). This clearly distinguishes it from siblings like get_test_output, which retrieves results rather than running tests.

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?

The description tells what the tool does but gives no explicit guidance on when to choose it over alternatives such as get_test_output or apply_patch. There is no mention of when not to use it, prerequisites, or how it relates to sibling tools.

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