Skip to main content
Glama

Initialize the config git repository

git_init_config
Idempotent

Initializes a Git repository in the Home Assistant config directory, creating a default .gitignore and initial commit so other git tools can be used safely.

Instructions

Initialize a git repository in the HA config directory.

Creates a git repo at HA_CONFIG_PATH via git.Repo.init unless a .git/ directory already exists there, writes a default .gitignore (secrets.yaml, .storage/, .db, home-assistant.log) when none exists, and makes one initial commit adding that .gitignore.

Use when: preparing /config before using any other git_* tool or git_safe_write_with_checkpoint for the first time. Returns: dict {"status": "initialized"|"already_initialized", "path": ...}.

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": "git_init_config"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true) by disclosing the exact side effects: which files are written (.gitignore with named entries), only when absent, and that a commit is made. It also states the idempotency mechanism (skips when .git/ exists) rather than merely asserting the hint.

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?

Front-loaded one-line purpose, then behavior, then "Use when", then return shape — each block is a single sentence with no filler. The parenthetical file list is dense but load-bearing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the full surface an agent needs for a no-argument setup tool: precondition, effects, idempotency, and status values. The output schema exists, so the returns line is mild redundancy rather than a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so there is nothing for the description to disambiguate and the baseline applies. The description adds the relevant implicit input, HA_CONFIG_PATH as the target directory, which is not a schema field.

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+resource ("Initialize a git repository in the HA config directory") and immediately enumerates the concrete effects: repo init at HA_CONFIG_PATH, default .gitignore contents, and one initial commit. This distinguishes it clearly from the git_* sibling tools that operate on an already-initialized repo.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

An explicit "Use when" clause names the precondition (preparing /config) and the alternatives it must precede: any other `git_*` tool or `git_safe_write_with_checkpoint`. It also implies the when-not case via the existing-.git guard, giving the agent a clear routing decision.

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