Skip to main content
Glama

telys_index_repo

Idempotent

Walk a repository, chunk text files, and ingest them into a collection for semantic search; re-runs fingerprint files and re-embed only changed ones, keeping the index current.

Instructions

Walk a repo directory — respecting .gitignore on git checkouts, else skipping common build/dep dirs; binaries and symlinks escaping the root are refused — chunk every text file, and ingest the chunks into a collection for telys_repo_search. Incremental: re-calls re-fingerprint each file (size, mtime), re-embed only changed files, tombstone removed ones, and no-op fast when nothing changed. Routing: telys_repo_search queries the index; telys_add/telys_upsert store manual memories. Returns status (built/refreshed/hit), repo_id, and file/chunk counts. All arguments optional: path (repo root; default: the server workspace, else CWD), collection (default 'repo_symbols'), mode ('windowed' default or 'file'), window_lines (48), window_overlap_lines (8), max_file_bytes / max_files / max_seconds (0 = unlimited), force (default false; rebuild every file). Fails when path is not a directory or the collection already exists with a partition key other than repo_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'windowed' sliding line window or 'file' (one record per file)windowed
pathNorepo root (defaults to server workspace / CWD)
forceNoignore the fingerprint cache and rebuild every file
max_filesNostop after walking this many files; 0 = unlimited
collectionNotarget collection for the repo chunks (auto-created with partition_by='repo_id')repo_symbols
max_secondsNowall-clock budget in seconds; 0 = unlimited
window_linesNolines per chunk in windowed mode
max_file_bytesNoskip files larger than this many bytes; 0 = unlimited
window_overlap_linesNooverlap lines between consecutive windows

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.1
    • addedInput schema / properties / collection / description
      Added value: +"target collection for the repo chunks (auto-created with partition_by='repo_id')"
    • addedInput schema / properties / max_file_bytes / description
      Added value: +"skip files larger than this many bytes; 0 = unlimited"
    • addedInput schema / properties / max_files / description
      Added value: +"stop after walking this many files; 0 = unlimited"
    • addedInput schema / properties / max_seconds / description
      Added value: +"wall-clock budget in seconds; 0 = unlimited"
    • addedInput schema / properties / mode / description
      Added value: +"'windowed' sliding line window or 'file' (one record per file)"
    • addedInput schema / properties / window_lines / description
      Added value: +"lines per chunk in windowed mode"
    • addedInput schema / properties / window_overlap_lines / description
      Added value: +"overlap lines between consecutive windows"
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the idempotentHint annotation, the description discloses concrete behaviors: fingerprinting by size/mtime, re-embedding only changed files, tombstoning removed files, a fast no-op path, .gitignore and build-dir handling, and refusal of binaries or escaping symlinks. It also states failure conditions, giving the agent a clear model of side effects.

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 long but every sentence earns its place: main behavior, incremental semantics, routing, return values, parameters, and failure cases. Information is front-loaded with the core purpose and the parameter summary is compact.

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 complex 9-parameter tool with no output schema, the description covers defaults, modes, limits, return shape, collection behavior, failure conditions, and relationship to sibling tools. Nothing essential is missing for correct invocation.

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

Parameters3/5

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

Schema coverage is 100%, and every parameter already has a clear description plus defaults. The description mostly restates defaults and the '0 = unlimited' convention, adding organizational value but little semantic detail beyond 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?

The description states a specific workflow: walk a repo directory, chunk text files, and ingest them into a collection for telys_repo_search. It clearly distinguishes itself from related siblings like telys_add/telys_upsert and telys_repo_search, so an agent can tell what this tool is for without opening schemas.

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?

The 'Routing' sentence explicitly tells the agent when to use this tool versus alternatives: telys_repo_search queries the index, telys_add/telys_upsert store manual memories, and this tool indexes repo content. It also explains that re-calls are incremental, making repeated invocation safe.

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