Skip to main content
Glama

run_command

Execute a project's configured test or setup command by selector at the root or in a verified worktree, returning exit code and recent output.

Instructions

Run this project's configured test or setup command — by selector, never as a command string — at the project root or for a verified worktree, returning the exit code and the last 64 KB of its output. Worktree tests run in a detached checkout of the branch head under .cross-agent/gate/ and journal tested on success. A passing test run at the root after the merge journals the slug's tests-passed step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNo
whereYes
whichYes
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers real behavioral detail: the return payload (exit code plus last 64 KB of output), where worktree tests execute (detached checkout of the branch head under .cross-agent/gate/), and a side effect (journaling tested on success). It still omits timeout behavior and whether 'setup' commands mutate anything, so it falls short of fully compensating for the missing annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the selector constraint are front-loaded in the first clause, with the return payload defined before the operational nuances. It is dense and jargon-heavy ('journals the slug's tests-passed step'), but nearly every clause carries distinct information.

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?

Given no output schema, the description correctly specifies the return value (exit code + truncated output), and it covers the root-vs-worktree execution model and journaling side effects. It is close to complete, missing only timeout semantics and any prerequisite/permission context.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does for most params: 'which' is explained as the test/setup selector, 'where' as project root or verified worktree, and 'slug' is tied to journaling ('the slug's tests-passed step'). Only 'timeout_seconds' is left unexplained, making coverage strong but incomplete.

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+resource ('Run this project's configured test or setup command') and immediately scopes it ('by selector, never as a command string'), which distinguishes it from any generic shell-execution sibling. It also names the target ('project root or a verified worktree'), so an agent can identify the operation without opening the schema.

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?

The description implies context via 'project root or for a verified worktree' and the test/setup selector, but never states when to use this versus alternatives like verify_worktree or git_mutate, nor any prerequisites or when NOT to use it. Usage is inferable but not explicit.

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