Skip to main content
Glama

guard_brief

Read-onlyIdempotent

Generates a compact pre-agent brief from the project store so scripts, CI jobs, or plain MCP clients can reuse the same context injected before each turn.

Instructions

The compact pre-agent brief, built from this project's store.

Use it when you need the same context the pi extension re-injects before a turn and no extension is running (another runtime, a script, a CI job, or a plain MCP client): the owner task, the contract with both additive budgets (owner rows, then seed rows), the newest owner statements, durable precedents, trusted decisions and corrections, unverified agent notes, tag- matched recall, open loops, and the last verify run with its trust label. Anything a cap dropped is announced with a +N more … line naming the read path, so the brief never silently omits context. Every line is rendered by the same functions the extension uses (protect_context.brief), so the two runtimes cannot drift. It returns the brief as one newline-separated string. limit is an int, default 20. Side effects: none — it does not create .agent-guard/, does not append, and does not change state.

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": "guard_brief"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many brief lines to return. Integer. Default 20. Clamped to at least 1; the brief itself is already capped by section, so this only bounds the view.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.1

TDQS

A4/5.0
Behavior4/5

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

Beyond the given annotations it discloses that capped sections are announced with a `+N more …` line naming the read path, so context is never silently dropped — a genuinely useful behavioral guarantee. It also states it renders via the extension's own functions so runtimes cannot drift, and that output is one newline-separated string; the side-effects sentence largely restates the readOnly/destructive annotations but adds the concrete detail that it does not create `.agent-guard/`.

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 purpose and the when-to-use condition are front-loaded, and the section inventory is dense rather than padded. There is mild redundancy at the end — the newline-separated-string return format is covered by the output schema, and the side-effects clause mostly repeats annotations.

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?

For a single optional-parameter read tool with an output schema, the description covers contents, truncation policy, runtime-parity guarantee, return shape, and side effects. The only unstated edge is behavior when the project store is empty or absent, which is minor.

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% and the schema already documents the default, integer type, clamping, and per-section capping. The description's "`limit` is an int, default 20" duplicates that without adding new meaning, so the baseline of 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 concretely states what the tool returns: a compact pre-agent brief assembled from the project store, enumerating its sections (owner task, contract with budgets, statements, precedents, decisions, notes, recall, loops, last verify). It also frames it as the aggregate brief the pi extension re-injects, which implicitly separates it from narrower siblings like guard_contract or guard_recall, but never names an alternative explicitly.

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?

It gives a clear trigger condition: use it when you need the extension's pre-turn context and no extension is running, with concrete scenarios (another runtime, a script, a CI job, plain MCP client). It stops short of stating when NOT to use it (e.g., inside the pi extension itself) or naming which sibling to prefer for a single section.

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