Skip to main content
Glama

install_agent_hooks

Install Claude Code hooks that report tool use, prompts, and sessions to Loupe. Idempotent, backs up settings first, and leaves other tools' hooks untouched.

Instructions

Install the Claude Code hooks that report tool use, prompts and sessions to Loupe. Idempotent (running it twice changes nothing), backed up before writing, and it never touches another tool's hook entries. Opt-in: nothing installs these on its own.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoThe settings file to write. Defaults to ~/.claude/settings.json.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.1

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so well: it discloses idempotency ('running it twice changes nothing'), a pre-write backup, and non-interference with other tools' hook entries. These are exactly the mutation-safety traits an agent needs before writing to a settings file, and none are derivable from the schema.

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 tight sentences, front-loaded with the action, then safety properties, then the opt-in constraint. Every clause earns its place with no filler or repetition of the 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?

For a write tool with no annotations and no output schema, the description covers the safety-relevant behavior (idempotency, backup, scoping) that matters most. It stops short of stating what the call returns or how to confirm/undo the install, a minor gap given no output schema exists.

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% and there is a single optional 'path' parameter already documented in the schema. The description adds no format or path guidance beyond it, so the baseline 3 for high-coverage schemas is appropriate.

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 Claude Code hooks that report tool use, prompts and sessions to Loupe.' This is unmistakably distinct from every sibling (get_*, list_*, reply_*, update_status), all of which are read/query or messaging operations. An agent can route to it without opening the schema.

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?

The 'Opt-in: nothing installs these on its own' line implies the manual trigger condition, but it never states explicitly when an agent should call this versus leaving it alone, nor any prerequisites. No alternatives exist among siblings, so the routing burden is low, leaving usage merely implied rather than spelled out.

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