Skip to main content
Glama

Install the PreToolUse hook

install_hook

Install a Claude/Copilot hook that warns when edits reprocess 25+ lines of an indexed symbol or read files over 12KB, merging idempotently with scope and uninstall options.

Instructions

Wire slimdex's write discipline into the CLIENT, which registering the MCP server cannot do — the protocol has no mechanism for a server to add a hook, so this is the one call that closes the gap. Writes a PreToolUse hook that speaks up ONLY when an edit re-sends 25+ lines that an indexed symbol actually covers, or a whole file over 12KB is read. Merges rather than clobbers, is idempotent, and prints exactly what changed. scope: claude-global (default, all your repos) | claude-local | claude-project | copilot-global (VS Code, all your repos) | copilot-project (.github/hooks, COMMITTED). Use uninstall:true to remove it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoWhich config to write. Default claude-global; use copilot-global for a VS Code-only setup.
uninstallNoRemove the hook instead of adding it.
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it mentions the hook triggers only under specific conditions (25+ lines for indexed symbols, 12KB file reads), is idempotent, merges rather than clobbers, and prints what changed. This is comprehensive and goes beyond typical descriptions.

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?

The description is appropriately sized, with three dense sentences that front-load the purpose and then explain behavior and scope. There is no wasted verbiage, though the scope list makes it slightly longer than strictly necessary.

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?

The tool is moderately complex with multiple scopes and an uninstall mode, and no output schema exists. The description covers the purpose, trigger conditions, merge behavior, idempotency, output, and scope options, making it fairly complete for an agent to decide when and how to use it.

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 coverage is 100%, so the baseline is 3. The description adds some extra context for scope values (e.g., 'all your repos', '.github/hooks, COMMITTED'), but this is supplementary to the schema's descriptions and does not significantly change parameter understanding.

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?

The description clearly states what the tool does: it writes a PreToolUse hook into the client, with specific trigger conditions and behavior. It distinguishes itself from siblings by explaining that it is the only way to close the gap since the MCP protocol cannot add hooks from the server.

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?

The description provides clear context for when to use the tool (to wire write discipline into the client) and why it is necessary, but it does not explicitly list alternatives or exclusions. The scope options and uninstall flag offer guidance on configuration, making usage clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Siddhukaushik/slimdex-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server