repovine
v0.1.1Checkout-local repository context graph over MCP; `npx repovine setup` wires skills, agents, hooks.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_context
Find likely repository context for a task. Searches domains, packages, modules, exports, templates, services, entrypoints, and config names. Use this when the task is still fuzzy or starts from a keyword/symbol. Combines a deterministic token index with optional local embeddings over graph node cards when semantic_search_embeddings is enabled. Multi-token queries default to match auto: AND (every token on one node) first, then bounded OR per token when AND finds nothing. emptyDiagnostic appears only when totalResults is 0 and there are no config/entrypoint aux matches — not when OR-relax pro…
| Parameter | Type | Description |
|---|---|---|
query * | string | Task keyword, feature name, symbol, route, package, config name, or other search text. |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
include | array | Accepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
match | string | Token matching strategy. auto (default): AND first, then bounded OR — OR hits set strategy.relaxedFrom:"and" and omit emptyDiagnostic; weak-only OR noise may set weakTokenOnlySuppressed with emptyDi… |
offset | integer | Pagination offset. Default 0. |
perTokenLimit | integer | Max OR candidates considered per query token before final ranking. Default scales with limit, capped at 100. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
types | array | Optional result type filter. |
map_context
Map the architectural area for a scope before reading code. Returns domain/package/module context, top connected modules, subdomains, semantic summary, and navigation. Use this after search_context or when the user names a feature/package/module directly. Empty/unresolved maps include emptyDiagnostic with reason and conditional nextActions. On a domain scope, taggedModules counts modules and taggedNonModuleCount the resources and subdomains beside them; byPackage keys are package ids, and modules under no package sit in withoutPackage.
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
include | array | Accepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum. |
includeSecondaryMatches | boolean | Read on view modules: include domain members matched by regex pattern only, not by directory or import cluster. The domain summary counts those members either way. Default false. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
offset | integer | Pagination offset. Default 0. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
view | string | Map shape. On a domain scope, modules selects the module slice and any other value the domain summary; on a node scope, summary returns the shortened path and any other value the full path. all and qu… |
inspect_node
Inspect one graph node in detail. For modules it returns exports/signatures/line ranges/annotations; for exports it returns signature/calls and can include source body. Use this only after narrowing context. The response points deeper, sideways, up, and cross-layer; package and domain scopes also point at validation. Annotations hint and constrain; they do not bound inspect scope — no annotation means no pre-written checklist, not skip. Stating a nodeId is unchanged requires inspect_node on that nodeId in the same session; annotation on another nodeId is not evidence for it. A derived capabi…
| Parameter | Type | Description |
|---|---|---|
bodyLimit | integer | Max body characters. Default 12000; hard max 50000. |
bodyOffset | integer | Character offset for body pagination. |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
exportLimit | integer | Max child/export entries to return. Default 20. |
exportOffset | integer | Pagination offset for child/export entries. Default 0. |
grepBody | string | Regex to search inside the node body with context lines. |
include | array | Accepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum. |
includeBody | boolean | Include source body for a module or export. Default false. |
includeInternals | boolean | For large function exports, include internal declarations. |
includePrivate | boolean | For class exports, include private/protected members. |
nodeId | string | Node id to inspect. Preferred for module/export-symbol/runtime-resource/template/domain inspection. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
get_entrypoints
List execution entrypoints independent of stack: pages, routes, APIs, webhooks, queue consumers, schedules, websockets, and unknown starts. The kind filter also accepts cli, worker and test, which no shipped interpreter emits — a filter on one of them returns nothing about a repository that has them. Routes are just one entrypoint kind; provider/runtime details are returned as metadata instead of being baked into the tool name. Prefer package, module, service, or query scopes for runtime lookup; domain scopes are semantic/path tags and may be empty. Empty results include emptyDiagnostic with…
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
include | array | Accepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum. |
kind | string | Entrypoint kind to filter. Default all. |
kinds | array | Entrypoint kinds to filter. Overrides kind when provided. |
layer | string | Optional layer filter. Entrypoints carry frontend or backend; IaC-derived service triggers carry backend. A filter on infra matches nothing. Default all. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
offset | integer | Pagination offset. Default 0. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
trace_flow
Trace runtime/data flow through modules, services, resources, triggers, and entrypoints. Use this for cross-layer questions: UI to API, API to queue, queue to worker, worker to DB/resource, and request routing (e.g. ingress to backend service, surfaced as routesTo/routedFrom on a service). The tool reports only graph-proven links and lists gaps when a transition cannot be proven. runtimeHandoff lists the handler module (mod:) of a traced runtime resource under three triggers, named per item: secret-binding (the resource or its handler binds a secret resource), annotation (a consumer- or bounda…
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
from | string | Fallback for scope: read only when scope is absent, and resolved by the same rules. An entrypoint id has no scope branch and resolves as a query scope. |
include | array | Runtime sections to include. Default services/resources/flows. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
offset | integer | Pagination offset. Default 0. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
analyze_dependencies
Analyze import/export contracts and dependency risk. Replaces impact, cross-package dependencies, interface implementations, and import-map style queries. Use before changing exported APIs, types, package boundaries, interfaces, or shared modules. Empty or mode/scope-mismatch results include emptyDiagnostic with reason and conditional nextActions. impact on an export-symbol scope (or a module scope plus exportName) resolves reverse callers: precise resolved-import callers carry uses; callers matched by call name carry provenance {basis:"inferred",method:"call-name-index"} (spans re-export barr…
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
depth | integer | Graph traversal depth. Omitted means unbounded: the walk runs to the edge of reachability, so pass a bound when the answer should stay local. |
direction | string | For package-boundaries and import-map on a pkg: scope: imports, exports, or both. Default both. Ignored by impact, callgraph and interface-implementations. |
exportName | string | Filter impact to consumers of a specific export. Required when mode is callgraph and scope is a module. |
interfaceName | string | Required for mode interface-implementations unless scope names an interface. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
mode | string | Dependency analysis mode. Default impact for module/export-symbol scopes, package-boundaries otherwise. mode callgraph requires an export-symbol scope, or a module scope plus exportName. |
offset | integer | Pagination offset. Default 0. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
get_config_surface
Inspect configuration and resource-binding surface: env vars, secrets, public config, and code-to-resource bindings. Items carry kind env, secret, public-config or resource-binding; the kind filter also accepts iac-param, which no item carries, so a filter on it returns nothing. Use before adding config, changing resource names, or debugging hidden runtime coupling. Empty results include emptyDiagnostic with reason and conditional nextActions.
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
groupBy | string | Sort key for the flat item list. Items carry no module, service or resource key, so every value sorts by name. Default name. |
include | array | Accepted and ignored: the response is identical with and without it. trace_flow selects response sections through its own include enum. |
kind | string | Config kind to filter. Default all. |
kinds | array | Config kinds to filter. Overrides kind when provided. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
namePattern | string | Case-insensitive regex for config/resource names. |
offset | integer | Pagination offset. Default 0. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
analyze_architecture
Run architecture analysis for a scope or expand one finding. This is read-only and heuristic: treat findings as review candidates. Use after context mapping or when the user asks for smells, risks, duplicated responsibilities, security-sensitive boundaries, frontend state/effect issues, or event boundaries. Empty reports or missing finding detail include emptyDiagnostic with reason and conditional nextActions. Detectors read modules, runtime resources and domains, so all, pkg:, domain:, mod: and resource: scopes are inspected and every other scope kind is refused by name. A mod:/resource: scop…
| Parameter | Type | Description |
|---|---|---|
annotationReasoning | string | Attach annotation context packets for the agent to judge as verification obligations, not background prose. Default off. |
categories | array | Optional category filter for report mode. duplicate-like, god-module and authorization-policy-drift each fired on a clean-code counterexample, so they run only when named here. |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
detailFindingId | string | Alias that expands a finding without also passing mode: detail. |
findingId | string | Finding id to expand when mode is detail. |
includeComponentEntrypoints | boolean | For deep frontend flow-convergence analysis. Default false. |
limit | integer | Maximum report findings. Default 12, hard maximum 30; narrow scope/categories for more. |
maxNodes | integer | Max affected node summaries in detail mode. Default 30. |
mode | string | report returns findings; detail expands a findingId. Default report. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
get_annotation_status
Report annotation build health: coverage, stale/missing annotation queue, and orphaned annotations. Use before annotation work or when trusting graph notes. The default queue is ONE unified, bottom-up backlog spanning annotatable node types — code modules, templates, services, infra (IaC), and domain roll-ups. Queue sort order: content-stale (staleKind:content) before propagation-stale (staleKind:propagation), then unannotated; within each tier, modules/templates before domain roll-ups and lower dependency depth first. Drain via view:"queue" top pages — do not run propagation-first via der…
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
from | string | For propagation-preview: module node id of the changed upstream module. |
includeAllDomains | boolean | For coverage view, include paged per-domain breakdown. Default false. |
includeDomains | boolean | For propagation-preview: include path-domain ids affected. Default false. |
includeLightweight | boolean | Include lightweight domains in anomalies. Default false. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
offset | integer | Pagination offset. Default 0. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | string | Scope to inspect. Supports all, domain:<name>, pkg:<name>, mod:<id>, export:<id>, resource:<id>, template:<path>, query:<text>, short aliases like "auth", package suffixes like pkg:client-ui, and path… |
staleKind | string | For queue view: filter to one staleKind. Default queue already ranks content before propagation. |
view | string | coverage; queue (default drain — content-stale before propagation-stale); derived-review (propagation-only filter, not first pass); propagation-preview (requires from); orphans; risk-scope-candidate… |
get_annotation_merge_status
Check whether repovine.annots.json exists, is parseable, contains conflict markers, or has an unmerged git index entry. Use before annotation work and after pull/merge/rebase. indexUnmerged marks a file-level conflict (or a hand-resolved file) that carries no markers.
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
merge_annotations
Resolve conflict markers in repovine.annots.json using annotation merge rules. Different node IDs are combined, compatible annotation fields are merged, and ambiguous scalar fields are reported for review. Scalar conflicts add patterns such as merge-review:summary plus [merge-review:…:ours/theirs] assumptions for a later write_annotation rewrite. This writes repovine.annots.json, and snapshots the replaced worktree file under .repovine/annotation-backups/ (named in replacedBackupPath) whenever git index stages are the merge input. dryRun writes neither.
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
dryRun | boolean | Preview the annotation merge without writing repovine.annots.json. Default false. |
fromIndex | boolean | Merge the git index stages when the index is unmerged but the file carries no conflict markers (file-level conflict such as a binary/-merge attribute, modify/delete, or an already hand-resolved file).… |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
validate_annotations
Validate repovine.annots.json against the current graph after annotation-file merge, especially after pull/merge/rebase, or before handoff. Reports conflict markers, parse problems, orphaned notes, content-stale and propagation-stale notes, riskScopeCandidates advisory counts, carrierLinkGaps candidates (runtime 2-hop delegation, minus targets suppressed via decline_advisory kind "carrier-link-gaps"), counts.inconsistent (notes naming something the graph does not have — advisory, does not move status), and annotation queue next actions.
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
limit | integer | Max items to return. Default depends on the tool, usually 10-20. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
scope | Optional sub-agent scope (e.g. backend, frontend, infra). When set, validation also reports needsWorkInScope and scopedClean for that scope only. |
write_annotation
Write or update an annotation for a module, export, template, domain, or service. Shared memory write path after understanding or changing code. Existing fields are merged; send only fields that changed. On a node whose content moved since the note was written, a partial write leaves the note content-stale and names the fields it did not resubmit — resubmit every field to clear it. New notes require annotation.summary; empty updates and obvious secret values are rejected. For code modules, every write snapshots importBaseline (direct import contentHashes) for propagation-stale detection. To…
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node id to annotate. |
annotation | object | Annotation object. New notes must include summary; updates may include only changed fields. Optional: assumptions, sideEffects, risks (string or { text, scope?: "local"|"consumer"|"boundary" }), invar… |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
durable | boolean | When true, wait for the annotation to be flushed to disk before responding (result.persistence.persisted). Default false: the write is stored in memory and persisted by an 800ms debounced save. Use on… |
propagationSlice | object | Optional audit trail for entrypoint-bounded derived review (anchor module, path to entrypoint, reviewedAt ISO timestamp). |
refreshImportBaseline | boolean | When true on an existing annotation, re-snapshot direct import contentHashes to clear propagation-stale. Sent alone it is refused while hard consistency issues exist; sent beside annotation fields it… |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
refresh_context
Build or refresh the repository syntax index after code changes. Acts as a synchronization barrier. The response reports graph deltas, annotation orphan status, searchTokens (token+annotation index size), semanticSearch ({ status: disabled|up_to_date|updated|failed, embedded?, total?, error? }), which reports status disabled while semantic_search_embeddings is off, and domainsSuggestions ({ count, axes, declinedHidden }) for first-run domains advisor follow-up. annotationMergeKeeps ({ readded, reverted, sample, warning }) appears when the reload kept in-memory notes the file disagreed with —…
| Parameter | Type | Description |
|---|---|---|
cleanupOrphans | boolean | If true, remove orphaned annotations after rebuilding. Default false; refresh only reports cleanup navigation. |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
orphanNodeType | string | Orphan cleanup filter, read with cleanupOrphans. The orphan report counts every type. Default all. |
reloadConfig | boolean | If true, re-read repovine.config.json, replace the MCP runtime, and rebuild using the new config. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
suggest_domains_config
Return additive graph-derived suggestions for repovine.domains.json. This tool is read-only: it reports additions, counts, merge strategy, declined-hidden count, a mergedConfig preview (accept = exclude), and, when an infra-noise suggestion is keepable, a keepConfig preview (keep = a committed infra.keep marker that keeps the resource visible and stops the suggestion). Agents should show the diff to the user and only write repovine.domains.json after approval (mergedConfig to accept, keepConfig to keep), then call refresh_context. To skip without committing, call decline_advisory({ "kind": "do…
| Parameter | Type | Description |
|---|---|---|
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
decline_advisory
Record declined advisory items in workspace-local state so they stop resurfacing; the advisory producers stay read-only. kind "domains-config": hide suggestion ids from suggest_domains_config in .repovine/onboarding-state.json; never writes the committed repovine.domains.json. kind "carrier-link-gaps": record reviewed-not-a-gap decisions per consumer-risk SSOT target in .repovine/carrier-review.json; each decision stores a riskHash of the target's consumer-scoped risks — a changed risk set re-surfaces the target; validate_annotations reports suppressedTargets and view:"carrier-gaps" keeps re…
| Parameter | Type | Description |
|---|---|---|
kind * | string | Which advisory to decline: domains-config suggestions or carrier-link gap targets. |
all | boolean | If true, decline every currently visible item of this kind. |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
ids | array | Ids to decline: suggestion ids from suggest_domains_config (domains-config), or consumer-risk SSOT target node ids from the carrier-gaps view (carrier-link-gaps). |
reason | string | Optional review note; persisted per target for carrier-link-gaps, ignored for domains-config. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
get_context_session_quality
Return the deterministic Context Session Quality report for a contextSessionId/sessionId recorded from repovine MCP tool responses. The report is computed from returned tool JSON and shaped response byte volume, not from agent prose. Use before accepting a subagent handoff. overall is an observation, not a graded assessment: shipped weights reduce it to 1 when the session called inspect_node and 0 otherwise, because the former 14-weight score failed its outcome-labelled falsification. acceptHandoff and rejectReasons are advisory in every mode, including harness — they emit warnings and requi…
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Context quality session id created by the main agent/harness. |
assignmentScope | array | Assignment scope for audit/report context. |
byteBudget | integer | Override shaped-response byte budget for acceptHandoff. |
consume | boolean | Delete the stored session after returning the report, unless retained. Default false. |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
includeEvents | boolean | Include full per-call metrics/events. Default false. |
maxRecoveryAttempts | integer | Harness-owned retry budget to echo in the policy report; repovine does not count retry attempts across assignments. |
minAnchors | integer | Override minimum stable anchors required for acceptHandoff. |
mode | string | Enforcement mode override. Selects warning wording and followups; both modes are advisory until the documented return bar is met. |
phase | string | Policy phase override. Default explore. |
qualityThreshold | number | Override minimum overall score for acceptHandoff. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
retainSession | boolean | Keep the stored session even when consume=true. Useful for debug. |
warningThreshold | number | Override soft score threshold for advisory warnings. |
get_build_status
Report the current build status of the repository graph. Use when other tools return a `result.status:"building"` payload to discover the current stage, remaining stage count, progress, and recommended retry delay. stageEtaSec estimates only the current stage, not time until ready. Stage 1 reports package/module counts; stage 3 reports semantic search embed card counts when `semantic_search_embeddings` is enabled. Always callable; returns immediately by default. Pass waitSec to long-poll: the call holds server-side and returns the moment the build settles (ready or failed) or the wait expires…
| Parameter | Type | Description |
|---|---|---|
cancel | boolean | Mutating: stop the in-flight startup build. It stops Stage 1 where it stands: every worker thread is asked to shut down and force-terminated after a few seconds' grace, so packages still extracting ar… |
contextSessionId | string | Context-quality session id from the harness; pass on every call to score returned context. |
responseFormat | string | Response shape override: concise = compact output, debug = full envelope. |
waitSec | integer | Long-poll: hold the request up to this many seconds, returning early as soon as the build settles. Prefer one waitSec call over repeated polling. Capped at 55s server-side (below the MCP SDK client 60… |