Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ADVERSARY_GATE_POLICYNoGate flags (`--sandbox bwrap`, `--triage jev`, floors). An agent that can pass `--coverage-floor 0` grades itself. Evidence flags here are refused.
ADVERSARY_GATE_PYTHONNoThe interpreter's site-packages are harness too — a plugin installed there runs inside pytest. Use one the agent cannot write to.
ADVERSARY_GATE_BASE_REFNoThe baseline is the oracle: an agent could commit a rewritten test and name that commit as the base. Unpinned, the answer says "baseline_chosen_by": "agent".

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Call verify_repo before reporting a code change as done. merge: a human may look; block: fix the code, not the tests; inconclusive: say what was not measured. Follow next_steps (cover lines, kill a named mutant, add a new test) and call again; never edit existing tests to get there. Policy, baseline and interpreter are the operator's (gate_policy).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
verify_repoA

Judge the working tree of a git repository against a baseline, by running its tests.

When to call: after changing code in ``repo`` and before reporting the task
as done. Call ``gate_policy`` first if you need to know the floors or
whether the baseline is pinned. Python/pytest only; changes in other
languages come back inconclusive.

What it does: writes the baseline commit's tree (every file as committed),
diffs it against the working tree (uncommitted and untracked files
included), runs the suite under coverage.py, then runs the gate: the
claims on the baseline and on the patch, the baseline's copy of any test
the patch rewrote, and mutation testing on the changed lines. Nothing is
committed or reverted.

Side effects: the repository's tests execute -- its code runs, so they may
do whatever they do when you run pytest yourself. The coverage run uses the
repository as working directory; the gate's own files go to a temporary
directory that is removed afterwards. It can take minutes. A run longer
than ``timeout_seconds`` (default 3600: the gate's own full-suite run may
take 900 alone) returns inconclusive, never a pass, and its
``next_steps`` names ``timeout_seconds`` as the limit to raise.

Arguments: ``repo`` is a path inside the git repository. ``claims`` are
pytest node ids (``path::test``) to verify; empty -> discovered from the
tests that executed a changed line. ``pytest_args`` are test paths or node
ids the coverage run collects (default: the whole suite); options such as
``-k`` are refused. ``base_ref`` is used only when the operator did not pin
ADVERSARY_GATE_BASE_REF and turned the requirement off
(ADVERSARY_GATE_REQUIRE_PINNED_BASE=0); it must then be a remote's default
branch or where HEAD left it.

``judged_tree`` is the git tree id of the files judged: the commit that
lands must have it (``git rev-parse <commit>^{tree}``), or it is not what
was judged -- a line edited, a file added or an amend after the answer.
It is taken with no .gitattributes applied: a repository whose attributes
convert line endings or run a filter gets another id for the same files.

Returns ``decision`` (merge / block / inconclusive), ``mergeable``,
``fix_proven``, ``reason``, per-claim results with the oracle used,
``diff_coverage``, ``suite_strength``, ``next_steps`` and the full
artefact. merge permits a human review, not a release; block means fix the
code, not the tests; inconclusive means something was not measured -- say
what. ``next_steps`` lists what would earn a MERGE (cover these lines, kill
this surviving mutant, add a new test, fix the code); do them and call
again. It never asks you to edit an existing test, a harness file or a
floor, and doing so does not help: the baseline's tests are the oracle.
gate_policyA

Show the verification policy this server enforces: floors, baseline, interpreter, and what the caller may set.

When to call: before ``verify_repo``, to learn whether the baseline is
pinned by the operator or chosen by you, which interpreter runs the tests,
and which floors a merge has to clear -- or after an inconclusive or block
answer, to explain it.

Read-only and fast: it runs no tests and changes nothing. The policy comes
from the server's environment (ADVERSARY_GATE_POLICY, _BASE_REF, _PYTHON),
set by whoever configured the server; no tool can change it.

Returns ``version``, ``operator_flags``, ``defaults``, ``baseline``,
``python`` and ``agent_controls`` (the arguments of ``verify_repo`` you
decide). An invalid operator policy returns ``error`` instead.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are cleanly separated: `gate_policy` is a read-only description of the enforced policy, while `verify_repo` performs the actual verification run. Descriptions explicitly cross-reference each other (call `gate_policy` first) and leave no risk of misselection.

Naming Consistency4/5

Both names are snake_case and concise, but they follow different shapes: `verify_repo` is verb_noun while `gate_policy` is noun_noun (a `get_gate_policy`/`show_policy` form would match the pattern). Still predictable and readable as a pair.

Tool Count3/5

Two tools is thin by the general rubric, though it fits this deliberately narrow single-purpose gate: one action plus one policy read. The policy surface is small enough that it could arguably be folded into `verify_repo`'s output, making the second tool marginally justified.

Completeness4/5

The core loop is covered end to end: learn the policy/baseline, run the gate, and receive `decision`, per-claim results, and `next_steps` to iterate. Minor gaps exist around run management—no way to check status of a long run, cancel it, or retrieve prior artifacts after the fact.

Maintenance

ActivityActive
ResponsivenessNo recent community issues