Skip to main content
Reference · Information

senkani_read

Live Replaces Read Savings 50–99%

Compressed file reads with session caching, outline-by-default, and secret redaction. The single most-called tool in a typical session.

Signature

senkani_mcp.call(tool="senkani_read", args={...})

Behavior

Returns an outline (symbols + line numbers) by default — ~99% smaller than the raw file. Pass `full: true` for the complete content. Every read passes through ANSI stripping, blank-line collapse, SecretDetector, and the ReadCache keyed on (path, mtime).

Inputs

Name
Type
Default
Description
path
string
—
Absolute path to the file. Paths are validated against the workspace root.
full
boolean
false
If true, return the full file content. If false, return outline only (symbols + line numbers).
offset
integer
0
Line offset to start reading from. Ignored when full is false.
limit
integer
2000
Max lines to return. Ignored when full is false.

Output

Outline mode: list of `{{name, kind, line_start, line_end, container}}` entries. Full mode: the file content with secrets redacted and ANSI stripped.

Example

// outline mode (default)
{"tool": "senkani_read", "args": {"path": "/repo/src/OrderRepo.ts"}}
// returns ~50 tokens:
[
  {"name": "OrderRepository", "kind": "class", "line_start": 12, "line_end": 94},
  {"name": "findByUser",      "kind": "method", "line_start": 18, "line_end": 31}
]

Details

Cache key is `(path, mtime)` — unchanged files return instantly from memory. The SecretDetector short-circuits on no-match inputs (1 MB benign file: ~25 ms). When the outline is empty (file not in index), falls back to reading full content up to `limit`.

⚔
All text-returning tools pass through SecretDetector. 14 secret families + entropy-based fallback.

See also

Source: Sources/MCPServer/Tools/ReadTool.swift