Rarefaction

v0.4.3
io.github.ip2k/rarefaction-lsp-mcp Checked 14 hours ago Published 23 days ago

LSP call graph for coding agents: a symbol's callers, callees, tests and live files in one call.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

orient Orient on a symbol

Compact source context from language-server indexes: signature, body, callers, callees, tests, implementations and relevant files. Use before broad file reads in Swift, Rust, C/C++, TypeScript/JavaScript, Python and WebAssembly WAT projects. In mixed workspaces specify profile or use path:line:column. No cross-language/FFI edges are inferred. Increase up/down only when needed.

ParameterTypeDescription
symbol *stringA function, method, type or property: "updateLocation", "Engine.updateLocation", or an exact position "Sources/Engine.swift:204:10" (1-based line:column, on the name).
downintegerHow many levels of callees to walk (default 1).
include_bodybooleanInclude the symbol's source body.
max_body_linesintegerTruncate the body after this many lines.
max_nodesintegerMaximum graph nodes per direction and reference contexts; lower it for compact answers.
profilestringSource-language profile; required for bare names in mixed workspaces.
projectstringWorkspace-relative project directory, e.g. tools/driver for a nested Cargo package. Without it, a path:line:column symbol is answered from its enclosing Cargo workspace, else from its nearest project…
upintegerHow many levels of callers to walk (default 2: test cases usually sit one helper above the code they exercise).

scope Working set for a change

The files a change to one symbol is likely to touch: orient's call-graph files (callers, callees, implementations, tests) plus files that have historically changed in the same commits as the symbol's file, each with its reason. Use when planning an edit, to know which files to read and check. Advisory, not a boundary: real changes often touch files outside it.

ParameterTypeDescription
symbol *stringA function, method, type or property: "updateLocation", "Engine.updateLocation", or an exact position "Sources/Engine.swift:204:10" (1-based line:column, on the name).
downintegerHow many levels of callees to walk (default 1).
max_nodesintegerMaximum graph nodes per direction and reference contexts; lower it for compact answers.
profilestringSource-language profile; required for bare names in mixed workspaces.
projectstringWorkspace-relative project directory, e.g. tools/driver for a nested Cargo package. Without it, a path:line:column symbol is answered from its enclosing Cargo workspace, else from its nearest project…
upintegerHow many levels of callers to walk (default 2: test cases usually sit one helper above the code they exercise).

status Project, language server and index status

Check detected source-language profiles, project roots, executables, compile flags and freshness. Call once before orient in a new project or when orientation is incomplete. Pass profile/project to inspect a nested package.

ParameterTypeDescription
profilestringSource-language profile; required for bare names in mixed workspaces.
projectstringWorkspace-relative project directory, e.g. tools/driver for a nested Cargo package. Without it, a path:line:column symbol is answered from its enclosing Cargo workspace, else from its nearest project…