Skip to main content
Reference · Information

senkani_fetch

Live Replaces Read Savings 50–99%

Read only a symbol's exact source lines, not the entire file. Token cost is proportional to the symbol, not to the file.

Signature

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

Behavior

Uses `startLine`/`endLine` from the IndexEntry to slice the symbol's lines from the ReadCache (warm) or disk (cold). Ideal after a `senkani_search` that located a function you want to read.

Inputs

Name
Type
Default
Description
symbol
string
—
Exact symbol name. Use `senkani_search` first if unsure.
file
string
—
File the symbol lives in. Disambiguates if the symbol name is not unique.
container
string
any
Container (e.g., class name) for further disambiguation.

Output

The symbol's source lines as a string, plus `{{line_start, line_end, file}}` metadata.

Example

{"tool":"senkani_fetch","args":{"symbol":"OrderRepository","file":"src/orders/repo.ts"}}
// returns only lines 12–94, not the full file

Details

SecretDetector + ANSI strip applied to the slice. If the symbol resolves to multiple candidates, returns the highest-scoring match and a note about alternatives.

⚔
Path validated against workspace root. SecretDetector scans output.

See also

Source: Sources/MCPServer/Tools/FetchTool.swift