Skip to main content
Glama

git_ls_files

Read-onlyIdempotent

Lists permitted regular files from the Git index or a specific commit, optionally filtering by paths and including untracked files, while enforcing repository policy restrictions.

Instructions

List selected permitted regular files in the index or a commit. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy.

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_ls_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsNo
revisionNo
repo_pathNoOptional repository root. Omit to use the server's fixed repository. An explicit path must identify that same repository.
include_untrackedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.10.19

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds useful context that results are "restricted according to project policy" and limited to "regular files," but leaves the policy's actual effect vague and says nothing about return shape or pagination.

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?

Two compact sentences with the action front-loaded and the repo_path default behavior immediately after. No filler, though the trailing policy sentence is somewhat vague rather than informative.

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?

With four parameters, 25% schema coverage, no output schema, and no annotations explaining return content, the description should clarify paths/include_untracked semantics and what the listing returns. Those gaps leave an agent guessing on two of four inputs.

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

Parameters2/5

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

Schema coverage is only 25% – only repo_path has a description, and the description largely restates it (omit to use the configured repo). It hints at revision semantics via "index or a commit" but adds nothing for paths (are these pathspecs? globs?) or include_untracked, which are undocumented in both schema and description.

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?

The description names a specific verb and resource ("List ... regular files in the index or a commit") and constrains scope to permitted files. It is clearly distinguishable from siblings like git_status or git_grep, though it does not explicitly name those alternatives.

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?

"Omit repo_path to use the configured repository" gives one concrete operational rule, and "index or a commit" implies the two modes. However, it never states when to prefer this over git_status, git_grep, or git_log, so the agent must infer selection criteria.

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