Skip to main content
Glama

spawn_audit_math

Audit numeric invariants in game functions without a browser. Sweeps input domains and reports exact arguments causing NaN, Infinity, divide-by-zero, or bound violations.

Instructions

Run declared numeric invariants over the game's pure functions, locally: no browser, no live room, no push, no credentials. Sweeps each function across its declared input domain and reports the exact arguments that broke a rule. Catches what playing the game catches slowly and unreliably — NaN and Infinity, divide-by-zero at boundary inputs, difficulty curves that flatten or invert, values escaping their declared bounds. Reads audit/math.json by default; pass manifest for another path or checks to try one inline without writing a file. Use spawn_audit_scan first to see what is auditable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonNoReturn the full machine-readable report instead of the compact summary
checksNoInline checks, same shape as the manifest's `checks`. Overrides the file.
manifestNoManifest path, relative to the project. Default audit/math.json
projectDirNoAbsolute path to the Spawn game project. Defaults to SPAWN_PROJECT_DIR or cwd.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.5/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 execution is local with 'no browser, no live room, no push, no credentials,' and that it sweeps the declared input domain and reports exact failing arguments. It stops short of stating the read/write profile of the project (the 'without writing a file' clause only hints at it) and says nothing about failure exit behavior or runtime limits.

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?

Front-loaded with the core action and scope before the elaboration, and the parameter notes come last. The em-dash enumeration of failure classes (NaN, Infinity, divide-by-zero, flattened curves, out-of-bounds values) is slightly long but each item adds discriminating 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?

No output schema exists, so the description must imply the return shape; it does so by promising 'the exact arguments that broke a rule' and the `json` param documents 'full machine-readable report instead of the compact summary.' Combined with the local-execution and prerequisite context, an agent has enough to call it correctly, though the precise report structure is only sketched.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema for two params: it clarifies that the default manifest is read from audit/math.json and that `checks` is an inline alternative that overrides the file without writing one. It says nothing extra about `json` or `projectDir`, which is acceptable given full schema coverage.

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 and resource: 'Run declared numeric invariants over the game's pure functions, locally.' It further scopes the tool against siblings by naming spawn_audit_scan as the discovery step and contrasting with 'playing the game,' so an agent can place it precisely among the audit tools.

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?

Explicitly says 'Use spawn_audit_scan first to see what is auditable,' which is a concrete prerequisite and alternative. It also gives the usage context ('catches what playing the game catches slowly and unreliably'), so the when-to-use case is unambiguous.

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