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

Capabilities

Features and capabilities supported by this server

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. 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. 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.
Preview mode (default) shows diff without applying. Creates automatic
backup before changes - use revert_edit to undo. 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. 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. Prefer fuzzy=False (default)
for multi-file search performance.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/peteretelej/largefile'

If you have feedback or need assistance with the MCP directory API, please join our Discord server