Skip to main content
Glama
MCP Pre-commit Manager

MCP Pre-commit Manager

by ars-system

setup_git_and_precommit

Sets up Git and pre-commit hooks by auto-detecting project type and generating appropriate configurations for Python, JavaScript, or TypeScript.

Instructions

Use this tool to automatically set up git and pre-commit hooks for a project. This tool will: 1) Initialize a git repository if one doesn't exist (runs 'git init'), 2) Detect the project type automatically (Python/JS/TS), 3) Create a .pre-commit-config.yaml file with appropriate hooks for the project type, 4) Install the pre-commit hooks (runs 'pre-commit install'). For Python projects: Sets up pre-commit framework with Black, Flake8, isort, and common hooks. For JS/TS projects: Sets up Husky + lint-staged with ESLint and Prettier. Call this tool when the user wants to 'set up', 'initialize', 'install', or 'configure' git or pre-commit hooks.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "setup_git_and_precommit"
  }
}

Input Schema

NameRequiredDescriptionDefault
repo_pathNoAbsolute path to the repository to set up. If not provided, defaults to current working directory.
force_project_typeNoForce a specific project type instead of auto-detection. Use this when auto-detection fails or user specifies a particular setup.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the concrete side effects: git init when absent, writing .pre-commit-config.yaml, and running pre-commit install. It omits risk-relevant behavior for a mutating tool — what happens if .pre-commit-config.yaml already exists (overwrite vs. skip), whether package manager installs/network access occur for husky or ESLint, and whether changes are reversible.

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 purpose sentence followed by a numbered action list and a per-language breakdown — easy to scan and well ordered by decreasing importance. Slightly redundant, since the opening line and the closing 'call this tool when' sentence restate the same intent.

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 two-parameter, zero-required setup tool with no annotations or output schema, the description covers the action sequence, per-ecosystem behavior, and invocation triggers. Remaining gaps are the return value (what the agent should expect to report back) and behavior on a repo that already has hooks configured.

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 both parameters are already documented, and the description adds only the context that project type is auto-detected from Python/JS/TS, which frames why force_project_type exists. It adds no detail on what auto-detection inspects or what path formats repo_path accepts beyond the schema.

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?

Specific verb+resource ('set up git and pre-commit hooks') followed by an enumerated four-step action list that makes the operation unambiguous. It does not mention or distinguish itself from the sibling check_project_setup, so it stops short of full sibling differentiation.

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?

Explicit trigger vocabulary is given ('set up', 'initialize', 'install', 'configure'), which covers the realistic user phrasings well. No when-not-to-use guidance or relation to check_project_setup is offered, so an agent cannot tell from this text whether to verify state first.

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

Deploy Server

Other Tools