Docs / Reference
MCP tools
Every tool the Prism MCP server exposes, generated from the tool registry.
Every tool the Prism MCP server exposes, generated from the tool registry the server is built from.
All tools are read-only adapters over Prism's local index; none makes a network call or holds a credential.
Tools that return a list accept limit and answer with totalCount and
truncated, so an agent can tell the first 20 of 340 from all 20 there are.
An agent sees all 21 tools, including receipt.
extraTools is not required. Every count elsewhere in the docs is
checked against these, so the numbers cannot drift into prose.
| Tool | Default | What it answers |
|---|---|---|
agents_md | yes | Generate or verify the Living AGENTS.md |
blast_radius | yes | What depends on a file or symbol, and how risky changing it is |
capabilities | yes | List every Core analysis capability with availability and a reason when unavailable |
dependency_cycles | yes | Import and re-export cycles, each returned as the list of files forming the loop |
dependency_graph | yes | The import/re-export dependency graph, at file level or aggregated to packages |
explain_area | yes | Explain what a module or folder does |
explore_code | yes | Everything about one file or symbol in a single call |
graph | yes | One structural question about the repository, answered from Prism's local graph |
guard_session | yes | Check my changes |
habits | yes | The user's saved routines (e.g |
knowledge_graph | yes | The symbol-level graph — declarations and the references between them — with summary stats |
list_findings | yes | Queueable findings from the last index |
list_packages | yes | List the packages in a monorepo with their roots |
prepare_change | yes | One call before you edit |
receipt | yes | What this session changed and whether it is proven |
rename_impact | yes | Every edit site a rename would touch, plus breaking-change hints for public surface |
repository_overview | yes | What this repository is, in one bounded call |
review_with | yes | Review a task or the current change through a lens |
safe_delete | yes | Whether a file or symbol can be deleted safely |
test_impact | yes | Which tests import the changed symbol, or a symbol that reaches it — the tests worth running after touching a target |
workspace_status | yes | Compact workspace readiness |
agents_md
Generate or verify the Living AGENTS.md: features, import cycles, test locations, and git ownership, composed straight from the index — no LLM prose. generate writes it to ~/.prism/workspaces/<key>/agents.md, never into this repo, so it never needs its own commit. check re-verifies the claims it made against a fresh index and reports drift. Read prism://agents-md for the current content without regenerating.
Arguments: action.
blast_radius
What depends on a file or symbol, and how risky changing it is: direct and transitive dependents, confidence lanes, evidence and a risk band. Results are import/soft-lane based — coverageLimitations lists classes it cannot see (DI containers, string-keyed registries, event buses, template/i18n refs, runtime-loaded config, generated-code consumers). Call this before editing or deleting code you did not write. Use intent 'delete' when removing rather than modifying. affectedFiles and testsLikelyAffected are bounded (default 50).
Arguments: kind, id, path, intent, limit.
capabilities
List every Core analysis capability with availability and a reason when unavailable. Use this to tell 'not supported by this build' apart from a real failure.
Takes no arguments.
dependency_cycles
Import and re-export cycles, each returned as the list of files forming the loop. Use when investigating build order, flaky module initialisation, or before extracting a package.
Arguments: packageAggregation, limit.
dependency_graph
The import/re-export dependency graph, at file level or aggregated to packages. Includes unresolvedImports { count, sample } for specs that did not resolve into the graph. Bounded by default (limit 50 nodes); use summaryOnly for counts + top-degree nodes. Prefer packageAggregation, or use blast_radius if your question is about one file rather than the whole graph.
Arguments: packageAggregation, resolveAliases, limit, summaryOnly.
explain_area
Explain what a module or folder does: domain overlap, dependency in/out degree and local ownership. Use before editing an unfamiliar directory. For a single file target prefer explore_code (richer usages/ownership/timeline). Deterministic — derived from the index and local git, never generated prose.
Arguments: path.
explore_code
Everything about one file or symbol in a single call: usages, ownership, related and similar code, and a change timeline. Usages are bounded (default 50) via a nested wrapper so large files do not drown the response. Use when asked to understand a specific thing rather than the repository as a whole.
Arguments: kind, path, name, start, limit.
graph
One structural question about the repository, answered from Prism's local graph. Modes: find, neighbors, path, explain, query, symbol (signature/body), map (compact cached repo map of signatures + callers/callees; default budget 4000). Every edge says measured, heuristic or inferred. Bounded by budget tokens; truncated says when it was cut.
Arguments: mode, name, kind, target, direction, from, to, maxHops, path, filter, of, within, scope, body, id, sessionId, refresh, budget.
guard_session
Check my changes. With review:true, write the review from review.reading and do not print risk scores. Start with what the change does, then the finding count, with no Receipt on that line. Bold each group title: Critical, High, Low, and Nit. Number findings straight through. Bold each finding title. Under it, an unordered list: This code, Breaks when, Change, and Left as is. Keep reading.notes; a Critical stays Critical. Read reading.targets and only the callers and tests listed there, in the order correct, safe, load, tested, speed, then smaller code. A finding needs a concrete case. A caller that is not listed was not measured. After the findings, one explanation line and no Receipt label, then one line for what was not opened. End with one Receipt only: NO-SHIP if any finding is Critical, NOT PROVEN if any finding is High, otherwise SHIP, then the cheapest check or fix when it is not SHIP. Prism does not call a model; you write that review from the pack. Call before landing a session or to review a branch.
Arguments: preExistingChanges, review, paths, base, lens, format.
habits
The user's saved routines (e.g. 'start my day'). With no name: the list of habits. With a name: the ordered steps (source, action, filter) and output format. Prism fetches nothing: run each step yourself with your connected tools, then write the result in the given format. Each habit is a skill file in ~/.prism/skills; users manage them with prism habit add|list|show|edit|remove.
Arguments: name.
knowledge_graph
The symbol-level graph — declarations and the references between them — with summary stats. Requires path (scope to one file) or limit (bound nodes). Very large on a big repository. If you are looking for one symbol use graph (mode find), and for its callers graph (mode neighbors, direction in).
Arguments: path, limit.
list_findings
Queueable findings from the last index: unused exports, duplicate implementations (two files exporting the exact same name), and wrapper functions (a function whose whole body is one call to another export). Each row is structured: what, where, fix, riskIfSkipped, sources, plus its fingerprint. Excludes findings the user has muted, unless includeMuted is set.
Arguments: limit, includeMuted.
list_packages
List the packages in a monorepo with their roots. Call this first in a monorepo so later tools can be scoped with packageId instead of returning the whole workspace.
Arguments: limit.
prepare_change
One call before you edit: prism, a one-line summary to start your reply with, the lens to work by (its steps, e.g. the smallest complete change), the files to open for this task (pack with exported signatures and path:line anchors), existing helpers to reuse, one House Style pointer, notes (remembered facts and ADR rationale), and a work order. Bodies only for the top symbol when it is ≤ 40 lines; otherwise call graph {mode:"symbol", path, name, body:true}. The whole answer fits a token budget (default 2000); when it is cut, trimmed says what was dropped. Ambiguous names come back as candidates; do not pick silently.
Arguments: task, budget, sessionId, refresh.
receipt
What this session changed and whether it is proven: changed files, dependents, the tests that reach them, and a verdict — SHIP, NOT PROVEN (reason, with the cheapest check that would prove it) or NO-SHIP. Checks run in the background and each call waits up to 20 s for them; while they run, next says whether to call again. Call this before saying a coding task is done and quote the verdict in one line.
Arguments: sessionId, waitMs.
rename_impact
Every edit site a rename would touch, plus breaking-change hints for public surface. Use before renaming an exported symbol or moving a file. A report only — Prism never edits.
Arguments: kind, id, path, newName.
repository_overview
What this repository is, in one bounded call: languages, frameworks, package manager, test runners and ranked domains (dna), the detected stack, and the landmarks a human would open first (entrypoints, package roots). Start here when you know nothing about a codebase. Local index only; no network.
Arguments: packageId, limit.
review_with
Review a task or the current change through a lens. Architect, QA, and Dev are the defaults; the owner can add their own. Omit lenses and Prism picks one from the task: a plan, a new feature, or a pull request uses Architect; finding bugs uses QA; a daily fix uses Dev. Naming a lens uses that one, including a custom lens. action=brief returns that lens's procedure, checklist, memory, and evidence for you to follow. action=record stores the verdict. Prism does not call a model.
Arguments: action, lenses, task, verdicts.
safe_delete
Whether a file or symbol can be deleted safely: blockers that still depend on it, and files that would be orphaned if it went. A report only — Prism never deletes anything. Prefer this over blast_radius when the question is specifically about removal.
Arguments: kind, id, path.
test_impact
Which tests import the changed symbol, or a symbol that reaches it — the tests worth running after touching a target. Each test carries reason and viaSymbol; run gives one ready command per package (cwd, command, argv) with its runner (vitest, jest, mocha, bun, node:test) and package manager — run it as given. Prism never runs it. The tests list is bounded (default 50).
Arguments: kind, id, path, limit.
workspace_status
Compact workspace readiness: path, whether an index is loaded, indexedAt, freshness, git availability, whether a Prism cache directory exists, and dependency-graph node/edge counts. Call this when a previous tool failed or to confirm the session is ready before a review.
Takes no arguments.