Skip to main content
Glama

aegis_scan

Read-onlyIdempotent

Call before editing files to retrieve the governance rules that apply to them, ranked by ledger fitness and capped to the JIT token budget.

Instructions

Call before editing files: returns the governance rules that apply to them, ranked by ledger fitness and clamped to the JIT token budget. Mandatory rules (gates, invariants) take at most two slots; the others are listed in omitted_mandatory. Gates and invariants are served from the reviewed base commit (rules_base); branch-local edits to them never bind and are listed in unreviewed_rules. stale_rules lists rules edited since the last aegis sync. If any rule file cannot be loaded the scan fails (status FAIL) and names it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewNoOptional response projection: full (default), summary or ids.
filesNoWorkspace-relative files you are about to edit. Defaults to the git diff.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses token-budget clamping, the two-slot cap on mandatory rules, the existence of omitted_mandatory, that gates/invariants are served from the reviewed base commit and branch-local edits never bind (unreviewed_rules), staleness semantics, and that an unloadable rule file fails the whole scan with status FAIL. This is exactly the extra behavioral context the structured fields do not carry.

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 trigger condition is front-loaded and each subsequent sentence maps to a distinct output field or failure mode, so little is wasted. It is dense and slightly long, but the density is load-bearing given the absent output schema.

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?

With no output schema, the description must carry the return contract, and it does: it defines omitted_mandatory, rules_base, unreviewed_rules, stale_rules, and the FAIL behavior. An agent knows both how to invoke it and how to read the response.

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 coverage is 100%, so both parameters and the enum values are already documented in the schema. The description references the file set only implicitly ('files you are about to edit'); it adds no format, ordering, or size guidance beyond what the schema states. Baseline 3 applies.

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?

The description gives a specific verb plus resource ('returns the governance rules that apply to them') and a clear scope trigger ('Call before editing files'), which is enough to pick it over a plain rule lister. It never names a sibling tool explicitly (e.g. aegis_list_rules), so the differentiation from siblings is implied rather than stated.

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?

'Call before editing files' is an explicit, actionable when-to-use cue tied to the edit workflow. There is no when-not guidance and no named alternative for the opposite case (e.g. browsing all rules), so it stops short of full operative routing.

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