Skip to main content
Glama

Install Agent Hooks

install_agent_hooks
DestructiveIdempotent

Installs a guard that blocks text-search answers for C# symbol questions and redirects them to semantic tools, writing the harness wiring for Claude Code, Codex, or OpenCode.

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) 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.

Input Schema

TableJSON 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.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds substantive context beyond them: the exact write footprint, the containment rule (only inside the session's own solution directory), the non-destructive default that force overrides, and the operational requirement to restart the client and then call refresh_session so the guard stops being reported missing.

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 purpose and the write footprint before the operational caveats, and every clause carries information. The single dense paragraph is slightly heavy, but there is little that could be cut without losing routing or safety detail.

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?

For a mutating installer with no output schema, the description covers the write scope, the safety default, the containment boundary, and the post-install recovery step. It stops short of describing failure modes (e.g. what happens if sessionId is unknown or the harness is unsupported), but nothing critical for correct invocation is missing.

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 description coverage is 100%, so all three parameters are already documented, including the harness enumeration values and the force overwrite semantics. The description largely restates the schema's 'omit harness' and 'kept unless force=true' behavior rather than adding format or edge-case detail, so the baseline 3 applies.

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 (install), resource (the aicb symbol guard), and precisely scopes what is written: the guard script plus one harness wiring entry, explicitly excluding .mcp.json and skills. It even names the concrete target files (.claude/settings.json, .codex/hooks.json, opencode.json), so the agent can distinguish it from every sibling at a glance.

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 usage conditions: omit 'harness' to target the calling harness, existing guard/wiring is preserved unless force=true, and it names the follow-up sequence (restart/reconnect, then call refresh_session). It does not explicitly contrast against sibling config tools like apply_solution_config or init_solution_config, so it stops short of full alternative routing.

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