Skip to main content
Glama

run_tests

Runs Foundry tests and returns compact failure summaries with decoded reasons, fuzz counterexamples, invariant sequences, logs, and clear errors when tests did not run.

Instructions

Run forge test and return a compact summary: counts, and for each failing test its kind (unit, fuzz, invariant, setup), decoded reason, fuzz counterexample or invariant call sequence, and console logs. isError means the tests did not run (compile error, no matching tests, timeout, missing forge, …); never report that as passing.

Input Schema

NameRequiredDescriptionDefault
tracesNoAttach a decoded trace excerpt to the first 5 failures (a second, text-mode forge run). Default true.
fuzz_runsNoOverride fuzz runs. A value below the project setting is reported as reduced; do not use it to make tests pass.
max_bytesNoResponse size budget in bytes (default 8192).
match_pathNoOnly run test files matching this glob.
match_testNoOnly run test functions matching this regex.
match_contractNoOnly run test contracts matching this regex.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it explains the compact summary contents, failure kinds, decoded reasons, counterexamples, logs, and the critical `isError` semantics. It does not mention side effects such as build artifact writes or permission requirements, but the core behavioral contract is clearly disclosed.

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?

Two dense sentences with zero waste. The primary action and return shape are front-loaded, followed by the essential error-handling caveat.

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 test runner with optional filters and no output schema, the description sufficiently explains what is returned and how errors should be interpreted. It could be slightly more complete by mentioning how it relates to sibling tools or by noting potential build side effects, but the essential context is present.

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 six optional parameters in detail. The description adds no parameter-specific information beyond what the schema provides, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Run `forge test`') and resource/action, plus the exact return shape. It is clear what the tool does, but it does not explicitly distinguish itself from siblings like `explain_failure` or `build`.

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

Usage Guidelines3/5

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

Provides an important usage caveat about `isError` not meaning passing tests, but gives no explicit guidance on when to choose this tool versus `explain_failure` or `build`. Usage is implied by the test-running purpose rather than stated as a decision rule.

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

Deploy Server

Other Tools