Skip to main content
Glama

run_unity_tests

Runs Unity Test Framework tests in Edit, Play, or both modes using name, category, group, or assembly filters; returns persisted results and per-test failures.

Instructions

Run Unity Test Framework tests in Edit Mode, Play Mode, or both. Supports exact test names, regex group names, categories, and assembly filters. Results are persisted across Play Mode domain reloads and include bounded per-test failures and output. Test failures are reported with testsPassed=false; they do not make a completed runner operation fail. Requires com.unity.test-framework and a running Unity Editor with BanterMCPBridge installed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_unity_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoTest mode to executeedit
testNamesNoOptional exact full test names
timeoutMsNoHow long this MCP call waits; the run remains queryable if still active
groupNamesNoOptional Unity Test Framework group-name regex filters
maxResultsNoMaximum individual test-case results to retain
assemblyNamesNoOptional test assembly names without .dll
categoryNamesNoOptional NUnit category filters

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.7

TDQS

A3.9/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 does well: it discloses that results persist across Play Mode domain reloads, that per-test failures/output are bounded, that testsPassed=false is the failure signal rather than an error, and that the call can return while the run is still active. It does not mention side effects of Play Mode tests on project state or concurrency limits on parallel runs, which are the main remaining behavioral gaps.

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?

Four tight sentences, front-loaded with the action and modes, then behavior, then prerequisites. No filler, though the dense packing of persistence, failure semantics, and prerequisites in two sentences makes it slightly harder to scan.

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 7-parameter, no-required-parameter tool with no output schema, the description covers what a run produces (test results, bounded failures and output), how failures are signaled, and what environment is required. It omits result-shape detail and how to retrieve results after a timeout, but the essentials for a correct invocation are 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 every parameter is already documented in the schema. The description's summary of filter types (exact names, regex groups, categories, assemblies) largely restates those schema entries, adding little new semantics such as precedence between filters or whether filters combine with AND/OR.

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?

Names a specific verb and resource ('Run Unity Test Framework tests') and scopes it precisely to Edit Mode, Play Mode, or both, which distinguishes it from discover/cancel/get siblings by the word 'Run'. It stops short of explicitly naming an alternative, but the resource and action are unambiguous.

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

Usage Guidelines4/5

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

Provides clear context for use: requires com.unity.test-framework and a running Unity Editor with the bridge installed, and explains that test failures do not fail the operation. It hints at the async workflow ('the run remains queryable if still active') but never explicitly says to use a sibling to poll or to run discover_unity_tests first.

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