Skip to main content
Glama

check_gitignore

Read-onlyIdempotent

Detect tracked or unignored secret-bearing files (like .env, *.pem, id_rsa) in a git repo so you can fix ignore rules before committing credentials.

Instructions

Check whether secret-bearing files (.env, *.pem, *.key, id_rsa, credentials.json, *.tfvars, ...) are ignored and untracked in a git repository.

Reports: secret-looking files that ARE tracked (an ignore rule no longer helps; includes the git rm --cached command as text), untracked-but-not-ignored ones that the next git add . would commit, common secret file names that no ignore rule covers yet, and tracked files that match .gitignore anyway. Looks at file names only; use scan_tree to look inside files.

Args: path: a directory inside a git repository.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "check_gitignore"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, so the description would only need marginal additions — instead it discloses a lot: the four specific report categories, that tracked-but-ignored and tracked-secret files are surfaced with a copyable `git rm --cached` command, and the important limitation that it inspects names only and never file contents. That last point materially shapes how an agent should interpret empty results.

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?

Well front-loaded: what it checks, then what it reports, then the scope caveat, then the arg. The secret-file list and the `git rm --cached` detail both earn their space. Minor slack from the trailing ellipsis list and a thin `Args:` block that repeats the schema field name.

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?

For a single-parameter read-only checker with a full annotation set and an output schema, this covers everything an agent needs: what is examined, what categories come back, what is explicitly out of scope, and the repo prerequisite. Return-value detail is correctly left to the output schema.

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?

Schema coverage is 0%, so the description carries the full burden for the single `path` param — and it does add real semantic constraint ("a directory inside a git repository"), telling the agent it must be a directory and that a repo must be in scope. It stops short of specifying absolute vs. relative form or whether a subdirectory vs. repo root changes results.

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 ("Check whether secret-bearing files ... are ignored and untracked in a git repository") and enumerates the exact file classes covered. It also draws an explicit boundary against a sibling ("Looks at file names only; use scan_tree to look inside files"), so an agent can distinguish it without opening either schema.

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 "use scan_tree to look inside files" line gives a concrete alternative and the condition that selects it, and "a directory inside a git repository" establishes the prerequisite context. It does not cover when to reach for make_baseline or suggest_remediation, but within its own framing the usage guidance is clear.

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