Skip to main content
Glama

add_constraint

Record a user rule that must never be broken; optionally protect file globs and share the rule team-wide for teammate and CI checks.

Instructions

Record a rule from the user that must never be broken. paths: globs of files the rule protects (guardrail warnings fire when they change). shared: true only when the user asks for a team-wide rule; it is written to .tagteam/constraints.json in the repo, where teammates and CI (tagteam check) see it.

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": {
      "text": "<text>"
    },
    "name": "add_constraint"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
pathsNo
sharedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses that guardrail warnings fire when protected files change and that shared rules land in .tagteam/constraints.json visible to teammates and CI. It stops short of stating duplicate-handling, confirmation response, or whether repeated calls overwrite.

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

Conciseness5/5

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

Three dense sentences, front-loaded with purpose, then parameter-keyed clauses that scan in one pass. No filler and no restatement of the tool name.

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

Completeness4/5

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

Covers the persistence location, the guardrail side effect, and the scoping decision that matters most for a low-parameter write tool with no output schema. Remaining gaps around duplicate handling and return behavior are minor given the tool's simplicity.

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 parameter meaning and it does so for two of three: paths as globs of protected files with the consequence of matching, and shared as a repo-persisted team-wide flag. The required text parameter is only implied by "Record a rule from the user," with no note on format or length.

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 opens with a specific verb+resource ("Record a rule from the user that must never be broken") and adds the durability constraint that distinguishes it from a discussion-oriented sibling like add_decision. It never names a sibling tool, so the differentiation must be inferred from the "must never be broken" framing.

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?

Includes one conditional rule that is genuinely useful: shared is set to true "only when the user asks for a team-wide rule." That is real when-to guidance for a parameter, but there is no guidance on when to record a constraint at all versus when to use add_decision or update_memory.

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