Shared memory and context tools for agentic work.
Code Rooms
{"tools":[{"description":"Boot into a task in one call. Give your free-form task and get your STARTING CONTEXT pre-packed: the focus nodes the task activates (ranked), prior memorized conclusions nearby, the global PageRank attention backbone, coverage so far, and the concrete first calls to make. Call this FIRST when you receive a task instead of doing exploratory reads. Read-only safe.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"scope":{"description":"Optional scope hint to bound orientation","type":"string"},"task":{"description":"Free-form description of the task you are about to start. The graph spread-activates on this text to find your starting context.","type":"string"},"top_k":{"default":8,"description":"How many focus nodes to return (ranked by activation from the task)","type":"integer"}},"required":["agent_id","task"],"type":"object"},"name":"orient"},{"description":"Pre-orient in ONE call so you never start cold: the honest north packet. Composes binding trust (trust_mode + fingerprint + the repair when degraded), task context (focus nodes + PageRank anchors from orient), durable cross-session memory (each claim with its real age + author, absent when unknown — never faked to 'now'), an answer-free sufficiency signal, one suggested next_move, and honest_gaps (what m1nd does NOT yet know). On an empty/unbound graph it honestly returns needs_ingest + the repair, not a fabricated orientation. One round-trip instead of trust_selftest → orient → boot_memory → focus. Read-only safe.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"scope":{"description":"Optional scope hint to bound orientation and trust binding","type":"string"},"task":{"description":"Free-form description of the task you are about to start. The graph spread-activates on this text to find your starting context.","type":"string"},"top_k":{"default":8,"description":"How many focus nodes to return (ranked by activation from the task)","type":"integer"}},"required":["agent_id","task"],"type":"object"},"name":"north"},{"description":"Self-awareness check a long-running agent should reach for OFTEN: which files in your working set changed on disk SINCE m1nd ingested them, so you know to re-read before acting. You can't see the filesystem change under you (the user edits, another agent edits, a build runs); this gives you that perception. Pass `files` and/or `nodes` to check specific targets, or pass NEITHER and m1nd checks every file you've touched this session. Returns stale (changed|missing), fresh, and unknown (never-ingested) paths. Read-only safe.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"files":{"description":"Optional explicit file paths to check. If omitted (and no `nodes`), defaults to the files you've visited this session.","items":{"type":"string"},"type":"array"},"nodes":{"description":"Optional node ids to check; each is resolved to its backing file path.","items":{"type":"string"},"type":"array"}},"required":["agent_id"],"type":"object"},"name":"am_i_stale"},{"description":"Spreading activation query across the connectome","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"dimensions":{"default":["structural","semantic","temporal","causal"],"description":"Activation dimensions to include","items":{"enum":["structural","semantic","temporal","causal"],"type":"string"},"type":"array"},"include_ghost_edges":{"default":true,"description":"Include ghost edge detection","type":"boolean"},"include_structural_holes":{"default":false,"description":"Include structural hole detection","type":"boolean"},"query":{"description":"Search query for spreading activation","type":"string"},"token_budget":{"description":"Optional approx context-token budget. m1nd keeps the highest-activation nodes that fit, drops the rest, and returns a 'budget' block (estimate = chars/4, not exact tokenization)","minimum":1,"type":"integer"},"top_k":{"default":20,"description":"Number of top results to return","type":"integer"},"xlr":{"default":true,"description":"Enable XLR noise cancellation","type":"boolean"}},"required":["query","agent_id"],"type":"object"},"name":"activate"},{"description":"Impact radius / blast analysis for a node","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"direction":{"default":"forward","description":"Propagation direction for impact analysis","enum":["forward","reverse","both"],"type":"string"},"include_causal_chains":{"default":true,"description":"Include causal chain detection","type":"boolean"},"node_id":{"description":"Target node identifier","type":"string"}},"required":["node_id","agent_id"],"type":"object"},"name":"impact"},{"description":"Detect structural holes and missing connections","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"min_sibling_activation":{"default":0.3,"description":"Minimum sibling activation threshold","type":"number"},"query":{"description":"Search query to find structural holes around","type":"string"}},"required":["query","agent_id"],"type":"object"},"name":"missing"},{"description":"Path explanation between two nodes","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"max_hops":{"default":6,"description":"Maximum hops in path search","type":"integer"},"source":{"description":"Source node identifier","type":"string"},"target":{"description":"Target node identifier","type":"string"}},"required":["source","target","agent_id"],"type":"object"},"name":"why"},{"description":"Task-based warmup and priming","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"boost_strength":{"default":0.15,"description":"Priming boost strength","type":"number"},"task_description":{"description":"Description of the task to warm up for","type":"string"}},"required":["task_description","agent_id"],"type":"object"},"name":"warmup"},{"description":"What-if node removal simulation","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_cascade":{"default":true,"description":"Include cascade analysis","type":"boolean"},"node_ids":{"description":"Node identifiers to simulate removal of","items":{"type":"string"},"type":"array"}},"required":["node_ids","agent_id"],"type":"object"},"name":"counterfactual"},{"description":"Co-change prediction for a modified node","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"changed_node":{"description":"Node identifier that was changed","type":"string"},"include_velocity":{"default":true,"description":"Include velocity scoring","type":"boolean"},"top_k":{"default":10,"description":"Number of top predictions to return","type":"integer"}},"required":["changed_node","agent_id"],"type":"object"},"name":"predict"},{"description":"Activation fingerprint and equivalence detection","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"probe_queries":{"description":"Optional probe queries for fingerprinting","items":{"type":"string"},"type":"array"},"similarity_threshold":{"default":0.85,"description":"Cosine similarity threshold for equivalence","type":"number"},"target_node":{"description":"Optional target node to find equivalents for","type":"string"}},"required":["agent_id"],"type":"object"},"name":"fingerprint"},{"description":"Weight and structural drift analysis","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_weight_drift":{"default":true,"description":"Include edge weight drift analysis","type":"boolean"},"since":{"default":"last_session","description":"Baseline reference point for drift comparison","type":"string"}},"required":["agent_id"],"type":"object"},"name":"drift"},{"description":"Explicit feedback-based edge adjustment","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"feedback":{"description":"Feedback type: correct, wrong, or partial","enum":["correct","wrong","partial"],"type":"string"},"node_ids":{"description":"Node identifiers to apply feedback to","items":{"type":"string"},"type":"array"},"query":{"description":"Original query this feedback relates to","type":"string"},"strength":{"default":0.2,"description":"Feedback strength for edge adjustment","type":"number"}},"required":["query","agent_id","feedback","node_ids"],"type":"object"},"name":"learn"},{"description":"Ingest or re-ingest a codebase, descriptor, or memory corpus","inputSchema":{"properties":{"adapter":{"default":"code","description":"Adapter to use for parsing the input corpus","enum":["code","json","memory","light","patent","article","bibtex","rfc","crossref","auto"],"type":"string"},"agent_id":{"description":"Calling agent identifier","type":"string"},"dotfile_patterns":{"default":[],"description":"Allowed dotfile patterns when include_dotfiles=true (for example '.codex/**')","items":{"type":"string"},"type":"array"},"include_dotfiles":{"default":false,"description":"Include selected dotfiles and hidden config directories during ingest","type":"boolean"},"incremental":{"default":false,"description":"Incremental ingest (code adapter only)","type":"boolean"},"mode":{"default":"replace","description":"Replace the active graph or merge the ingest into it","enum":["replace","merge"],"type":"string"},"namespace":{"description":"Optional namespace tag for memory/non-code nodes","type":"string"},"path":{"description":"Filesystem path to the source root or memory corpus","type":"string"},"project_root":{"description":"ONE-CALL BOOTSTRAP (Two-Tier interim): set to your repo root when this owner's graph does not cover your repo (reception said caller_root_mismatch). Creates a per-project brain inside the served owner, ingests your repo into it, binds this session to it, and returns its north packet — one call, then every call from your root routes to YOUR brain automatically. Served-owner HTTP/attach only; inert on a plain stdio server. The owner's bound graph is never replaced.","type":"string"}},"required":["path","agent_id"],"type":"object"},"name":"ingest"},{"description":"Resolve a canonical universal-document artifact by source path or node id","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"node_id":{"description":"Graph node id emitted from universal ingest","type":"string"},"path":{"description":"Original source path or canonical markdown path","type":"string"}},"required":["agent_id"],"type":"object"},"name":"document_resolve"},{"description":"Report availability and install hints for universal document providers","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"document_provider_health"},{"description":"Resolve deterministic document-to-code bindings for a universal document","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"node_id":{"description":"Graph node id emitted from universal ingest","type":"string"},"path":{"description":"Original source path or canonical markdown path","type":"string"},"top_k":{"default":10,"description":"Maximum bindings to return","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"document_bindings"},{"description":"Analyze stale, missing, or ambiguous document/code bindings for a universal document","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"node_id":{"description":"Graph node id emitted from universal ingest","type":"string"},"path":{"description":"Original source path or canonical markdown path","type":"string"},"scope":{"description":"Optional drift scope hint","type":"string"}},"required":["agent_id"],"type":"object"},"name":"document_drift"},{"description":"Start local-first document auto-ingest watchers for supported l1ght-family formats","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"debounce_ms":{"default":200,"description":"Minimum quiet period before a change is eligible for ingestion","type":"integer"},"formats":{"default":["universal","light","article","bibtex","crossref","rfc","patent"],"description":"Supported document formats to auto-ingest","items":{"enum":["universal","light","article","bibtex","crossref","rfc","patent"],"type":"string"},"type":"array"},"namespace":{"description":"Optional namespace for non-code document nodes","type":"string"},"roots":{"description":"Filesystem roots to watch recursively","items":{"type":"string"},"type":"array"}},"required":["agent_id","roots"],"type":"object"},"name":"auto_ingest_start"},{"description":"Stop active document auto-ingest watchers and persist manifest state","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"auto_ingest_stop"},{"description":"Report current auto-ingest runtime state, counters, manifest size, and queue depth","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"auto_ingest_status"},{"description":"Drain queued document changes immediately and apply them to the active graph","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"auto_ingest_tick"},{"description":"Server health and statistics","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"health"},{"description":"Cheap session trust handshake before relying on m1nd retrieval","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"available_tools":{"description":"Optional tool names exposed by the host client","items":{"type":"string"},"type":"array"},"missing_tools":{"description":"Optional required tool names missing from the host client surface","items":{"type":"string"},"type":"array"},"observed_tool_count":{"description":"Optional tools/list count seen by the host client","type":"integer"},"scope":{"description":"Optional absolute or repo-relative scope/path to validate against the active workspace binding","type":"string"}},"required":["agent_id"],"type":"object"},"name":"session_handshake"},{"description":"One-call diagnostic verdict for m1nd host binding, graph, and recovery trust","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"available_tools":{"description":"Optional tool names exposed by the host client","items":{"type":"string"},"type":"array"},"error_text":{"description":"Optional error text or host message","type":"string"},"missing_tools":{"description":"Optional required tool names missing from the host client surface","items":{"type":"string"},"type":"array"},"observed_candidates":{"description":"Optional candidate count from retrieval","type":"integer"},"observed_proof_state":{"description":"Optional proof_state from the suspicious result","type":"string"},"observed_tool":{"description":"Optional tool that produced a suspicious result","type":"string"},"observed_tool_count":{"description":"Optional tools/list count seen by the host client","type":"integer"},"scope":{"description":"Optional repo or scope path associated with the incident","type":"string"}},"required":["agent_id"],"type":"object"},"name":"trust_selftest"},{"description":"Deterministic recovery playbook for degraded bindings, empty graphs, and stale-looking sessions","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"available_tools":{"description":"Optional tool names exposed by the host client","items":{"type":"string"},"type":"array"},"error_text":{"description":"Optional error text or host message","type":"string"},"missing_tools":{"description":"Optional required tool names missing from the host client surface","items":{"type":"string"},"type":"array"},"observed_candidates":{"description":"Optional candidate count from retrieval","type":"integer"},"observed_proof_state":{"description":"Optional proof_state from the suspicious result","type":"string"},"observed_tool":{"description":"Optional tool that produced a suspicious result","type":"string"},"observed_tool_count":{"description":"Optional tools/list count seen by the host client","type":"integer"},"scope":{"description":"Optional repo or scope path associated with the incident","type":"string"},"trust_mode":{"description":"Optional prior handshake trust mode to preserve in the diagnostic trail","type":"string"}},"required":["agent_id"],"type":"object"},"name":"recovery_playbook"},{"description":"Diagnose active graph, runtime, session, and stale binding symptoms","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"available_tools":{"description":"Optional tool names exposed by the host client","items":{"type":"string"},"type":"array"},"error_text":{"description":"Optional error text or host message","type":"string"},"missing_tools":{"description":"Optional required tool names missing from the host client surface","items":{"type":"string"},"type":"array"},"observed_candidates":{"description":"Optional candidate count from retrieval","type":"integer"},"observed_proof_state":{"description":"Optional proof_state from the suspicious result","type":"string"},"observed_tool":{"description":"Optional tool that produced a suspicious result","type":"string"},"observed_tool_count":{"description":"Optional tools/list count seen by the host client","type":"integer"},"scope":{"description":"Optional scope/path used by the suspicious call","type":"string"}},"required":["agent_id"],"type":"object"},"name":"doctor"},{"description":"Enter a perspective: creates a navigable route surface from a query","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"anchor_node":{"description":"Optional: anchor to a specific node (activates anchored mode)","type":"string"},"lens":{"description":"Optional: starting lens configuration","type":"object"},"query":{"description":"Seed query for route synthesis","type":"string"}},"required":["agent_id","query"],"type":"object"},"name":"perspective_start"},{"description":"Browse the current route set with pagination","inputSchema":{"properties":{"agent_id":{"type":"string"},"page":{"default":1,"description":"Page number (1-based)","type":"integer"},"page_size":{"default":6,"description":"Routes per page (clamped to 1-10)","type":"integer"},"perspective_id":{"type":"string"},"route_set_version":{"description":"Version from previous response for staleness check","type":"integer"}},"required":["agent_id","perspective_id"],"type":"object"},"name":"perspective_routes"},{"description":"Expand a route with fuller path, metrics, provenance, and affinity","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"},"route_id":{"description":"Stable content-addressed route ID","type":"string"},"route_index":{"description":"1-based page-local position","type":"integer"},"route_set_version":{"type":"integer"}},"required":["agent_id","perspective_id","route_set_version"],"type":"object"},"name":"perspective_inspect"},{"description":"Extract a small relevant code/doc slice from a route target","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"},"route_id":{"type":"string"},"route_index":{"type":"integer"},"route_set_version":{"type":"integer"}},"required":["agent_id","perspective_id","route_set_version"],"type":"object"},"name":"perspective_peek"},{"description":"Follow a route: move focus to target, synthesize new routes","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"},"route_id":{"type":"string"},"route_index":{"type":"integer"},"route_set_version":{"type":"integer"}},"required":["agent_id","perspective_id","route_set_version"],"type":"object"},"name":"perspective_follow"},{"description":"Get the next best move suggestion based on navigation history","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"},"route_set_version":{"type":"integer"}},"required":["agent_id","perspective_id","route_set_version"],"type":"object"},"name":"perspective_suggest"},{"description":"Discover probable connections a route target might have","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"},"route_id":{"type":"string"},"route_index":{"type":"integer"},"route_set_version":{"type":"integer"}},"required":["agent_id","perspective_id","route_set_version"],"type":"object"},"name":"perspective_affinity"},{"description":"Fork the current navigation state into a new branch","inputSchema":{"properties":{"agent_id":{"type":"string"},"branch_name":{"description":"Optional branch name","type":"string"},"perspective_id":{"type":"string"}},"required":["agent_id","perspective_id"],"type":"object"},"name":"perspective_branch"},{"description":"Navigate back to previous focus, restoring checkpoint state","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"}},"required":["agent_id","perspective_id"],"type":"object"},"name":"perspective_back"},{"description":"Compare two perspectives on shared/unique nodes and dimension deltas","inputSchema":{"properties":{"agent_id":{"type":"string"},"dimensions":{"description":"Dimensions to compare (empty = all)","items":{"type":"string"},"type":"array"},"perspective_id_a":{"type":"string"},"perspective_id_b":{"type":"string"}},"required":["agent_id","perspective_id_a","perspective_id_b"],"type":"object"},"name":"perspective_compare"},{"description":"List all perspectives for an agent","inputSchema":{"properties":{"agent_id":{"type":"string"}},"required":["agent_id"],"type":"object"},"name":"perspective_list"},{"description":"Close a perspective and release associated locks","inputSchema":{"properties":{"agent_id":{"type":"string"},"perspective_id":{"type":"string"}},"required":["agent_id","perspective_id"],"type":"object"},"name":"perspective_close"},{"description":"Intent-aware semantic code search — find code by PURPOSE, not text pattern","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"graph_rerank":{"default":true,"description":"Whether to run graph re-ranking on embedding candidates","type":"boolean"},"min_score":{"default":0.1,"description":"Minimum combined score threshold","type":"number"},"node_types":{"default":[],"description":"Filter by node type: function, class, struct, module, file","items":{"type":"string"},"type":"array"},"query":{"description":"Natural language description of what the agent is looking for","type":"string"},"scope":{"description":"File path prefix to limit search scope","type":"string"},"token_budget":{"description":"Optional approx context-token budget. m1nd keeps the highest graph-importance hits that fit, drops the rest, and returns a 'budget' block (estimate = chars/4, not exact tokenization)","minimum":1,"type":"integer"},"top_k":{"default":20,"description":"Maximum results to return","type":"integer"}},"required":["query","agent_id"],"type":"object"},"name":"seek"},{"description":"Attention runtime — given a GOAL and a token budget, return the minimal focus_set worth loading, an honest account of what was left out (ignored), and an answer-free sufficiency signal (sufficient | gathering | saturated) telling you whether to act, gather more, or re-scope. Use it to decide WHAT context to pull and WHEN you have enough, instead of over-reading.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"goal":{"description":"Natural-language description of the goal you are working toward","type":"string"},"min_score":{"default":0.1,"description":"Minimum combined score for a node to be eligible for the focus set","type":"number"},"node_types":{"default":[],"description":"Filter by node type: function, class, struct, module, file","items":{"type":"string"},"type":"array"},"scope":{"description":"File path prefix to limit the focus scope","type":"string"},"token_budget":{"default":2000,"description":"Approx context-token budget for the focus set (estimate = chars/4). The set keeps the highest-salience nodes that fit; the rest are reported under 'ignored'","minimum":1,"type":"integer"},"top_k":{"default":60,"description":"Upper bound on ranked candidates before budget packing; keep generous so the budget is the real limiter","type":"integer"}},"required":["goal","agent_id"],"type":"object"},"name":"focus"},{"description":"Keyword/label pattern scan over graph nodes with curated anti-pattern sets, severity, and optional graph-edge context (graph_validate populates graph_context when edges are present; commonly empty for sparse graphs)","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"graph_validate":{"default":true,"description":"Whether to validate findings against graph edges","type":"boolean"},"limit":{"default":50,"description":"Maximum findings to return","type":"integer"},"pattern":{"description":"Pattern ID (error_handling, resource_cleanup, api_surface, state_mutation, concurrency, auth_boundary, test_coverage, dependency_injection) or custom pattern","type":"string"},"scope":{"description":"File path prefix to limit scan scope","type":"string"},"severity_min":{"default":0.3,"description":"Minimum severity threshold [0.0, 1.0]","type":"number"}},"required":["pattern","agent_id"],"type":"object"},"name":"scan"},{"description":"Git-based temporal history for a node — changes, co-changes, velocity, stability","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"depth":{"default":"30d","description":"Time depth: 7d, 30d, 90d, all","type":"string"},"include_churn":{"default":true,"description":"Include lines added/deleted churn data","type":"boolean"},"include_co_changes":{"default":true,"description":"Include co-changed files with coupling scores","type":"boolean"},"node":{"description":"Node external_id (e.g. file::backend/chat_handler.py)","type":"string"},"top_k":{"default":10,"description":"Max co-change partners to return","type":"integer"}},"required":["node","agent_id"],"type":"object"},"name":"timeline"},{"description":"Detect structural drift between a baseline and current graph state","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"baseline":{"description":"Baseline reference: ISO date, git ref, or last_session","type":"string"},"include_anomalies":{"default":true,"description":"Detect anomalies (test deficits, velocity spikes)","type":"boolean"},"include_coupling_changes":{"default":true,"description":"Include coupling matrix delta","type":"boolean"},"scope":{"description":"File path glob to limit scope","type":"string"}},"required":["agent_id","baseline"],"type":"object"},"name":"diverge"},{"description":"Persist current investigation state — nodes visited, hypotheses, conclusions","inputSchema":{"properties":{"activation_boosts":{"default":{},"description":"Map of node_external_id -> boost weight [0.0, 1.0]","type":"object"},"agent_id":{"description":"Calling agent identifier","type":"string"},"conclusions":{"default":[],"description":"Conclusions reached","items":{"type":"object"},"type":"array"},"hypotheses":{"default":[],"description":"Hypotheses formed during investigation","items":{"type":"object"},"type":"array"},"label":{"description":"Human-readable label for this investigation","type":"string"},"open_questions":{"default":[],"description":"Open questions remaining","items":{"type":"string"},"type":"array"},"summary":{"description":"Optional summary (auto-generated if omitted)","type":"string"},"tags":{"default":[],"description":"Tags for organization and search","items":{"type":"string"},"type":"array"},"visited_nodes":{"default":[],"description":"Explicitly list visited nodes with annotations","items":{"type":"object"},"type":"array"}},"required":["agent_id","label"],"type":"object"},"name":"trail_save"},{"description":"Restore a saved investigation — re-inject activation boosts, detect staleness","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"force":{"default":false,"description":"Resume even if trail is stale (>50% missing nodes)","type":"boolean"},"trail_id":{"description":"Trail ID to resume","type":"string"}},"required":["agent_id","trail_id"],"type":"object"},"name":"trail_resume"},{"description":"Combine two or more investigation trails — discover cross-connections","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"label":{"description":"Label for the merged trail (auto-generated if omitted)","type":"string"},"trail_ids":{"description":"Two or more trail IDs to merge","items":{"type":"string"},"type":"array"}},"required":["agent_id","trail_ids"],"type":"object"},"name":"trail_merge"},{"description":"List saved investigation trails with optional filters","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"filter_agent_id":{"description":"Filter to a specific agent's trails","type":"string"},"filter_status":{"description":"Filter by status: active, saved, archived, stale, merged","type":"string"},"filter_tags":{"default":[],"description":"Filter by tags (any match)","items":{"type":"string"},"type":"array"}},"required":["agent_id"],"type":"object"},"name":"trail_list"},{"description":"Test a structural claim about the codebase — graph-based hypothesis testing","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"claim":{"description":"Natural language claim (e.g. 'chat_handler never validates session tokens')","type":"string"},"include_ghost_edges":{"default":true,"description":"Include ghost edges as weak evidence","type":"boolean"},"include_partial_flow":{"default":true,"description":"Include partial flow when full path not found","type":"boolean"},"max_hops":{"default":5,"description":"Max BFS hops for evidence search","type":"integer"},"path_budget":{"default":1000,"description":"Budget cap for all-paths enumeration","type":"integer"}},"required":["claim","agent_id"],"type":"object"},"name":"hypothesize"},{"description":"Focused structural diff between two graph snapshots","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"focus_nodes":{"default":[],"description":"Limit diff to neighborhood of specific nodes","items":{"type":"string"},"type":"array"},"question":{"description":"Focus question to narrow the diff output","type":"string"},"snapshot_a":{"description":"Path to snapshot A, or 'current'","type":"string"},"snapshot_b":{"description":"Path to snapshot B, or 'current'","type":"string"}},"required":["agent_id","snapshot_a","snapshot_b"],"type":"object"},"name":"differential"},{"description":"Map runtime errors to structural root causes via stacktrace analysis","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"error_text":{"description":"Full error output (stacktrace + error message)","type":"string"},"language":{"description":"Language hint: python, rust, typescript, javascript, go (auto-detected if omitted)","type":"string"},"top_k":{"default":10,"description":"Max suspects to return","type":"integer"},"window_hours":{"default":24.0,"description":"Temporal window (hours) for co-change suspect scan","type":"number"}},"required":["error_text","agent_id"],"type":"object"},"name":"trace"},{"description":"Validate a modification plan against the code graph — detect gaps and risk","inputSchema":{"properties":{"actions":{"description":"Ordered list of planned actions","items":{"properties":{"action_type":{"description":"modify, create, delete, rename, or test","type":"string"},"depends_on":{"default":[],"items":{"type":"string"},"type":"array"},"description":{"type":"string"},"file_path":{"description":"Relative file path","type":"string"}},"required":["action_type","file_path"],"type":"object"},"type":"array"},"agent_id":{"description":"Calling agent identifier","type":"string"},"include_risk_score":{"default":true,"description":"Compute composite risk score","type":"boolean"},"include_test_impact":{"default":true,"description":"Analyze test coverage for modified files","type":"boolean"},"scope":{"description":"Optional repo or scope path for multi-repo binding diagnostics","type":"string"}},"required":["agent_id","actions"],"type":"object"},"name":"validate_plan"},{"description":"Ingest multiple repos into a unified federated graph with cross-repo edge detection","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"detect_cross_repo_edges":{"default":true,"description":"Auto-detect cross-repo edges","type":"boolean"},"incremental":{"default":false,"description":"Only re-ingest repos that changed","type":"boolean"},"repos":{"description":"List of repositories to federate","items":{"properties":{"adapter":{"default":"code","description":"Ingest adapter override","type":"string"},"name":{"description":"Repository name (namespace prefix)","type":"string"},"path":{"description":"Absolute path to repository root","type":"string"}},"required":["name","path"],"type":"object"},"type":"array"}},"required":["agent_id","repos"],"type":"object"},"name":"federate"},{"description":"Scan code graph against stored bug antibodies (immune memory patterns). Returns matches where known bug patterns recur.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"antibody_ids":{"description":"Optional: only scan specific antibodies","items":{"type":"string"},"type":"array"},"match_mode":{"default":"substring","description":"Label match mode: exact, substring, regex","type":"string"},"max_matches":{"default":50,"description":"Maximum matches to return","type":"integer"},"max_matches_per_antibody":{"default":50,"description":"Maximum matches per individual antibody","type":"integer"},"min_severity":{"default":"info","description":"Minimum severity: info, warning, critical","type":"string"},"scope":{"default":"all","description":"\"all\" = entire graph, \"changed\" = nodes since last scan","type":"string"},"similarity_threshold":{"default":0.7,"description":"Fuzzy match threshold for label matching (0.0-1.0)","type":"number"}},"required":["agent_id"],"type":"object"},"name":"antibody_scan"},{"description":"List all stored bug antibodies with metadata, match history, and specificity scores.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_disabled":{"default":false,"description":"Include disabled antibodies","type":"boolean"}},"required":["agent_id"],"type":"object"},"name":"antibody_list"},{"description":"Create, disable, enable, or delete a bug antibody pattern.","inputSchema":{"properties":{"action":{"default":"create","description":"Action: create, disable, enable, delete","type":"string"},"agent_id":{"description":"Calling agent identifier","type":"string"},"antibody_id":{"description":"Required for disable/enable/delete","type":"string"},"description":{"description":"What this pattern detects","type":"string"},"name":{"description":"Antibody name (for create)","type":"string"},"pattern":{"description":"Pattern definition with nodes/edges/negative_edges","type":"object"},"severity":{"default":"warning","description":"info, warning, critical","type":"string"}},"required":["agent_id"],"type":"object"},"name":"antibody_create"},{"description":"Simulate concurrent execution flow. Detects race conditions via particle collision on shared mutable state without synchronization.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"entry_nodes":{"description":"Starting nodes. Auto-discovered if empty.","items":{"type":"string"},"type":"array"},"include_paths":{"default":true,"description":"Include particle paths in output","type":"boolean"},"lock_patterns":{"description":"Regex patterns for lock/mutex detection","items":{"type":"string"},"type":"array"},"max_depth":{"default":15,"description":"Maximum BFS depth","type":"integer"},"max_total_steps":{"default":50000,"description":"Global step budget across all particles","type":"integer"},"num_particles":{"default":2,"description":"Particles per entry point","type":"integer"},"read_only_patterns":{"description":"Regex patterns for read-only operations","items":{"type":"string"},"type":"array"},"scope_filter":{"description":"Substring filter to limit which nodes particles can enter","type":"string"},"turbulence_threshold":{"default":0.5,"description":"Minimum score to report","type":"number"}},"required":["agent_id"],"type":"object"},"name":"flow_simulate"},{"description":"Predict bug propagation via SIR epidemiological model. Given known buggy modules, predicts which neighbors are most likely to harbor undiscovered bugs.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"auto_calibrate":{"default":true,"description":"Auto-adjust infection_rate based on graph density","type":"boolean"},"direction":{"default":"both","description":"Propagation direction: forward, backward, both","type":"string"},"infected_nodes":{"description":"Known buggy node IDs","items":{"type":"string"},"type":"array"},"infection_rate":{"description":"Uniform infection rate. If omitted, derived from edge weights.","type":"number"},"iterations":{"default":50,"description":"Simulation iterations","type":"integer"},"min_probability":{"default":0.001,"description":"Filter out predictions below this probability","type":"number"},"recovered_nodes":{"description":"Already-fixed node IDs","items":{"type":"string"},"type":"array"},"recovery_rate":{"default":0,"description":"SIR recovery rate","type":"number"},"scope":{"default":"all","description":"Filter predictions: files, functions, all","type":"string"},"top_k":{"default":20,"description":"Max predictions to return","type":"integer"}},"required":["agent_id","infected_nodes"],"type":"object"},"name":"epidemic"},{"description":"Detect code tremors: modules with accelerating change frequency (second derivative). Earthquake precursor analogy for imminent bugs.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_history":{"default":false,"description":"Include observation history","type":"boolean"},"min_observations":{"default":3,"description":"Minimum data points to compute tremor","type":"integer"},"node_filter":{"description":"Filter to nodes matching this prefix","type":"string"},"sensitivity":{"default":1.0,"description":"Multiplier on acceleration threshold (higher = more sensitive)","type":"number"},"threshold":{"default":0.1,"description":"Minimum magnitude to report","type":"number"},"top_k":{"default":20,"description":"Max results","type":"integer"},"window":{"default":"30d","description":"Time window: 7d, 30d, 90d, all","type":"string"}},"required":["agent_id"],"type":"object"},"name":"tremor"},{"description":"Per-module trust scores from defect history. Actuarial risk assessment: more confirmed bugs = lower trust = higher risk.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"decay_half_life_days":{"default":30.0,"description":"How fast old defects lose weight (days)","type":"number"},"min_history":{"default":1,"description":"Minimum learn events for inclusion","type":"integer"},"node_filter":{"description":"Filter to nodes matching this prefix","type":"string"},"risk_cap":{"default":3.0,"description":"Maximum risk multiplier","type":"number"},"scope":{"default":"file","description":"Node type scope: file, function, class, all","type":"string"},"sort_by":{"default":"trust_asc","description":"Sort: trust_asc, trust_desc, defects_desc, recency","type":"string"},"top_k":{"default":20,"description":"Max results","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"trust"},{"description":"Auto-detect architectural layers from graph topology. Returns layer assignments plus dependency violations (edges going against expected flow).","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"exclude_tests":{"default":false,"description":"Exclude test files from layer detection","type":"boolean"},"include_violations":{"default":true,"description":"Include violation analysis","type":"boolean"},"max_layers":{"default":8,"description":"Maximum layers to detect","type":"integer"},"min_nodes_per_layer":{"default":2,"description":"Minimum nodes for a layer to be reported","type":"integer"},"naming_strategy":{"default":"auto","description":"Layer naming: auto, path_prefix, pagerank","type":"string"},"node_types":{"description":"Filter by node types","items":{"type":"string"},"type":"array"},"scope":{"description":"File path prefix to limit scope","type":"string"},"violation_limit":{"default":100,"description":"Maximum violations to return","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"layers"},{"description":"Inspect a specific architectural layer: nodes, connections, violations, and health metrics.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_edges":{"default":true,"description":"Include inter-layer edges","type":"boolean"},"level":{"description":"Layer level to inspect","type":"integer"},"scope":{"description":"File path prefix to limit scope","type":"string"},"top_k":{"default":50,"description":"Max nodes to return per layer","type":"integer"}},"required":["agent_id","level"],"type":"object"},"name":"layer_inspect"},{"description":"Parse git history and surface temporal co-change ghost edges between files that move together without explicit static dependencies.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"depth":{"default":"30d","description":"Git history window: 7d, 30d, 90d, all","type":"string"},"scope":{"description":"File path prefix to limit scope","type":"string"},"top_k":{"default":50,"description":"Maximum ghost edges to return","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"ghost_edges"},{"description":"OMEGA Move 0: calibrate predict/co-change from this repo's own git history. Date-splits commits, measures precision-at-coverage on held-out commits, derives a split-conformal threshold τ against a risk budget α, and persists it so predict can gate each result with an act|reverify|abstain verdict.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"alpha":{"default":0.1,"description":"Operator risk budget (target miscoverage), e.g. 0.1 = accept up to 10% error among act-gated predictions","type":"number"},"top_k":{"default":10,"description":"Top-k predictions to score per held-out node","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"calibrate_predict"},{"description":"Inject taint at entry points and trace propagation through the graph to detect missed validation, auth, or sanitization boundaries.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"boundary_patterns":{"default":[],"description":"Custom boundary patterns when taint_type=custom","items":{"type":"string"},"type":"array"},"entry_nodes":{"description":"Entry point node IDs to inject taint","items":{"type":"string"},"type":"array"},"max_depth":{"default":15,"description":"Maximum propagation depth","type":"integer"},"min_probability":{"default":0.01,"description":"Minimum propagation probability to report","type":"number"},"taint_type":{"default":"user_input","description":"Taint type: user_input, sensitive_data, or custom","type":"string"}},"required":["agent_id","entry_nodes"],"type":"object"},"name":"taint_trace"},{"description":"Find structurally similar or identical nodes via topological signature similarity.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"node_types":{"default":[],"description":"Optional node type filter","items":{"type":"string"},"type":"array"},"scope":{"description":"File path prefix to limit scope","type":"string"},"similarity_threshold":{"default":0.8,"description":"Minimum cosine similarity threshold","type":"number"},"top_k":{"default":50,"description":"Maximum twin pairs to return","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"twins"},{"description":"Propose graph-native refactoring communities and extraction candidates for a scoped region of the codebase.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"max_communities":{"default":10,"description":"Maximum communities to consider","type":"integer"},"min_community_size":{"default":3,"description":"Minimum nodes for an extractable community","type":"integer"},"scope":{"description":"File path prefix to limit scope","type":"string"}},"required":["agent_id"],"type":"object"},"name":"refactor_plan"},{"description":"Overlay OpenTelemetry span activity onto the graph to paint runtime heat, latency, and error signals onto nodes.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"boost_strength":{"default":0.15,"description":"Activation boost strength","type":"number"},"mapping_strategy":{"default":"label_match","description":"Mapping strategy: label_match, code_attribute, exact_id","type":"string"},"service_name":{"default":"","description":"Optional service name for scoping","type":"string"},"spans":{"description":"OTel spans to ingest","items":{"type":"object"},"type":"array"}},"required":["agent_id","spans"],"type":"object"},"name":"runtime_overlay"},{"description":"Return an explicit explainability surface for a code target, showing why heuristics ranked it as risky or important.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"file_path":{"description":"Absolute or workspace-relative path to inspect","type":"string"},"node_id":{"description":"Graph node ID to inspect","type":"string"}},"required":["agent_id"],"type":"object"},"name":"heuristics_surface"},{"description":"Return full context for surgical LLM editing: file contents, symbols, and graph neighbourhood (callers, callees, tests). Use before apply.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"file_path":{"description":"Absolute or workspace-relative path to the file being edited","type":"string"},"include_tests":{"default":true,"description":"Include test files in the neighbourhood","type":"boolean"},"radius":{"default":1,"description":"BFS radius for graph neighbourhood (1 or 2)","type":"integer"},"symbol":{"description":"Optional: narrow context to a specific symbol (function/struct/class name)","type":"string"}},"required":["file_path","agent_id"],"type":"object"},"name":"surgical_context"},{"description":"Write LLM-edited code back to a file and trigger incremental re-ingest so the graph stays coherent. Always call surgical_context first.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"description":{"description":"Human-readable description of the edit","type":"string"},"file_path":{"description":"Absolute or workspace-relative path of the file to overwrite","type":"string"},"new_content":{"description":"New file contents (full replacement, UTF-8)","type":"string"},"reingest":{"default":true,"description":"Re-ingest the file after writing (recommended)","type":"boolean"}},"required":["file_path","agent_id","new_content"],"type":"object"},"name":"apply"},{"description":"Fast file reader with line numbers. Replaces View/cat/head/tail. No graph traversal — just reads the file. Auto-ingests if not in graph. Use for quick file inspection before surgical_context.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"auto_ingest":{"default":true,"description":"Auto-ingest file into graph if not present","type":"boolean"},"file_path":{"description":"Absolute or workspace-relative path to the file","type":"string"},"limit":{"description":"Max lines to return (default: all)","type":"integer"},"max_output_chars":{"description":"Optional cap for returned characters after line-number formatting","type":"integer"},"offset":{"default":0,"description":"Start line (0-based)","type":"integer"}},"required":["file_path","agent_id"],"type":"object"},"name":"view"},{"description":"Read multiple files or glob patterns in one call with stable delimiters, optional summaries, and auto-ingest.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"auto_ingest":{"default":true,"description":"Auto-ingest discovered files before reading","type":"boolean"},"files":{"description":"File paths and/or glob-like patterns to expand","items":{"type":"string"},"type":"array"},"max_lines_per_file":{"default":100,"description":"Maximum lines to return per file","type":"integer"},"max_output_chars":{"description":"Optional cap for the concatenated response body","type":"integer"},"summary_mode":{"default":true,"description":"Add an inline summary for each returned file","type":"boolean"}},"required":["agent_id","files"],"type":"object"},"name":"batch_view"},{"description":"Get full surgical context for a file PLUS source code of connected files (callers, callees, tests). Returns a complete workspace snapshot in one call. Superset of surgical_context.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"file_path":{"description":"Absolute or workspace-relative path to the primary file","type":"string"},"include_tests":{"default":true,"description":"Include test files in the neighbourhood","type":"boolean"},"max_connected_files":{"default":5,"description":"Maximum number of connected files to include source for","type":"integer"},"max_lines_per_file":{"default":60,"description":"Maximum lines per connected file (primary file is unbounded)","type":"integer"},"radius":{"default":1,"description":"BFS radius for graph neighbourhood (1 or 2)","type":"integer"},"symbol":{"description":"Optional: narrow context to a specific symbol (function/struct/class name)","type":"string"}},"required":["agent_id","file_path"],"type":"object"},"name":"surgical_context_v2"},{"description":"Atomically write multiple files and trigger a single bulk re-ingest. Use after surgical_context_v2 when editing a file and its callers/tests together. All-or-nothing by default.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"atomic":{"default":true,"description":"All-or-nothing: if any file fails, none are written","type":"boolean"},"edits":{"description":"List of file edits to apply","items":{"properties":{"description":{"description":"Optional human-readable label for this edit","type":"string"},"file_path":{"description":"Absolute or workspace-relative path of the file to write","type":"string"},"new_content":{"description":"New file contents (full replacement, UTF-8)","type":"string"}},"required":["file_path","new_content"],"type":"object"},"type":"array"},"reingest":{"default":true,"description":"Re-ingest all modified files after writing","type":"boolean"},"verify":{"default":false,"description":"Run post-write verification after the batch finishes","type":"boolean"}},"required":["agent_id","edits"],"type":"object"},"name":"apply_batch"},{"description":"Build an in-memory preview of a single-file full-replacement edit. Returns a preview handle, source snapshot, diff, and validation report. Does not touch disk.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"description":{"description":"Optional human-readable description of the preview","type":"string"},"file_path":{"description":"Absolute or workspace-relative path of the file to preview","type":"string"},"new_content":{"description":"Candidate file contents (full replacement, UTF-8)","type":"string"}},"required":["agent_id","file_path","new_content"],"type":"object"},"name":"edit_preview"},{"description":"Commit a previously created edit_preview handle after re-checking source freshness. Persists atomically through the existing apply path.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"confirm":{"default":false,"description":"Must be true to confirm the commit. Safety guard against accidental writes.","type":"boolean"},"preview_id":{"description":"Preview handle returned by edit_preview","type":"string"},"reingest":{"default":true,"description":"Re-ingest the modified file after commit","type":"boolean"}},"required":["agent_id","preview_id","confirm"],"type":"object"},"name":"edit_commit"},{"description":"Unified code search: literal, regex (with multiline), or semantic. Searches graph node labels AND file contents on disk. Supports invert (grep -v), count-only (grep -c), multiline regex (rg -U), and filename pattern filtering (grep --include). v0.5.0: regex mode now searches file contents (not just node IDs).","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"auto_ingest":{"default":false,"description":"Auto-ingest exactly one resolved scope path outside current ingest roots before searching; ambiguous scopes return an error that lists candidate paths in detail","type":"boolean"},"case_sensitive":{"default":false,"description":"Case-sensitive matching","type":"boolean"},"context_lines":{"default":2,"description":"Lines of context before/after match (0-10)","type":"integer"},"count_only":{"default":false,"description":"Return just the count, no results (grep -c)","type":"boolean"},"filename_pattern":{"description":"Glob pattern to filter filenames (e.g. '*.rs', 'test_*.py')","type":"string"},"invert":{"default":false,"description":"Return lines that DON'T match (grep -v)","type":"boolean"},"max_output_chars":{"description":"Optional cap for total returned characters across serialized matches","type":"integer"},"mode":{"default":"literal","description":"Search mode: literal (substring), regex (pattern), semantic (graph-aware)","enum":["literal","regex","semantic"],"type":"string"},"multiline":{"default":false,"description":"Enable multiline regex: dot matches newline (rg -U). Only for regex mode.","type":"boolean"},"query":{"description":"Search query string","type":"string"},"scope":{"description":"File path prefix filter","type":"string"},"token_budget":{"description":"Optional approx context-token budget. m1nd keeps the highest-ranked rows that fit, drops the rest, and returns a 'budget' block (estimate = chars/4, not exact tokenization; ignored when count_only)","minimum":1,"type":"integer"},"top_k":{"default":50,"description":"Max results (1-500)","type":"integer"}},"required":["agent_id","query"],"type":"object"},"name":"search"},{"description":"Graph-aware file glob: find files in the ingested graph by glob pattern. Zero I/O — pure graph query. Replaces find/glob for indexed codebases.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"pattern":{"description":"Glob pattern (e.g. '**/*.rs', 'src/**/mod.rs', '*.toml')","type":"string"},"scope":{"description":"Root directory prefix to narrow scope","type":"string"},"sort":{"default":"path","description":"Sort order: path (alphabetical) or activation (most connected first)","enum":["path","activation"],"type":"string"},"top_k":{"default":200,"description":"Max results (1-10000)","type":"integer"}},"required":["agent_id","pattern"],"type":"object"},"name":"glob"},{"description":"Run all structural scan patterns in one call and return grouped findings by pattern.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"graph_validate":{"default":true,"description":"Whether to validate findings against graph edges","type":"boolean"},"limit_per_pattern":{"default":50,"description":"Maximum findings per pattern","type":"integer"},"patterns":{"default":[],"description":"Optional subset of patterns to run; empty means all built-ins","items":{"type":"string"},"type":"array"},"scope":{"description":"File path prefix to limit scope","type":"string"},"severity_min":{"default":0.3,"description":"Minimum severity threshold across all patterns","type":"number"}},"required":["agent_id"],"type":"object"},"name":"scan_all"},{"description":"Compare graph state against disk truth: missing files, LOC drift, hash mismatches, and evidence_freshness (flags memorized L1GHT claims whose cited code changed). Empty check = run all.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"check":{"default":[],"description":"Checks to run (empty = all): existence, loc, hash, evidence_freshness. evidence_freshness reports stale_evidence — memorize claims whose grounded_in code changed since ingest.","items":{"enum":["existence","loc","hash","evidence_freshness"],"type":"string"},"type":"array"},"dotfile_patterns":{"default":[],"description":"Allowed dotfile patterns when include_dotfiles=true","items":{"type":"string"},"type":"array"},"include_dotfiles":{"default":false,"description":"Include selected dotfiles while verifying disk state","type":"boolean"},"scope":{"description":"File path prefix to limit scope","type":"string"}},"required":["agent_id"],"type":"object"},"name":"cross_verify"},{"description":"Report what the current agent session has and has not visited across files, nodes, and tool usage.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"coverage_session"},{"description":"Scan graph-tracked files for explicit references to paths outside the current ingest roots.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"scope":{"description":"File path prefix to limit scope","type":"string"}},"required":["agent_id"],"type":"object"},"name":"external_references"},{"description":"Discover candidate external repositories from the current workspace and optionally federate them in one step.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"current_repo_name":{"description":"Optional namespace override for the current workspace inside the federated graph","type":"string"},"detect_cross_repo_edges":{"default":true,"description":"Whether a follow-up federate execution should auto-detect cross-repo edges","type":"boolean"},"execute":{"default":false,"description":"When true, immediately run federate with the current repo plus discovered candidates","type":"boolean"},"max_repos":{"default":8,"description":"Maximum discovered external repos to include","type":"integer"},"scope":{"description":"File path prefix to limit discovery sources","type":"string"}},"required":["agent_id"],"type":"object"},"name":"federate_auto"},{"description":"Context-aware help for m1nd tools. Returns tool doctrine, route guidance, workflow sequences, or recovery guidance for agents.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"error_text":{"description":"Observed error text, stacktrace, or failure summary","type":"string"},"intent":{"description":"Short statement of what the agent is trying to do","type":"string"},"max_suggestions":{"default":3,"description":"Maximum ranked suggestions to return in route or recovery mode","type":"integer"},"mode":{"description":"Help mode: overview, tool, route, recovery, or workflow","enum":["overview","tool","route","recovery","workflow"],"type":"string"},"path":{"description":"Current path or target in focus when known","type":"string"},"recent_tools":{"description":"Tools already used in the current flow","items":{"type":"string"},"type":"array"},"render":{"default":"full","description":"Render mode for formatted help text","enum":["full","compact","none"],"type":"string"},"stage":{"description":"Current working stage for the agent","enum":["orient","find","ground","diagnose","plan","edit","review","operate","handoff"],"type":"string"},"tool_name":{"description":"Specific tool name for detailed help (omit for overview routing)","type":"string"}},"required":["agent_id"],"type":"object"},"name":"help"},{"description":"Start a bounded agent mission with route, budget envelope, starter moves, and non-claims.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"budget":{"default":"normal","description":"Mission budget envelope","enum":["short","normal","deep"],"type":"string"},"mode":{"default":"review","description":"Mission mode","enum":["bug_hunt","review","refactor","docs_drift","architecture","release"],"type":"string"},"parent_mission_id":{"description":"Optional parent mission id for handoff or sub-mission tracking","type":"string"},"repo":{"description":"Absolute or host-resolved repository path this mission is scoped to","type":"string"},"risk":{"default":"medium","description":"Risk level for routing","enum":["low","medium","high"],"type":"string"},"task":{"description":"Mission task in plain language","type":"string"}},"required":["agent_id","repo","task"],"type":"object"},"name":"mission_start"},{"description":"Append the latest mission event and return exactly one recommended next move plus do-not guardrails.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"last_event":{"description":"Optional event from the action just taken, such as graph_query, file_read, test_run, or dissent","type":"object"},"mission_id":{"description":"Mission id returned by mission_start","type":"string"}},"required":["agent_id","mission_id"],"type":"object"},"name":"mission_next"},{"description":"Record one observed mission action with evidence class, event id, and local digest.","inputSchema":{"properties":{"agent_confidence":{"description":"Optional caller confidence captured as telemetry, not proof","type":"number"},"agent_id":{"description":"Calling agent identifier","type":"string"},"event":{"description":"Observed action, such as file_read, test_run, graph_query, dissent, or coverage_sweep","type":["object","string"]},"mission_id":{"description":"Mission id returned by mission_start","type":"string"},"outcome":{"description":"Optional observed outcome, such as hypothesis_supported or inconclusive","type":"string"},"payload":{"description":"Optional structured evidence payload for string-style events"}},"required":["agent_id","mission_id","event"],"type":"object"},"name":"mission_event"},{"description":"Verify whether a mission claim has enough direct evidence; graph-only evidence is rejected.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"claim":{"description":"Candidate conclusion to validate","type":"string"},"confidence":{"description":"Optional agent confidence before verification","type":"number"},"evidence_refs":{"default":[],"description":"Evidence references such as file_read:path:line, test_run:name, compiler:error, or runtime_probe:id","items":{"type":"string"},"type":"array"},"mission_id":{"description":"Mission id returned by mission_start","type":"string"}},"required":["agent_id","mission_id","claim"],"type":"object"},"name":"mission_verify"},{"description":"Serialize a resumable mission handoff with verified claims, open hypotheses, dead paths, graph anchors, and next move.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_events":{"default":false,"description":"Include full event stream in the handoff packet","type":"boolean"},"mission_id":{"description":"Mission id returned by mission_start","type":"string"},"recipient_agent_id":{"description":"Optional recipient agent id","type":"string"},"summary":{"description":"Optional handoff summary","type":"string"}},"required":["agent_id","mission_id"],"type":"object"},"name":"mission_handoff"},{"description":"Close a mission with a proof packet containing verified claims, rejected claims, events, gaps, and non-claims.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"gaps":{"default":[],"description":"Known remaining gaps","items":{"type":"string"},"type":"array"},"mission_id":{"description":"Mission id returned by mission_start","type":"string"},"non_claims":{"default":[],"description":"Extra non-claims to preserve in the proof packet","items":{"type":"string"},"type":"array"},"summary":{"description":"Optional concise mission summary","type":"string"},"write_light_memory":{"default":false,"description":"If true, persist the mission's verified claims as L1GHT memory (.light.md, anchored to code, auto-loads next session). Path returned under light_memory.","type":"boolean"}},"required":["agent_id","mission_id"],"type":"object"},"name":"mission_close"},{"description":"Session intelligence report: query counts, elapsed time, graph size, and the highest-risk heuristic hotspots in the current graph.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"max_output_chars":{"description":"Optional cap for markdown summary size","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"report"},{"description":"Profile-aware one-call audit for topology, scans, verification, git state, and recommendations.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"cross_verify":{"default":true,"description":"Compare graph vs filesystem state","type":"boolean"},"depth":{"default":"full","description":"Audit depth: quick, surface, full","type":"string"},"external_refs":{"default":true,"description":"Discover explicit external path references","type":"boolean"},"include_config":{"default":false,"description":"Include selected dotfiles/config directories","type":"boolean"},"include_git":{"default":true,"description":"Include git state and recent history","type":"boolean"},"max_output_chars":{"description":"Optional cap for returned narrative/report size","type":"integer"},"path":{"description":"Root path to audit","type":"string"},"profile":{"default":"auto","description":"Audit profile: auto, quick, coordination, production, security, migration","type":"string"},"report_format":{"default":"markdown","description":"Output format: markdown or json","type":"string"},"scan_patterns":{"default":"all","description":"Scan selection: all, default, or a comma-separated list","type":"string"}},"required":["agent_id","path"],"type":"object"},"name":"audit"},{"description":"Start persisted daemon state and store watched paths for continuous structural monitoring.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"poll_interval_ms":{"default":500,"description":"Fallback polling interval in milliseconds","type":"integer"},"watch_paths":{"default":[],"description":"Paths the daemon should treat as watched roots","items":{"type":"string"},"type":"array"}},"required":["agent_id"],"type":"object"},"name":"daemon_start"},{"description":"Stop persisted daemon state without deleting alerts or runtime state.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"daemon_stop"},{"description":"Report daemon state, watched paths, alert counts, and generation counters.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"}},"required":["agent_id"],"type":"object"},"name":"daemon_status"},{"description":"Poll watched roots once, incrementally re-ingest changed files, and surface drift alerts for deleted files.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"max_files":{"default":32,"description":"Maximum changed files to process in one tick","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"daemon_tick"},{"description":"List persisted daemon/proactive alerts.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"include_acked":{"default":false,"description":"Include acknowledged alerts","type":"boolean"},"limit":{"default":50,"description":"Maximum number of alerts to return","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"alerts_list"},{"description":"Acknowledge one or more daemon/proactive alerts.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"alert_ids":{"description":"Alert IDs to acknowledge","items":{"type":"string"},"type":"array"}},"required":["agent_id","alert_ids"],"type":"object"},"name":"alerts_ack"},{"description":"Panoramic graph health overview: per-module risk scores combining blast radius, centrality, and churn signals.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"scope":{"description":"File path prefix filter","type":"string"},"top_n":{"default":50,"description":"Max modules to return (1-1000)","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"panoramic"},{"description":"Persist/load graph and plasticity state; supports binary snapshots","inputSchema":{"properties":{"action":{"description":"Action to perform","enum":["save","load","checkpoint","status"],"type":"string"},"agent_id":{"description":"Calling agent identifier","type":"string"},"format":{"default":"json","description":"Snapshot format","enum":["json","bin"],"type":"string"},"path":{"description":"Override snapshot path (optional)","type":"string"}},"required":["agent_id","action"],"type":"object"},"name":"persist"},{"description":"Persist a small canonical boot/state memory on disk and keep it hot in runtime cache","inputSchema":{"properties":{"action":{"description":"Action to perform","enum":["set","get","list","delete","status"],"type":"string"},"agent_id":{"description":"Calling agent identifier","type":"string"},"key":{"description":"Canonical boot memory key","type":"string"},"source_refs":{"default":[],"description":"Optional source references backing this boot memory","items":{"type":"string"},"type":"array"},"tags":{"default":[],"description":"Optional tags for organization","items":{"type":"string"},"type":"array"},"value":{"description":"JSON value to persist for the boot memory entry"}},"required":["agent_id","action"],"type":"object"},"name":"boot_memory"},{"description":"Structural codebase metrics: LOC, child counts, degree, PageRank per file/function/struct. Supports scope filtering and sorting.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"node_types":{"default":["file"],"description":"Filter by node type: file, function, class, struct, module","items":{"type":"string"},"type":"array"},"scope":{"description":"File path prefix to limit scope","type":"string"},"sort":{"default":"loc_desc","description":"Sort order: loc_desc, complexity_desc, name_asc","type":"string"},"top_k":{"default":50,"description":"Maximum results to return","type":"integer"}},"required":["agent_id"],"type":"object"},"name":"metrics"},{"description":"Cross-file type usage tracing. BFS from a type/struct/enum node to find all usage sites across the codebase. Supports forward, reverse, and bidirectional tracing.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"direction":{"default":"forward","description":"BFS direction: forward, reverse, both","type":"string"},"group_by_file":{"default":true,"description":"Group results by file","type":"boolean"},"max_hops":{"default":4,"description":"Maximum BFS hops","type":"integer"},"target":{"description":"Type name or external_id to trace","type":"string"},"top_k":{"default":50,"description":"Maximum results","type":"integer"}},"required":["agent_id","target"],"type":"object"},"name":"type_trace"},{"description":"Generate a visual graph diagram in Mermaid or DOT format. Centers on a node/query or shows top-N by PageRank. Supports scope, type filtering, and layout options.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"center":{"description":"Seed query or node_id to center the diagram on","type":"string"},"depth":{"default":2,"description":"Max BFS depth from center","type":"integer"},"direction":{"default":"TD","description":"Layout direction: TD (top-down) or LR (left-right)","type":"string"},"format":{"default":"mermaid","description":"Output format: mermaid or dot","type":"string"},"max_nodes":{"default":30,"description":"Maximum nodes in diagram","type":"integer"},"node_types":{"description":"Filter by node types","items":{"type":"string"},"type":"array"},"scope":{"description":"File path prefix to limit scope","type":"string"},"show_pagerank":{"default":false,"description":"Show PageRank in node labels","type":"boolean"},"show_relations":{"default":true,"description":"Show edge labels","type":"boolean"}},"required":["agent_id"],"type":"object"},"name":"diagram"},{"description":"Write structured knowledge claims as a valid .light.md (L1GHT protocol) file, then ingest it so evidence markers bridge to real code nodes. Returns path + ingest counts. The first tool that generates L1GHT markdown rather than only parsing it.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"claims":{"description":"Knowledge claims to encode as L1GHT markers","items":{"properties":{"ambiguity":{"description":"Ambiguity descriptor (a number is coerced to its string form)","type":["string","number"]},"confidence":{"description":"Confidence value or word, e.g. 0.7, '0.7', or 'high' (a number is coerced to its string form)","type":["string","number"]},"depends_on":{"default":[],"description":"Dependency labels (one [⟁ depends_on:] per entry)","items":{"type":"string"},"type":"array"},"evidence":{"default":[],"description":"Repo-relative code paths (one [𝔻 evidence:] per path)","items":{"type":"string"},"type":"array"},"kind":{"default":"entity","description":"Claim kind — controls the glyph (⍂/⍐/⍌)","enum":["entity","state","event"],"type":"string"},"label":{"description":"Entity name for the marker","type":"string"},"text":{"description":"Prose line above the marker (defaults to label)","type":"string"}},"required":["label"],"type":"object"},"type":"array"},"ingest_after":{"default":true,"description":"Run ingest after writing (default true)","type":"boolean"},"mode":{"default":"merge","description":"Ingest merge mode: 'merge' (default) or 'replace'","type":"string"},"namespace":{"description":"Graph namespace for ingest (default 'light')","type":"string"},"node_label":{"description":"Entity name — becomes the Node: frontmatter header and # title","type":"string"},"output_path":{"description":"Override output file path; default <runtime_root>/agent-memory/<slug>.light.md","type":"string"},"state":{"description":"State: frontmatter value (default 'authored')","type":"string"},"title":{"description":"Section heading (## <title>); defaults to node_label","type":"string"}},"required":["agent_id","node_label","claims"],"type":"object"},"name":"memorize"},{"description":"X-RAY write verb. One call fans a tag mutation across every node matching a selector, with a dry-run-by-default / explicit-commit contract. Supply a SELECTOR (any-match filter_tags, exact node_type, external_id path_prefix) plus a TRANSFORM (op add/remove/set + tags). Returns the plan (selected/planned/skipped_noop counts + a sample of before/after) without mutating unless mode='commit'. On commit it applies the columnar tag mutators and persists the graph snapshot. Mutates graph metadata only — never source files.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"expect_version":{"description":"Optional cross-call OCC token from a prior dry_run's `version`. On commit the selection fingerprint is recomputed; if it no longer matches, the commit ABORTS (status 'aborted_conflicts', applied 0, nothing written) so a concurrent tag change between dry_run and commit cannot clobber work. Omit for an unconditional commit.","type":"string"},"mode":{"default":"dry_run","description":"dry_run (default) plans only and writes nothing; commit applies and persists","enum":["dry_run","commit"],"type":"string"},"op":{"description":"Tag transform: add (idempotent), remove (absent tags are no-ops), or set (replace the whole tag set)","enum":["add","remove","set"],"type":"string"},"selector":{"description":"Node selector — a node must satisfy every provided predicate (empty selector matches all nodes)","properties":{"filter_tags":{"default":[],"description":"Node matches if it carries at least one of these tags (any-match)","items":{"type":"string"},"type":"array"},"node_type":{"description":"Exact node-type as canonical u8 (File=0, Directory=1, Function=2, Class=3, Struct=4, Enum=5, Type=6, Module=7, …, Custom=100+v)","type":"integer"},"path_prefix":{"description":"Node matches if its external_id starts with this prefix","type":"string"}},"type":"object"},"tags":{"description":"Tags to add / remove / set","items":{"type":"string"},"type":"array"}},"required":["agent_id","selector","op","tags"],"type":"object"},"name":"xray_retag"},{"description":"X-RAY read verb (read-only). One call computes a conformance LEDGER over the live graph: derives each node's MODULE from its external_id (first path segment after 'file::'), walks the boundary edges (imports / depends_on), builds a cross-module dependency_matrix, and classifies each cross-module edge against a MANIFESTO (forbid pairs + layer_order) into convergence vs divergence — reported HONESTLY as 'erosion_candidates' (never confirmed violations). Also runs an existence axis: each require_exists substring is present (BEDROCK) or absent (BLUEPRINT). With an empty manifest it just reports the module census + matrix (instrument not aimed yet). Never mutates, never persists — safe in read-only attach.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"manifest":{"description":"North-star layer ruleset. Empty manifest => empty erosion_candidates (honest: instrument not aimed yet, report structure only)","properties":{"forbid":{"default":[],"description":"Pairs [A, B] meaning module A must not depend on module B","items":{"items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"layer_order":{"default":[],"description":"Modules ordered low->high; a module may depend only on its own level or LOWER — depending on a higher layer is a candidate divergence","items":{"type":"string"},"type":"array"},"require_exists":{"default":[],"description":"Substrings that must appear in some node external_id (present=BEDROCK, absent=BLUEPRINT)","items":{"type":"string"},"type":"array"}},"type":"object"},"manifest_path":{"description":"Optional path to a North-Star manifest JSON file. Used only when the inline `manifest` is empty; takes precedence over auto-discovery of <workspace_root>/xray.manifest.json. A file's `ratified` flag drives the gate's block/caution decision. The resolved provenance is echoed back as `manifest_source`.","type":"string"},"scope":{"description":"Optional external_id path-prefix filter — only nodes whose external_id starts with this prefix are counted, and only edges from in-scope source nodes contribute","type":"string"}},"required":["agent_id"],"type":"object"},"name":"xray_orient"},{"description":"X-RAY read verb (read-only). The North-Star guardrail an agent calls BEFORE editing code: 'am I about to violate the North Star?'. Supply the `node` (external_id) being edited plus `planned_imports` (module names this change would add an outgoing dependency to). The verb derives the node's MODULE, walks its live outgoing imports/depends_on edges, and evaluates BOTH those existing cross-module edges AND each planned edge node_module->M through the SAME rule predicate as xray_orient (forbid pairs + layer_order). Returns verdict clear|caution|blocked: it BLOCKS only on a layer-rule violation (EROSION) AND only when manifest_ratified=true; otherwise a violation is 'caution' (anti-guardrail-fatigue). Empty manifest, unmapped node, or a node not in the graph => 'clear' (honest: nothing to gate). Never mutates, never persists — safe in read-only attach.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"manifest":{"description":"North-star layer ruleset (same shape as xray_orient). Empty manifest => verdict clear (nothing declared to violate)","properties":{"forbid":{"default":[],"description":"Pairs [A, B] meaning module A must not depend on module B","items":{"items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"layer_order":{"default":[],"description":"Modules ordered low->high; depending on a higher layer is a violation","items":{"type":"string"},"type":"array"},"require_exists":{"default":[],"description":"Unused by the gate (accepted for manifest parity with xray_orient)","items":{"type":"string"},"type":"array"}},"type":"object"},"manifest_path":{"description":"Optional path to a North-Star manifest JSON file. Used only when the inline `manifest` is empty; takes precedence over auto-discovery of <workspace_root>/xray.manifest.json. A file's `ratified` flag drives the gate's block/caution decision. The resolved provenance is echoed back as `manifest_source`.","type":"string"},"manifest_ratified":{"default":false,"description":"When true, any violation escalates the verdict to 'blocked'. When false (default), a violation is only 'caution' — the North Star is not yet ratified, so the gate informs without obstructing (anti-guardrail-fatigue). Used only when the resolved manifest source is INLINE; a FILE-sourced manifest's own `ratified` flag overrides this","type":"boolean"},"node":{"description":"external_id of the node about to be edited","type":"string"},"planned_imports":{"default":[],"description":"Module names this change would add an OUTGOING dependency to; each is evaluated as a planned edge node_module->M","items":{"type":"string"},"type":"array"}},"required":["agent_id","node"],"type":"object"},"name":"xray_gate"},{"description":"X-RAY physical-write verb. WRITES SOURCE FILES TO DISK. One call applies an idempotent, deterministic transform across many source files via an ATOMIC 2-phase apply with content-hash optimistic-concurrency — dry-run by default. Supply a SELECTOR (path_prefix relative to project root + extensions filter) plus a TRANSFORM. TWO transform kinds: (1) kind=ensure_header_tag + tag — FILE-driven, idempotently ensures `tag` appears in each selected file's first 3 lines; (2) kind=annotate_symbol + annotation [+ node_type] — GRAPH/AST-driven: selects symbol NODES from the live graph (tree-sitter provenance captured at ingest — re-parses NOTHING), and inserts `annotation` as its own line immediately ABOVE each symbol's recorded line (bottom-up so line numbers stay valid). For annotate_symbol the selector's path_prefix matches a node's MODULE (first path segment of its external_id) and node_type filters by canonical type u8 (Function=2, Struct=4, …); only symbols whose provenance source_path resolves UNDER the project root are touched. Engine (both kinds): SELECT/plan -> STAGE (write `<file>.xray.tmp` with create-new so a pre-existing temp/symlink can never be followed or clobbered, fsync, never touching originals) -> REHASH all originals -> if any drifted: CONFLICT, abort the whole batch and delete every temp with ZERO partial writes -> else atomic rename ALL (parent dirs fsync'd for durability). Returns counts (matched/planned/skipped_noop/skipped_binary/applied/conflicts + symbols_matched for AST selection) + a planned sample; only writes when mode='commit'. Binary (non-UTF-8) files are skipped and counted as skipped_binary — never planned, staged, or written. status is 'committed' (all swapped), 'partial' (a rename failed mid-swap after ≥1 success — applied = the count actually swapped, remaining temps are LEFT for a retry to complete), 'aborted_conflicts' (drift/contention, ZERO writes), or 'dry_run'. IMPORTANT: a commit that writes files rewrites source bytes WITHOUT updating the in-memory graph — when `graph_resync_required` is true the caller MUST trigger a re-ingest to reconcile the graph with disk (and for annotate_symbol, to refresh the now-shifted line numbers BEFORE any re-run). Confined to the project root; never touches runtime/VCS/build artifacts.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"expect_version":{"description":"Optional cross-call OCC token from a prior dry_run's `version`. On commit the planned-files fingerprint is recomputed after SELECT; if it no longer matches, the commit ABORTS BEFORE staging (status 'aborted_conflicts', applied 0, NO file written) so a concurrent edit between dry_run and commit cannot clobber work. Complements the within-call stage→rehash guard. Omit for an unconditional commit.","type":"string"},"mode":{"default":"dry_run","description":"dry_run (default) plans only and writes nothing; commit applies the atomic 2-phase swap","enum":["dry_run","commit"],"type":"string"},"selector":{"description":"File selector, resolved relative to the project root","properties":{"extensions":{"default":[],"description":"File extensions to include (e.g. [\"rs\"]); empty = any extension","items":{"type":"string"},"type":"array"},"path_prefix":{"description":"Optional path prefix (relative to project root) to narrow the walk","type":"string"}},"type":"object"},"transform":{"description":"The transform to apply. ensure_header_tag is FILE-driven (needs `tag`); annotate_symbol is GRAPH/AST-driven (needs `annotation`, optional `node_type`).","properties":{"annotation":{"description":"annotate_symbol only: the line inserted immediately above each selected symbol (e.g. \"// @xray:reviewed\")","type":"string"},"kind":{"description":"Transform kind. ensure_header_tag idempotently ensures `tag` appears in the file's first 3 lines. annotate_symbol inserts `annotation` as its own line immediately above each selected symbol node's line (resolved from graph tree-sitter provenance; no re-parse).","enum":["ensure_header_tag","annotate_symbol"],"type":"string"},"node_type":{"description":"annotate_symbol only (optional): restrict to a node type via its canonical u8 (File=0, Function=2, Class=3, Struct=4, Enum=5, …). Omit to match any symbol type.","type":"integer"},"position":{"default":"above","description":"annotate_symbol only: insertion position. MVP supports only 'above'.","enum":["above"],"type":"string"},"tag":{"description":"ensure_header_tag only: the header tag to ensure (e.g. \"//! @xray:state:bedrock\")","type":"string"}},"required":["kind"],"type":"object"}},"required":["agent_id","selector","transform"],"type":"object"},"name":"xray_apply"},{"description":"X-RAY write verb (the PAINT pass). One call classifies every in-scope node into a STRUCTURAL proof-state from REAL graph signals and writes it as a persistent tag `xray:state:<state>` — making proof-states QUERYABLE tags instead of ephemeral per-call computations. Per node (honest, proof-grown): `erosion-candidate` if it is the SOURCE of a cross-module edge the manifest flags (candidate, not confirmed — same predicate as xray_orient); else `bedrock` if it has PROOF EVIDENCE — it is exercised by a TEST (a test-source node imports/calls/references it) OR has an incoming `grounded_in` edge (evidence-backed, NOT a mere reference count); else `overgrowth` if it is an orphan (zero incoming reference edges, off-lattice); else `unproven` — used (something references it) but with no proof evidence (the honest majority). BLUEPRINT is a manifest-level absence, never a node tag. Re-paint is idempotent: existing `xray:state:*` tags are REPLACED, never accumulated. Returns counts (scanned/bedrock/overgrowth/unproven/erosion_candidate/painted) plus `proof_coverage` (bedrock/scanned, the fraction with proof evidence) and `manifest_source` (manifest provenance: inline/file:<path>/none), without mutating unless mode='commit'; on commit it applies the columnar tag mutators and persists the graph snapshot. Mutates graph metadata only — never source files.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"manifest":{"description":"North-star ruleset used only to flag `erosion-candidate` source nodes (same shape + predicate as xray_orient). Empty manifest => no erosion candidates (every referenced node is bedrock, every orphan is overgrowth)","properties":{"forbid":{"default":[],"description":"Pairs [A, B] meaning module A must not depend on module B","items":{"items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"layer_order":{"default":[],"description":"Modules ordered low->high; depending on a higher layer flags the source as an erosion-candidate","items":{"type":"string"},"type":"array"},"require_exists":{"default":[],"description":"Unused by paint (accepted for manifest parity with xray_orient)","items":{"type":"string"},"type":"array"}},"type":"object"},"manifest_path":{"description":"Optional path to a North-Star manifest JSON file. Used only when the inline `manifest` is empty; takes precedence over auto-discovery of <workspace_root>/xray.manifest.json. The resolved provenance is echoed back as `manifest_source`.","type":"string"},"mode":{"default":"dry_run","description":"dry_run (default) classifies and counts but writes nothing; commit replaces each node's xray:state:* tag and persists","enum":["dry_run","commit"],"type":"string"},"scope":{"description":"Optional external_id path-prefix filter — only nodes whose external_id starts with this prefix are classified and painted","type":"string"}},"required":["agent_id"],"type":"object"},"name":"xray_paint"},{"description":"X-RAY read verb (read-only). Replays the append-only AUDIT LEDGER that xray_retag / xray_paint / xray_apply append to on every committed bulk write (one JSON line per write, stored beside the graph snapshot as xray.ledger.jsonl), so a write is traceable and manually reversible. Each record carries a monotonic `seq`, the `verb`, the OCC `version` token, a `summary` (the op's counts) and `changes` (per-node before/after tags for retag/paint, or per-file path + before_hash/after_hash for apply, capped at 1000 with `changes_truncated` when overflowed). Returns the LAST `limit` entries MOST RECENT FIRST, optionally filtered by `verb`, plus `total_entries` (full line count) and the resolved `ledger_path`. A missing ledger yields an empty list (honest, not an error). Never mutates, never persists — safe in read-only attach.","inputSchema":{"properties":{"agent_id":{"description":"Calling agent identifier","type":"string"},"limit":{"default":20,"description":"Max entries to return, most recent first (default 20)","type":"integer"},"verb":{"description":"Optional verb-name filter (e.g. \"xray_paint\"); only records whose `verb` equals this are returned and counted toward `limit`","type":"string"}},"required":["agent_id"],"type":"object"},"name":"xray_ledger"}]}