Skip to main content
Glama

Index files with hashes

files_index
Read-onlyIdempotent

Flat index of every file under a path with size, mtime and an XXH64 content hash, in ONE call, for sync tools. Honours gitignore patterns. Send the digest of a listing you already hold: an unchanged tree answers unchanged: true with no entries.

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": {
      "id": "<id>"
    },
    "name": "files_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
pathNoDirectory to index. Defaults to the volume root.
digestNoDigest of a previous index of the same path.
ignoreNogitignore-style patterns. A matching directory is not entered.
hashMaxBytesNoFiles above this size are listed without a hash. Default 4 MiB, 0 disables hashing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds real behavior beyond that: gitignore patterns are honoured and matching directories are not entered, and a digest hit returns 'unchanged: true' with no entries — important since there is no output schema.

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?

Three dense sentences, front-loaded with what the tool returns, then the gitignore caveat, then the digest shortcut. No filler; the 'in ONE call' emphasis is decision-relevant for an agent choosing between one index versus many list calls.

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?

With no output schema, the description carries the return-shape burden and does it reasonably: entry fields, the 'unchanged: true' sentinel, and no-entries behavior are all stated. Missing are the digest value returned for caching and what happens on unreadable files or oversized files beyond the hashMaxBytes note in the 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 already 80%, so baseline is 3; the description goes beyond by explaining the circuit-breaker semantics of `digest` and the effect of `ignore` on directory traversal. It does not mention the default of `path` or the hashMaxBytes default, but those are documented in the schema.

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 and resource ('Flat index of every file under a path') plus exactly what each entry carries (size, mtime, XXH64 content hash). 'Flat' and 'in ONE call' implicitly separate it from tree/listing siblings, and 'for sync tools' pins the intended use case.

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?

Gives clear context ('for sync tools') and a concrete conditional workflow: send the digest of a listing you already hold to get a cheap unchanged answer. It stops short of naming alternatives (files_list, files_tree) or stating when not to use it, so it is strong but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources