Skip to main content
Glama

git_grep

Read-onlyIdempotent

Find lines in Git-tracked files without shell access. Specify repository and pattern, with optional path, revision, and context to refine results.

Instructions

Search tracked content without invoking a shell.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
targetNoworking
contextNo
patternYes
revisionNo
patternTypeNofixed
repositoryIdYesID returned by git_list_repositories

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
outputYes
truncatedYes
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds useful context by noting it searches 'tracked content' (excluding untracked files) and does not invoke a shell, but it does not describe output format or pagination behavior. This is adequate but not rich behavioral disclosure.

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?

The description is a single, front-loaded sentence with no wasted words. 'Search tracked content' states the core action, and 'without invoking a shell' adds a meaningful nuance. It is concise and well-structured, though it could be expanded without losing conciseness.

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

Completeness2/5

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

Given the tool's complexity (7 parameters, 2 enums) and sparse schema descriptions, the description is too thin. It doesn't clarify what 'tracked content' encompasses (e.g., working tree, index, or revisions), how patterns are matched, or how output is structured. Annotations and an output schema exist, but the description leaves significant gaps for an agent to infer correct usage.

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

Parameters1/5

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

Schema description coverage is very low (only repositoryId has a description in the schema, about 14%). The tool description does not explain any parameters such as pattern, target, context, or patternType. Since the burden falls on the description to compensate for low schema coverage, and it fails to do so, the agent gets little assistance in constructing valid invocations.

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 identifies the tool's function: 'Search tracked content' uses a specific verb and resource. It distinguishes from siblings like git_read_file (reads a single file) and git_log (lists commits) by focusing on content search. The phrase 'without invoking a shell' adds a distinctive implementation detail.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives. There are no prerequisites, exclusions, or references to sibling tools. The only context is the implied purpose, which is not sufficient for an agent to decide between this and other search or read operations.

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/kazuki0529/git-readonly-mcp'

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