Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LARGEFILE_BACKUP_DIRNoBackup directory path~/.largefile/backups
LARGEFILE_FUZZY_THRESHOLDNoMatch sensitivity (0.0-1.0)0.8
LARGEFILE_MMAP_THRESHOLD_MBNoMemory mapping limit in MB500
LARGEFILE_MAX_SEARCH_RESULTSNoResults per search20
LARGEFILE_MEMORY_THRESHOLD_MBNoRAM loading limit in MB50

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Largefile helps AI assistants work with files too large for their context windows: code, logs, and data files. Start with get_overview, then search_content to locate, read_content to examine (tail/head for logs), and edit_content with preview=true to dry-run before applying; revert_edit restores the automatic backup every edit creates. Budgeted responses carry truncated (and next_offset where a read can resume): continue from next_offset instead of re-reading. File and directory tools require absolute paths; every applied edit auto-creates a backup (backup_created).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_overviewA

Get file structure, size, and semantic outline for large files (code, logs, data).

Use FIRST when working with any file over 1000 lines or when you need to
understand file structure. Returns: line count, byte size, binary detection,
long line stats, section headings, and suggested search patterns. For code
files, uses Tree-sitter to extract functions, classes, and structure;
Markdown files get ATX headings. The response includes outline_status:
"ok" (semantic outline produced), "unsupported_language" (no parser/
extractor for the extension), or "parse_failed" (semantic parse failed;
a plain-text fallback outline is returned). Does NOT return file
content - use read_content or search_content for that.
search_contentA

Search large files for text patterns without loading entire content into memory.

Use when finding functions, classes, errors, log entries, or counting
occurrences. Supports: fuzzy matching (handles typos/whitespace), regex
patterns, case-insensitive search, inverted matching (like grep -v), and
count-only mode. Regex and fuzzy are mutually exclusive: regex=true
disables fuzzy automatically (explicit fuzzy=true yields a warning in
the response). Returns ranked matches with line numbers and context
(lines truncated to 500 chars). When count_only=True, returns
{count, pattern, fuzzy_enabled, regex_enabled, case_sensitive, inverted}
instead of the full results structure.
read_contentA

Read specific portions of large files efficiently.

Use after search_content locates content, or directly with tail/head modes
for logs. Modes: 'lines' (read by offset/limit), 'semantic' (complete
functions/classes via Tree-sitter), 'tail' (last N lines - ideal for logs),
'head' (first N lines). Does NOT search - use search_content first to find
line numbers, then read_content to examine. For files over 500MB, tail/head
modes are most efficient.
read_enclosingA

Find the enclosing function or class for a specific line number.

Given a file and line number, returns the complete enclosing definition (function, method, class, struct, etc.) containing that line. Use depth=2 to get the parent definition (e.g., the class containing a method). Falls back to a centered context window for unsupported languages or top-level code.

edit_contentA

Edit large files using search/replace with fuzzy matching.

Use instead of line-based editing to avoid LLM line number errors. Fuzzy
matching handles whitespace and formatting differences automatically.
Applies edits immediately by default and creates an automatic backup
(backup_created in the response) - use revert_edit to undo. The preview
field of the response holds the unified diff for post-hoc verification;
pass preview=true to dry-run first. Does NOT support regex in replacement
- patterns must be literal text (use fuzzy=true for flexibility).
revert_editA

Restore a file to a previous state from automatic backups.

Use when edit_content made unwanted changes. Backups are created
automatically before each edit. Current state is saved as new backup
before reverting (so revert is reversible). Without backup_id, reverts to
most recent backup. Returns list of available backups with timestamps.
list_directoryA

List the contents of a directory.

Each entry has a type field: 'dir' for directories, 'file' for files.
Use max_depth > 1 to recurse into subdirectories. Automatically ignores
__pycache__, node_modules, and .git, plus nested .gitignore/.ignore
rules. Returns entry type, size in bytes, and child count for directories.
search_directoryA

Search for a text pattern across all files in a directory.

Returns results grouped by file with line numbers and context. Use
include_pattern to filter by file extension (e.g. '*.py'). Automatically
ignores __pycache__, node_modules, and .git, plus nested .gitignore/
.ignore rules. Prefer fuzzy=False (default) for multi-file search
performance.
find_filesA

Find files by name across a directory tree.

Walks the directory recursively and returns files whose names match the
glob pattern, newest-first, with size and modification time. Honors
nested .gitignore/.ignore rules (respect_gitignore=false to disable) and
never reads file contents.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a clearly distinct operation: reading (read_content, read_enclosing), searching (search_content vs. search_directory split cleanly by file vs. directory scope), editing (edit_content, revert_edit), navigation (list_directory, find_files), and structural analysis (get_overview). Descriptions explicitly disambiguate near-neighbors, e.g. read_content says it does NOT search, and find_files says it never reads contents.

Naming Consistency5/5

All nine tools follow a consistent snake_case verb_noun pattern (get_overview, search_content, edit_content, list_directory, find_files, read_content, read_enclosing, revert_edit, search_directory). No camelCase or vague bare verbs mixed in.

Tool Count5/5

Nine tools is well within the ideal range and each earns its place, covering the reading, searching, editing, reverting, and navigation needs of a large-file workflow without redundancy.

Completeness4/5

The read/search/edit/revert lifecycle is comprehensively covered, including semantic outline and enclosing-definition lookup. The one notable gap is file creation/write — an agent cannot create a new file, only edit existing ones, though this may be outside the 'largefile' scope.

Maintenance

ActivityNo data
ResponsivenessOutdated data