# tiny-context — efficient file tools by AVRG3 [Health: Active]

**Category:** 📂 File Systems  
**Repository:** https://github.com/Warddamn/tiny-tools  
**GitHub Stars:** 0  
**npm Downloads (last month):** 74  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tiny-context-efficient-file-tools-by-avrg3

## Description
Save agent steps: query spreadsheets, search PDF/Office files, summarize logs with bounded output

## Tools
Capabilities this server exposes over MCP:

- **file_map** — Structural outline of a file or directory WITHOUT its contents: headings (md/docx), function/class signatures (code), sheets + column headers + row counts (xlsx), slide titles (pptx), page count + outline + first line per page (pdf), size-annotated tree (directory).
USE WHEN: "what's in this file/folder", "outline this document", "which functions are in here", "what sheets and columns does this spreadsheet have", or before deciding what to read.
PREFER OVER: reading an entire large document just to learn its structure, or ls+grep+head loops for directories. If the question or section is already known, query_file/read_section directly; mapping is optional. Read is fine — and sufficient — for a small plain-text file (< ~20 KB): just Read it; do not call file_map on a file you have already read.
DOES NOT: return contents (use read_section), search inside files (use query_file), or parse code with a real parser (signatures are regex-based, so unusual syntax may be missed).
EXAMPLE: file_map({ path: "/abs/project/src", depth: 2 })  ·  file_map({ path: "/abs/contract.pdf" })
RETURNS: an outline with locations (line / page / sheet / slide / ¶) that read_section accepts, counts and sizes, then a savings line.
- **query_file** — Ranked passages matching a query inside one or many files (txt/md/code/pdf/docx/pptx/xlsx/csv), each with its exact location, so the follow-up read is surgical.
USE WHEN: "where does the contract discuss termination", "does this deck mention pricing", "find every place the spec talks about retries", "which of these docs cover X".
PREFER OVER: Read/cat of a LARGE file (> ~20 KB) just to find one passage; Grep for PDFs/DOCX/PPTX/XLSX (Grep can't open them) and for ranking across many files. Read is fine — and sufficient — for a small plain-text file: if you have already Read a file, you have everything this tool would return; do not call it on that file. Grep is fine for an exact string in one plain-text file.
DOES NOT: add anything to a file you have already read, use embeddings/semantic search (BM25 keyword ranking + exact-phrase boost), return whole files, or search binary formats other than the ones listed.
EXAMPLE: query_file({ path: "/abs/contract.pdf", query: "termination notice", max_results: 5 })
RETURNS: ranked hits "#1 file · page 12, line 3 (Heading > Sub)" with a short excerpt each, files/passages scanned, skipped files with reasons, then a savings line.
- **read_section** — The surgical read: returns ONLY the located section of a file — a heading's section, a page range, a line range, DOCX paragraphs, an XLSX sheet range, or PPTX slides — capped at max_tokens.
USE WHEN: you know where the content is (from the task, file_map or query_file) and need the actual text of just that part; reading pages of a PDF, a sheet of a workbook, a section of a long doc.
PREFER OVER: Read/cat of the whole file when you need a slice, and always for PDF/DOCX/XLSX/PPTX (Read can't slice them). Read is fine for small plain-text files you need in full.
DOES NOT: search (use query_file), read whole large files (cap 8000 tokens — narrow the locator instead), or render images.
EXAMPLE: read_section({ path: "/abs/contract.pdf", locator: { pages: "3-5" } })  ·  read_section({ path: "/abs/spec.md", locator: { heading: "Installation" } })
RETURNS: the section text with line/page/¶ markers, word count, a "truncated at N — continue with …" note when capped, then a savings line.
- **query_table** — Run SQL (DuckDB) over a CSV/TSV/Parquet/XLSX file without the data ever entering your context. The file is table `t`.
USE WHEN: "total sales by region", "how many rows have a negative total", "top 10 customers", "which columns exist and what types", any aggregate/filter/join-free question about a table.
PREFER OVER: Read/cat/head of the table, writing a pandas/awk script, or loading rows to count them. Read is fine for a tiny table (< ~50 rows) you need verbatim.
LIMITS: one read-only SELECT or DESCRIBE; no SQL file/network access, COPY, extensions, or multiple statements. Input/export cap 64 MB, DuckDB memory 256 MB, worker deadline 15s (timeout_ms up to 60s). Explicit out creates a new CSV without overwriting.
DOES NOT: modify the file, join several files (one file = one table), or return more than 200 rows in-context (use `out` to write the full result to CSV).
EXAMPLE: query_table({ path: "/abs/sales.csv", sql: "SELECT region, SUM(total) FROM t GROUP BY 1" })  ·  query_table({ path: "/abs/sales.csv", sql: "DESCRIBE t" })
RETURNS: a markdown table of up to max_rows rows, column names/types, total result rows, the written file path when `out` is set, then a savings line. SQL errors include the table's columns and types so the next attempt succeeds.
- **summarize_log** — Structure of a log file in ~300 tokens: repeated-message clusters (numbers/ids/paths masked) with counts, first/last time and one sample each, level counts, and a rate timeline — from 80k lines without reading them.
USE WHEN: "what's causing the 5xx spike", "summarize this log", "what errors are in here", "when did the failures start", before grepping.
PREFER OVER: tail/head/grep loops and Read on any log over a few hundred lines; run this first, then Grep/extract for the specific message. Read is fine for a log under ~100 lines.
DOES NOT: follow files live, parse binary logs, correlate across files, or explain root cause (it shows structure and timing so you can).
EXAMPLE: summarize_log({ path: "/abs/logs/app.log", focus: "errors", since: "2h" })
RETURNS: totals + time span + level counts, a bucketed timeline (all vs. focused lines), top clusters "#1 ×812 ERROR 10:41→10:52 <template>" with a sample line, then a savings line.
- **diff_files** — Compare two files and report what changed — works outside git and on PDF/DOCX/PPTX/XLSX/CSV (tables get added/removed/changed row counts + samples; documents diff on extracted text).
USE WHEN: "what changed between v1 and v2", "compare these spreadsheets", or "which orders/issues/inventory records changed between two API exports despite shuffled rows" (records mode, explicit key).
PREFER OVER: reading both files and comparing in your head; git diff when the files aren't in git or aren't plain text. git diff is fine for tracked plain-text files.
DOES NOT: fetch snapshots, infer IDs, remember prior calls, diff directories, merge, or interpret semantic meaning. Records mode supports JSON/JSONL/NDJSON only: 16 MiB and 100000 records per file, nesting 64; rejects duplicate IDs/object keys and numbers that would round. Quote high-precision numbers. Nested array order remains significant.
EXAMPLE: diff_files({ a: "/abs/v1/report.docx", b: "/abs/v2/report.docx" })  ·  diff_files({ a: "/abs/a.csv", b: "/abs/b.csv", mode: "summary" })
Records EXAMPLE: diff_files({ a: "/abs/yesterday.json", b: "/abs/today.json", mode: "records", key: ["/id"], fields: ["/status", "/price"] })
RETURNS: summary/unified: capped sections or diff. records: exact added/removed/changed/unchanged counts within the declared fields, bounded before/after previews and an optional full JSONL report. Capped previews are labeled. Savings line compares response bytes against both whole inputs, not billed tokens or an optimized script.
- **validate_file** — Deterministic checks on a file you (or someone) just wrote: JSON/YAML/XML parse, CSV column-count consistency, JSON Schema conformance, broken relative links/anchors/images in Markdown/HTML, encoding/BOM/NUL/mixed line endings.
USE WHEN: after generating or editing JSON/CSV/YAML/HTML/Markdown, "is this file valid", "check the links in this README", before handing a file to another tool or person.
PREFER OVER: re-reading your own output to eyeball it, or setting up a linter for one check. A language toolchain (tsc, eslint, pytest) is the right tool for source code — this does not run it.
DOES NOT: validate code syntax, check external URLs (use verify.check_links), or fix anything.
EXAMPLE: validate_file({ path: "/abs/out/data.json", schema: "/abs/schema.json" })  ·  validate_file({ path: "/abs/README.md" })
RETURNS: "PASS" with the checks run, or "FAIL" with line-numbered problems and what to do, then a savings line.
- **extract** — Extract values with locations: regex, jq, built-in kinds, or reusable document profiles.
USE WHEN: emails/URLs/IDs; batch recurring labeled forms using a saved profile (up to 100 txt/md/docx/text-layer PDFs).
PREFER OVER: repeated reads/field calls. Read/Grep for one small text file; reuse an existing correct script.
DOES NOT: train, infer templates, OCR, verify meaning or guarantee cost savings. Profiles recheck exact anchors/unique labels; mismatches need review. Save rules once with Write/editor; docs/DOCUMENT_PROFILES.md.
EXAMPLE: extract({paths:["/abs/*.docx"],profile:"/abs/profile.json",out:"/abs/results.jsonl"}) · extract({path:"/abs/a.pdf",kind:"emails"})
RETURNS: bounded matches; profiles: counts, values/locations, review reasons, optional full local report. Ledger excludes setup/model/schema costs.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "tiny-context-efficient-file-tools-by-avrg3": {
    "command": "npx",
    "args": ["-y","-p","https://github.com/Warddamn/tiny-tools/releases/download/context-v0.3.0/tiny-context-standalone-0.3.0.tgz","tiny-context-mcp"]
  }
}
```

## Documentation

## What tiny-context — efficient file tools by AVRG3 does

tiny-context — efficient file tools by AVRG3 exposes local file-analysis operations through MCP. It is intended for agents that need answers from files without returning every source row, page, or log line. Supported workflows include searching PDF, Word, PowerPoint, text, and Markdown content; running one read-only SQL query against a supplied CSV, XLSX, or Parquet table; summarizing large logs; extracting recurring fields with saved document profiles; and identifying changes between JSON or JSONL snapshots.

The tools operate on local inputs. They do not require model calls for document profiles, and profile data remains local. Record comparison can match objects by explicit IDs, select relevant fields, and produce scoped counts and before/after previews.

## How it works

The server communicates with an MCP client over stdio. File-oriented calls return focused results, such as ranked passages, a known document section, an outline, an aggregate log summary, or a spreadsheet query result. `query_file` is intended for a question, while `read_section` is suited to a known location; `file_map` can provide an outline when navigation is needed.

Repeated document reads can use a cache of up to eight files and 16 MB of serialized parsed data for up to 30 seconds. File identity and modification metadata are checked on cache hits. Saved profiles store labels and checks for recurring TXT, Markdown, DOCX, and text-layer PDF forms or reports; each new document is still parsed and checked, and ambiguous or missing fields are reported for review.

## Setup and configuration

Install Node.js 20 or newer, then configure the published GitHub release in an MCP client. The server does not require an npm account or token, and the first launch may download dependencies. It runs locally over stdio. Claude Code and Codex CLI have documented command-based installation paths, while Cursor and VS Code provide install links in the repository documentation.

MCPB-compatible clients can use operating-system bundles for macOS, Windows, or Linux. These bundles still require Node.js 20 or newer. Version-pinned installations do not update automatically, so older installations must be upgraded and reconnected.

## Tools and capabilities

- `summarize_log` groups repeated errors and reports counts and time ranges.
- `query_table` runs a single read-only SQL query over CSV, XLSX, or Parquet input.
- `query_file`, `read_section`, and `file_map` support document search and navigation.
- `extract` applies a saved document profile to recurring supported documents.
- `diff_files` compares JSON/JSONL records by explicit IDs, ignoring record order.

## Limitations and notes

tiny-context — efficient file tools by AVRG3 does not guarantee lower total cost or faster completion for every task. Startup, validation, cache, and additional agent turns can offset smaller responses, especially for small files where built-in tools may be sufficient. Record comparison still scans both local files, and a correct existing script or source-side change feed may be faster.

SQL access is read-only, external file and network access is disabled, and exports require an output path without replacing existing files. Input and export limits are 64 MB; the query worker has a default 15-second deadline and bounded engine and JavaScript memory. These controls are not an operating-system security sandbox. The optional Read hook is not required and can add work.

_Full upstream README: https://allmcps.com/mcp/tiny-context-efficient-file-tools-by-avrg3/readme_

