Skip to main content
Glama

Install Git Hooks

install_git_hooks

Install a pre-commit hook to sync Project Brain and context with native terminal Git commits, keeping project state current after every commit.

Instructions

Install automated pre-commit hook to sync Project Brain and context with native terminal git commits.

Input Schema

NameRequiredDescriptionDefault
hook_typeNoHook to install ('pre-commit' or 'post-commit').pre-commit
repo_pathNoPath to the git repository (defaults to project root)..

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It discloses the core side effect (a hook is written into the repo that runs on each commit), but says nothing about whether an existing hook is overwritten, whether the operation is idempotent, or what permissions/paths are touched.

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?

A single front-loaded sentence with no filler; the action and outcome lead. It is perhaps too terse given the behavioral gaps, but nothing is wasted.

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 simple (two optional params, output schema present so return values need no explanation), and the description covers what it does and why. The main gap is the pre-commit/post-commit mismatch and unstated hook-overwrite behavior.

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 the schema already defines hook_type and repo_path with defaults. The description adds no meaning beyond that and in fact narrows the tool to 'pre-commit' only, leaving the documented 'post-commit' option unmentioned.

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

Purpose4/5

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

States a specific verb (Install) and resource (git pre-commit hook) plus the effect (syncing Project Brain/context with native terminal commits). It does not differentiate from adjacent siblings like prepare_commit or commit_changes, and it names only 'pre-commit' even though the tool is generic.

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 phrase 'with native terminal git commits' implies the scenario (you commit from a terminal rather than through commit_changes), but there is no explicit when-to-use/when-not-to-use statement or prerequisite such as 'requires an initialized git repo' or 'one-time setup'.

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