Skip to main content
Glama
total-agent-memory

total-agent-memory

ingest_codebase

Index local codebases or directories into persistent, searchable project memory, update changed and deleted files, and search extracted text, AST languages, PDFs, Office files, and archives.

Instructions

Index a local file or directory persistently in separate TAM resource tables. All text formats are searchable; detected languages use tree-sitter AST. PDF/Office/archive text is extracted; other binary files have explicit metadata-only status. action=index updates changed files and removes deleted entries; preview does not write. Use action=search with query or action=status to inspect the project-scoped index. Sensitive files and excluded directories are reported without reading their contents.

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": "ingest_codebase"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
queryNo
watchNoAutomatically refresh this index while the personal server runs.
actionNoindex
offsetNo
excludeNoOverride excluded directory/file glob patterns; [] includes dependency directories. Sensitive files remain protected.
includeNoExtension allowlist e.g. ['.py','.go']
projectNogeneral
sample_limitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv15.0.0
    • addedInput schema / properties / action
      Added value: +{
      +  "default": "index",
      +  "enum": [
      +    "index",
      +    "preview",
      +    "search",
      +    "status"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / exclude
      Added value: +{
      +  "description": "Override excluded directory/file glob patterns; [] includes dependency directories. Sensitive files remain protected.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 10,
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "default": "general",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
    • addedInput schema / properties / watch
      Added value: +{
      +  "default": true,
      +  "description": "Automatically refresh this index while the personal server runs.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false, so the description's job is to add texture. It does: file-type handling tiers (searchable text, tree-sitter AST, extracted PDF/Office/archive text, metadata-only binaries), the fact that index removes deleted entries while preview does not write, and that sensitive files/excluded directories are reported without being read. Pagination/return shape is not covered, but that is minor against this much added context.

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?

Four dense sentences, front-loaded with the core purpose before the action routing and the sensitive-file caveat. Every sentence carries information; only the file-format sentence is slightly list-like but it earns its space by setting expectations about coverage.

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?

For a 10-parameter, multi-action tool with no output schema, the definition covers what gets indexed, how each action differs, persistence, and safety around sensitive files. Gaps remain around pagination parameters and what an index/status response contains, which an agent would have to discover by calling.

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 description coverage is only 30% across 10 parameters, so the description carries real weight. It explains the action enum values well and ties query to search and project to scoping, but limit, offset, sample_limit, and include are left entirely to the bare schema, and exclude is only partly covered by its own schema text.

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 first sentence gives a specific verb and resource ('Index a local file or directory persistently in separate TAM resource tables'), and later sentences clarify the multi-action nature (index/preview/search/status). It does not explicitly distinguish itself from any sibling such as file_context, so it stops short of a 5.

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 description explicitly routes among the tool's own actions: 'action=index updates changed files and removes deleted entries; preview does not write' and 'Use action=search with query or action=status to inspect the project-scoped index.' There is no guidance about when to choose this tool over sibling tools like file_context, and no stated prerequisites.

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