Skip to main content
Glama

Install Agent Hooks

install_agent_hooks
DestructiveIdempotent

Installs the aicb symbol guard and harness wiring so C# symbol questions are refused by text search and redirected to semantic code intelligence tools.

Instructions

Install the aicb symbol guard into this project for an agent harness, so a C#-symbol question is REFUSED on a text search and redirected to the tool that answers it. Writes the guard script plus the harness's wiring entry (.claude/settings.json, .codex/hooks.json or opencode.json; for Claude Code also a SessionStart hook that keeps the aicb skill files in step) and nothing else - no .mcp.json, no skills, and only inside the directory of the session's own solution. Omit 'harness' to install for the harness that is calling. An existing guard or wiring is kept unless force=true. Restart or reconnect the client afterwards, then call refresh_session so the session stops reporting the guard as missing.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "install_agent_hooks"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoOverwrite an existing guard script and rewrite an existing wiring entry.
harnessNoWhich harness to install for: claude-code, codex or opencode. Omit to use the harness the calling MCP client belongs to.
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"Session id, or the absolute .sln/.slnx/.slnf path (self-init)."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Although annotations declare readOnlyHint=false, destructiveHint=true and idempotentHint=true, the description adds the substance behind those hints: exactly which files are written (.claude/settings.json, .codex/hooks.json, opencode.json, plus a SessionStart hook), what is deliberately not written (no .mcp.json, no skills), the scope boundary (only inside the session's own solution directory), and the default non-destructive behavior for existing files. That materially sharpens what an agent understands 'destructive' and 'idempotent' to mean here.

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?

Two dense sentences that are well front-loaded: purpose, side effects, scope, defaults, then the post-install procedure. Every clause carries information, though the parenthetical file list and the hook detail make the second sentence heavy.

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 no-output-schema mutation tool with three fully documented parameters, the description covers what is written, what is excluded, where it may write, default-versus-force behavior, and the mandatory follow-up call. An agent has everything needed to invoke it correctly without further inference.

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 100%, so the baseline is 3; the description still adds meaning by framing force=true as the only thing that overwrites an existing guard or wiring entry, and by restating that omitting harness targets the calling client. It adds context rather than duplicating schema text verbatim.

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 and resource ('Install the aicb symbol guard into this project for an agent harness') and immediately explains the effect it produces: a C#-symbol question is refused on text search and redirected to the answering tool. That effect statement distinguishes it from the sibling search/symbol tools without needing to open any 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?

Gives clear operating context: omit 'harness' to target the calling harness, existing guard/wiring is kept unless force=true, and the required follow-up sequence ('Restart or reconnect the client afterwards, then call refresh_session') names the sibling to run next. It lacks an explicit when-not-to-install condition or a contrast with apply_solution_config, so it stops short of full routing guidance.

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