Skip to main content
Glama

aegis_capture_insight

Capture user corrections or preferences as rule curation insights, letting agents log what went wrong so recurring project rules can be reviewed and improved.

Instructions

Appends a user correction or preference to ~/.aegis/insights/ for rule curation; use aegis_report_outcome to report whether rules helped. Secrets are redacted, quote is cut to 300 characters and paths default to the dirty git paths. Agent captures stay at level: 'suggestion': invisible to aegis_scan, never counted by aegis rule insight review, never upgraded. Capped at 50 captures per session and rate-limited to 5 calls per 60 seconds.

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": {
      "quote": "<quote>"
    },
    "name": "aegis_capture_insight"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsNoPaths it applies to (psrc 'explicit'; at most 20 of 512 chars); default: up to 20 dirty git paths (psrc 'dirty').
quoteYesThe user's verbatim correction (1-1024 chars); secrets are redacted and 300 chars stored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv4.4.0
    • changedInput schema / properties / paths / description
      Previous value: -"Optional workspace-relative file paths this correction applies to (sets psrc='explicit'). When omitted or empty, defaults to currently modified git worktree paths (psrc='dirty')."New value: +"Paths it applies to (psrc 'explicit'; at most 20 of 512 chars); default: up to 20 dirty git paths (psrc 'dirty')."
    • addedInput schema / properties / paths / items / maxLength
      Added value: +512
    • addedInput schema / properties / paths / maxItems
      Added value: +20
    • changedInput schema / properties / quote / description
      Previous value: -"Non-empty verbatim quote of the user's correction or preference (1-1024 chars; secrets are automatically redacted and stored text is capped at 300 chars)."New value: +"The user's verbatim correction (1-1024 chars); secrets are redacted and 300 chars stored."
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "error": {
      -      "description": "Error message when status='FAIL'.",
      -      "type": "string"
      -    },
      -    "id": {
      -      "description": "Content-addressed insight identifier ('ins-<12-hex>').",
      -      "type": "string"
      -    },
      -    "level": {
      -      "description": "Corroboration tier: 'suggestion' initially, or 'W2' when matched to a hook-captured user prompt in the same session.",
      -      "enum": [
      -        "suggestion",
      -        "W2"
      -      ],
      -      "type": "string"
      -    },
      -    "paths": {
      -      "description": "Workspace-relative file paths associated with this insight.",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "psrc": {
      -      "description": "Path provenance: 'explicit' when caller supplied paths, or 'dirty' when inferred from git status.",
      -      "enum": [
      -        "explicit",
      -        "dirty"
      -      ],
      -      "type": "string"
      -    },
      -    "status": {
      -      "description": "'OK' when the insight row was appended, or 'FAIL' on validation/storage error.",
      -      "enum": [
      -        "OK",
      -        "FAIL"
      -      ],
      -      "type": "string"
      -    },
      -    "text": {
      -      "description": "Secret-redacted and length-capped (max 300 chars) correction quote stored in the ledger.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "status",
      -    "id",
      -    "level",
      -    "text",
      -    "paths",
      -    "psrc"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed3 schema fields changedv4.3.4
    • changedInput schema / properties / paths / description
      Previous value: -"Optional workspace-relative file paths this correction applies to."New value: +"Optional workspace-relative file paths this correction applies to (sets psrc='explicit'). When omitted or empty, defaults to currently modified git worktree paths (psrc='dirty')."
    • changedInput schema / properties / quote / description
      Previous value: -"Quote of the user's correction (redacted and capped at 300 chars)."New value: +"Non-empty verbatim quote of the user's correction or preference (1-1024 chars; secrets are automatically redacted and stored text is capped at 300 chars)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "error": {
      +      "description": "Error message when status='FAIL'.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "Content-addressed insight identifier ('ins-<12-hex>').",
      +      "type": "string"
      +    },
      +    "level": {
      +      "description": "Corroboration tier: 'suggestion' initially, or 'W2' when matched to a hook-captured user prompt in the same session.",
      +      "enum": [
      +        "suggestion",
      +        "W2"
      +      ],
      +      "type": "string"
      +    },
      +    "paths": {
      +      "description": "Workspace-relative file paths associated with this insight.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "psrc": {
      +      "description": "Path provenance: 'explicit' when caller supplied paths, or 'dirty' when inferred from git status.",
      +      "enum": [
      +        "explicit",
      +        "dirty"
      +      ],
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "'OK' when the insight row was appended, or 'FAIL' on validation/storage error.",
      +      "enum": [
      +        "OK",
      +        "FAIL"
      +      ],
      +      "type": "string"
      +    },
      +    "text": {
      +      "description": "Secret-redacted and length-capped (max 300 chars) correction quote stored in the ledger.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "id",
      +    "level",
      +    "text",
      +    "paths",
      +    "psrc"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Despite only carrying readOnlyHint=false, the description discloses the behaviors an agent actually needs: secret redaction, 300-char quote truncation, dirty-git-path defaults, suggestion-level invisibility to aegis_scan and rule review, no upgrading, a 50-per-session cap and 5-per-60s rate limit. This is a mutation tool and the side effects and limits are fully spelled out.

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?

Front-loaded with the action and the primary alternative in the first clause, and every subsequent clause carries a distinct fact (redaction, truncation, level, rate limits) rather than filler. It is dense and semicolon-packed, which slightly taxes scanning, but nothing is wasted.

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 two-parameter mutation tool with no output schema and minimal annotations, the description covers persistence location, side effects, visibility, caps, and rate limits. Nothing an agent needs in order to call it safely and correctly is missing.

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?

With 100% schema coverage the baseline is 3, but the description adds meaning beyond the schema: it clarifies that a 1024-char quote is truncated to 300 stored characters, and confirms the dirty-git-path default for paths. This meaningfully complements rather than repeats the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (appends) and resource (user correction or preference written to ~/.aegis/insights/ for rule curation), and explicitly distinguishes itself from the sibling aegis_report_outcome. An agent can tell exactly which tool to pick without opening a schema.

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?

Explicitly routes the agent: use this to capture a correction/preference, use aegis_report_outcome to report whether rules helped. That is a concrete alternative with a selection condition. It lacks an explicit 'do not use when' clause, keeping it just under a 5.

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