NEAT

v0.12.0
io.github.neat-technologies/neat Checked 4 hours ago Published 1 day ago

Finds the CVEs reachable in your code and fixes them, on a live graph your agent queries over MCP.

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

get_root_cause

Why is a node failing? Trace the failing node up its dependency graph toward likely root-cause candidates, ranked with per-candidate classification (primary-failure vs downstream symptom). Returns a provenance-scored cause chain and recorded error context that file search cannot establish from runtime evidence. For the whole work order on a failure, call investigate or get_incident_card first.

ParameterTypeDescription
errorNode *stringGraph node id where the error surfaced, e.g. "database:postgresql:payments-db"
errorIdstringSpecific error event id from incident history; if set, the result is coloured with that error message
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_incident_history

What failed here, and when? Read a node's recorded error events — incidents, crashes, exceptions — most recent first, with their deploy/env context. The incident ledger preserves failure evidence and timestamps a source search cannot reveal.

ParameterTypeDescription
nodeId *stringGraph node id to query
limitintegerMax events to return (default 20)
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_incident_card

Compose the incident work order for an exact node id (a service, file, or symbol): the recorded incident, likely cause chain, blast radius, governing policies, and divergences, each claim provenance-tagged — the same card NEAT pushes when it detects a failure. Have a symptom or a bare service name instead of a node id? Call investigate; it resolves the name and composes this card. Omit errorId for the latest incident or pin a specific one, then use expand/relate to verify the path.

ParameterTypeDescription
nodeId *stringGraph node id the incident is on (service/file/symbol)
errorIdstringPin a specific incident by its id; omit for the most recent
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

investigate

First call for a failing, slow, or crashing system. Give it a service name, a symptom ("why are reservations failing"), or a node id, and it returns the composed incident for the node it resolves: the recorded failure with its deploy/env context, the likely root cause and its provenance, the blast radius, the governing policies, and where declared and observed behavior diverge — one work order instead of several queries. Resolves a bare name to its service node, or the best graph match for a symptom; then use expand/relate to verify the chain. Same card get_incident_card composes from an exa…

ParameterTypeDescription
target *stringA service name ("payments"), a symptom ("why is checkout failing"), or a node id ("service:payments")
errorIdstringPin a specific incident by its id; omit for the most recent
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

ask

Ask the graph a question in plain language — the front door to NEAT. Reach for this FIRST, before Read/Grep/Bash, for any question about this system's behaviour, dependencies, failures, root cause, or blast radius. You do NOT need to know which tool or the exact node id: `ask` resolves the entities in your question to graph nodes and routes it to the right traversal (root cause, dependencies, observed runtime calls, incidents, divergences, blast radius), returning one compact answer with every fact provenance-tagged (EXTRACTED/OBSERVED/INFERRED/STALE) and confidence-scored. Ask what a node t…

ParameterTypeDescription
question *stringA natural-language question, e.g. "why is checkout failing?" or "what breaks if I change the orders table?"
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_blast_radius

What depends on this node — what breaks if I change it? Before changing or redeploying a node, see its downstream dependents and evidence-bearing paths. Returns the bounded blast radius so an edit plan includes the affected services, routes, data, and callers.

ParameterTypeDescription
nodeId *stringGraph node id to compute blast radius from
depthintegerMax BFS depth (default 10)
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_dependencies

What does this node depend on? Map a node's outgoing dependencies across code, data, and infrastructure. Returns a bounded traversal (default depth 3, max 10) with distance, edge type, provenance, and confidence; depth=1 shows direct dependencies only.

ParameterTypeDescription
nodeId *stringGraph node id to inspect
depthintegerBFS depth (default 3, max 10). depth=1 returns direct dependencies only.
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_observed_dependencies

What did this node actually call at runtime? Return only its OBSERVED outgoing dependencies, from spans or supported provider signals. Compare with get_dependencies or get_divergences to tell declared intent from seen behavior.

ParameterTypeDescription
nodeId *stringGraph node id to inspect
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

expand

Walk one evidence-bearing hop from a node after investigate or an incident card points to a locus. "up" finds callers/dependents and "down" finds callees/dependencies; each neighbor is classified primary-failure, symptom-only, or unrelated so you can separate cause from downstream symptoms.

ParameterTypeDescription
direction *stringup = callers/dependents (toward the cause), down = callees/dependencies
nodeId *stringGraph node id to step from
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

relate

Are these two nodes cause and symptom? Test a suspected cause-and-symptom pair. Returns a bounded connecting path, direction, per-hop provenance, and whether error/latency signal carries end to end. No path within the bound is reported as such, not as proof the nodes are unrelated.

ParameterTypeDescription
a *stringFirst node id (the hypothesised cause)
b *stringSecond node id (the hypothesised symptom)
maxDepthintegerMax path length to search (default 5)
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_graph_diff

What changed since a known-good point? Compare a saved snapshot with the live graph. Returns added, removed, and changed nodes and edges plus both timestamps, so architecture drift and regressions are visible beyond a file diff.

ParameterTypeDescription
againstSnapshot *stringPath or http(s) URL of the snapshot to diff against (the "before" state). The current graph is the "after".
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_recent_stale_edges

What traffic or integration went quiet? List recent OBSERVED → STALE edge transitions — the edges that stopped being seen, and when. Quiet is a signal to investigate, not proof the dependency is healthy or removed.

ParameterTypeDescription
edgeTypestringFilter by edge type — e.g. "CALLS" or "CONNECTS_TO"
limitintegerMax events to return (default 50)
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_divergences

Where do the code and what's actually running disagree? Return ranked divergences between declared code/config and observed behavior: missing edges, version or host mismatches, compatibility violations, symbol/field mismatches, and observed failures. Each carries confidence and severity; use it for a broad audit before choosing a specific failing node.

ParameterTypeDescription
minConfidencenumberDrop divergences below this confidence threshold (0.0 - 1.0).
nodestringScope to divergences involving this node id (as source or target).
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.
typearrayFilter by divergence type. One or more of: missing-observed, missing-extracted, version-mismatch, host-mismatch, compat-violation, observed-symbol-mismatch, observed-failing. Omit for all.

policy_read

Read the authored architectural policies for this project (the declared policy.json): each policy with its id, severity, on-violation action, and rule type. Distinct from check_policies, which reports current violations and the rules that govern a given node. Use it to see what rules exist before an edit.

ParameterTypeDescription
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

check_policies

Before an edit, ask which architectural policies apply to its node; before a proposed action, dry-run its policy effect. Returns advisory rules or violations across structure, compatibility, provenance, ownership, and blast radius. Policies inform the agent; this tool does not block changes.

ParameterTypeDescription
applicableTostringSoft guardrail (ADR-108): pass the node id you are about to edit and check_policies returns the policies that govern it, as a context block — so you stay inside the lines. Advisory only; never block…
hypotheticalActionDry-run mode: simulate the action and return resulting violations. Omit for current state.
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.
scopeNarrow to a subset. Default "all".

neat_list_uninstrumented

When the graph lacks expected runtime evidence, list project libraries outside automatic instrumentation coverage. Returns first-party, third-party, and gap libraries that may need an explicit instrumentation package.

ParameterTypeDescription
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

neat_lookup_instrumentation

When a library is an instrumentation gap, look up its supported registry recipe. Returns the instrumentation package, matching version range, and registration snippet when one exists.

ParameterTypeDescription
library *stringnpm package name, e.g. "@prisma/client"
installedVersionstringInstalled version for range matching
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

neat_describe_project_instrumentation

When OBSERVED evidence is missing, inspect this project's instrumentation wiring. Returns hook-file presence, .env.neat presence, and installed OTel dependencies before you change code.

ParameterTypeDescription
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

neat_apply_extension

After reviewing an instrumentation gap and preferably previewing it, apply the chosen library extension. Installs the package and updates the OTel hook, package.json, and lockfile; repeating the same extension is a no-op.

ParameterTypeDescription
instrumentation_package *stringThe instrumentation npm package, e.g. "@prisma/instrumentation"
library *stringThe library being instrumented, e.g. "@prisma/client"
registration_snippet *stringThe JS/TS snippet to splice into the instrumentations array, e.g. "instrumentations.push(new PrismaInstrumentation())"
version *stringSemver range for the instrumentation package, e.g. "^6.0.0"
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

neat_dry_run_extension

Before filling an instrumentation gap, preview the extension. Returns the exact file diff, dependencies, and install command without changing the project.

ParameterTypeDescription
instrumentation_package *stringThe instrumentation npm package, e.g. "@prisma/instrumentation"
library *stringThe library being instrumented, e.g. "@prisma/client"
registration_snippet *stringThe JS/TS snippet to splice into the instrumentations array
version *stringSemver range for the instrumentation package, e.g. "^6.0.0"
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

neat_rollback_extension

If a library extension needs reversing, remove its package.json dependency and hook registration. Returns the rollback result; run the package manager afterward because this tool does not refresh the lockfile.

ParameterTypeDescription
library *stringThe library whose instrumentation should be rolled back
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.

get_reachable_cves

Which known vulnerabilities in this project's dependencies does its own code actually pull in? Returns one line per vulnerable dependency, ranked by exposure (imported by first-party code first; a package only in the lockfile is context, not a finding): package@version, its highest exposure level, how many advisories hit it (ids listed), and the one reconciled fix that clears them (a single bump often clears several CVEs). The list is paged: when it is truncated the last line says the exact call for the next page (offset=<n>). Pass package=<name> for every advisory on one dependency as full ca…

ParameterTypeDescription
advisorystringAn advisory id or alias (GHSA-..., CVE-...): return that finding's full card instead of the rollup.
offsetintegerSkip this many dependencies before the page. Use the offset the "N more" line names to read the rest.
packagestringA package name: return every advisory on that one dependency, as full cards, instead of the rollup.
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.
servicestringOnly this service (its name or service: node id). Omit for the whole project.

is_reachable

Is a known-vulnerable version of this package reached by the project's own code? Without symbol it answers at dependency grain: reachable is true when an affected version is imported by a first-party file, with one line per advisory on the package and its fix. With symbol it answers at symbol grain: reachable is true when an EXTRACTED call path runs from the project's code to that function in the package, and returns the path. Use it to check a fix: after upgrading, the package should read reachable: false. For a finding's full card, call get_reachable_cves with its advisory.

ParameterTypeDescription
package *stringPackage name as the ecosystem spells it (lodash, @scope/pkg, jinja2, github.com/x/y).
ecosystemstringnpm, PyPI or Go: disambiguates a name used in more than one ecosystem.
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.
servicestringOnly this service (its name or service: node id).
symbolstringA function in the package (template, Range.test) for a symbol-grain answer. Needs the package's code in the graph, which NEAT extracts for versions with a known advisory.
versionstringOnly this resolved version. Omit for every version the project resolves.

scan_diff

Did a change fix the vulnerability, and add none? Compares the known vulnerabilities of two revisions of the project (base against head, or against the working tree): which ones the change introduced, removed and left in place, each as a compact line with the package versions on both sides and the fix, capped per bucket with "N more". Both sides are judged against the same advisories, so a difference comes from the change. Pass advisory=<GHSA/CVE id> for the full before/after card. Use it to verify a dependency upgrade before calling it done.

ParameterTypeDescription
base *stringThe revision to compare against: a branch, tag or commit (main, HEAD~1, a sha).
advisorystringAn advisory id or alias: return that finding's full before/after card instead of the compact buckets.
headstringThe revision with the change. Omit to use the working tree as it is now.
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.
servicestringOnly this service (its name or service: node id).

security_fix_plan

What is the upgrade plan to clear this project's known vulnerabilities? Returns, per dependency, the ones a single version bump fixes (fixable: package, current version, the version to move to, and the advisories that bump clears) and the ones a bump cannot fix (skipped: the reason, plus the breaking release that would clear it when one exists). Read-only; it proposes the plan and does not apply it. Run `neat security fix --apply` in the CLI to write the fixes. Both lists are capped with "N more"; pass package=<name> for one dependency's entry, or service=<name> to narrow. For a finding's full…

ParameterTypeDescription
packagestringA package name: return just that dependency's plan entry (fixable or not) instead of the whole plan.
projectstringProject name when the core hosts more than one (set NEAT_PROJECTS=...). Omit to use the default project.
servicestringOnly this service (its name or service: node id). Omit for the whole project.

neat_list_connectable

When a hosted graph lacks provider-side evidence, list the providers this project can connect. Returns control-plane options, or a configuration note when NEAT_CP_URL and a neat_pat_ NEAT_API_KEY are unavailable.

neat_connect

When authorized to add hosted provider evidence, connect a listed provider with its API credential. The control plane verifies and seals the credential; the daemon then polls or receives the supported telemetry into OBSERVED. Hosted only.

ParameterTypeDescription
credential *stringThe provider's own API token — e.g. a Supabase Management token (sbp_...) or a Railway account/team token. Sealed at rest; never stored in the graph or returned.
provider *stringProvider id, e.g. "supabase" or "railway" (see neat_list_connectable)

neat_connection_status

When provider evidence is absent or stale in a hosted graph, inspect connections and their connecting, healthy, error, or needs-reconnect status. Returns control-plane state, not a live graph traversal.

neat_disconnect

When authorized to remove a hosted provider integration, disconnect it and drop its stored connection. Returns the control-plane result; this changes future provider evidence, not source code.

ParameterTypeDescription
provider *stringProvider id to disconnect, e.g. "supabase"