Skip to main content
Glama

nightward_run

Run pytest after code edits to capture behavior, compare it against a human-approved baseline, and return a boundary signal that flags unapproved regressions.

Instructions

Run the tests, capture behaviors, and return the boundary signal.

Call this after every code edit: nightward_status only reports the last run.
path: what pytest runs (relative to the server's working directory); omit it to
run the project's capture suite ([tool.nightward] path, else ".");
dir: omit it - the server gates the store a human started it with
(`nightward mcp --dir`), and any other store is refused; timeout: seconds
before pytest is stopped (the store is then left untouched and the last
report invalidated).
Returns {boundary, unapproved, changes: [{name, kind, group, judged,
judge_model, judge_reason, judge_replayed, rejected, rejected_by, depth,
ask_human}], judged_same,
not_run (approved behaviors whose test was deselected: not checked), narrowed,
stale, incomplete, generated_at, judge, scrub_rules (custom scrub rules of the run
and what they replaced), env_mismatch (changed behaviors approved on another OS or
Python than this run, or null: tell the human - it never makes a breach
acceptable), store (absolute path of the gated
store), path (what pytest ran), warnings: {skipped, failed, errors, deselected,
xfailed, scrubbed,
scrub_unmatched (custom scrub rules that matched nothing), scrub_rules (per custom
rule: values and behaviors it replaced, and whether that changed since the last run),
judge_added (judge ruling files this run added to the store's judge/ dir - a human
commits them with the baseline), pytest_returncode, pytest_output_tail}}.
boundary is one of:
  "intact"     done: no unapproved change;
  "breached"   unapproved changes: fix the code, or ask a human to approve;
  "partial"    nothing unapproved among what ran, but approved behaviors were
               not checked (their test was deselected, see not_run): not done -
               run them (remove the -k/-m selection); you can't waive this;
  "incomplete" nothing unapproved, but capture tests failed or errored
               (see incomplete and pytest_output_tail): fix the tests;
  "stale"      the baseline, capture or rejections moved since the report: run again;
  "unknown"    no report yet: run.
Done means boundary == "intact" and stale is false. Behaviors approved with
semantic=True are judged by the judge the humans committed
([tool.nightward] judge in pyproject.toml, or `nightward mcp --judge`);
"judge" says which, and why it was unavailable if it was. This tool cannot
approve changes: a human does that with the nightward CLI.

Input Schema

NameRequiredDescriptionDefault
dirNo
pathNo
timeoutNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Since no annotations are provided, the description must carry the full burden. It excels by explaining complex behaviors not obvious from the schema, such as the data integrity implications of the `timeout` parameter or the precise meaning of the six different `boundary` states.

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?

While incredibly detailed, the length is necessitated by the extreme complexity of the tool (running a full suite, generating a massive report, and defining six boundary states). The critical information, however, is well-front-loaded.

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

Completeness5/5

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

Despite the lack of an output schema, the description serves as a complete functional specification, defining the purpose of every returned field and the various conditions under which the tool will respond.

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?

With 0% schema description coverage, the description is crucial. It elaborates on the operational meaning of each parameter: `path` defines the pytest scope, `dir` defines the storage security context, and `timeout` defines the data integrity risk.

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 purpose is clearly stated in the first sentence: to 'Run the tests, capture behaviors, and return the boundary signal.' It further distinguishes itself from the sibling tool, nightward_status, by specifying that it must be called after every code edit.

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?

It provides explicit usage context ('Call this after every code edit') and guidance on which parameters to omit based on desired behavior (e.g., omitting `dir` or `path` determines the scope of the test run).

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