Skip to main content
Glama

constrain

Record a constraint the work must respect, scoped to a single thread or the whole repository, and supersede it later when the rule changes. Captures the statement, reason, and source prompts.

Instructions

Record a constraint the work must respect (e.g. 'existing API contract must not break'). authority='user' or 'agent'. scope='thread' (default) or 'repo' (holds for every thread of this repository). Change later with supersedes=. source_refs = the prompt id(s) it comes from (the id from the prompt's "casebook source_ref: " line, or on a chat client the id add_utterance returns. Required with authority='user'.) FIRST LINE = TITLE: at most 120 columns (CJK counts as 2), no ' — ' joiner, and no record numbers (#517, D15635, 확장 122호, turn 80, commit hashes) — a person reads that line on the screen; put the rest after a blank line as the body. The paragraph right under the title is read on the screen too, so no record numbers there either; they go in a later paragraph or evidence_ids (the server refuses otherwise). reason follows the same first-line rule.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "case_id": "<case_id>",
      "statement": "<statement>"
    },
    "name": "constrain"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNothread
reasonNo
captureNo
case_idYes
authorityNoagent
statementYes
supersedesNo
source_refsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and discharges much of it: it discloses that scope='repo' persists across every thread of the repository, that source_refs is mandatory under authority='user', and that the server actively refuses record numbers in the title and the paragraph immediately beneath it. It does not explain what 'capture' does to side effects or what the response contains, leaving a gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, which is right, but the remainder is a dense run-on that mixes parameter docs with multi-clause rendering rules ('no — joiner', 'CJK counts as 2', four example record-number formats) in one paragraph. Every rule appears to be server-enforced, so little is truly wasted, but the absence of any break or grouping hurts scanability.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the validation behavior is unusually well covered. Still, for an 8-parameter mutation tool with zero schema descriptions, unexplained `capture` (a boolean whose effect is opaque) and undocumented `case_id`/`statement` semantics leave real ambiguity about what the call actually does.

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 0%, so the description must supply the enum space and it does — scope gets its two values with thread as default, authority gets its two values, and supersedes and source_refs get real semantics including derivation of prompt ids. Three of eight parameters (case_id, statement, capture) receive no explanation at all, which keeps it below a top score.

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 opening clause gives a specific verb+resource ('Record a constraint the work must respect') plus a concrete example, so the intent is unmistakable. It never names a sibling to contrast with (e.g. declare/note_turn/define), so the agent must infer the boundary from the resource noun alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the tool captures durable constraints with scope and authority, and the description explains that later changes go through supersedes=<constraint id>, which is genuinely useful routing. However there is no explicit 'use this instead of X when Y' guidance and no exclusions for overlapping siblings like declare or note_turn.

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