understanding-graph-mcp-server
v0.2.1MCP server for persistent, revisable understanding graphs
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
graph_understand
CONTEXTUAL RE-ENTRY TOOL. Usually enter Understanding mode through this tool directly. In ordinary modes, a separately advertised graph_suggest_next is an optional aid when a choice point would benefit from concrete provocations. Call this when a route or fresh encounter could be changed by prior graph state. It composes a read-only, graph-conditioned prompt for the concrete task instead of leaving continuation only in transient chat or a final artifact. Unlike ordinary retrieval, this surfaces a relevant prior, graph material that resists it, evidence links, and exact typed relations. The pro…
| Parameter | Type | Description |
|---|---|---|
query * | string | The concrete question or task to understand. |
focusNodeIds | array | Optional exact visible node IDs from the latest meaningful encounter or graph_batch.navigation. These nodes and their changed relations are guaranteed a place in this packet instead of competing only… |
project | string | Project ID (optional; defaults to the active project). |
retrieval | string | Retrieval strategy. auto uses semantic matching only when the optional model is already loaded; hybrid explicitly opts into loading it; lexical never needs embeddings. |
stance | string | Epistemic retrieval stance, orthogonal to workflow: balanced, deepen, resist, connect, disrupt, revisit, or test. It changes what graph pressure is weighted; it does not prescribe the next action. |
workflow | string | Task metabolism: reading, research, coding, collaborative_coding, writing, general, or auto inference. |
graph_find_by_trigger
Find all nodes with a specific trigger type. Useful for finding all questions, tensions, serendipities, etc. Use unresolvedOnly=true to find open predictions (no validates/invalidates) or unanswered questions (no answers edge).
| Parameter | Type | Description |
|---|---|---|
trigger * | string | Ordinary authored trigger type to search for. Reserved Reader/CMP thinking blocks are visible only in synthetic_reader mode. |
includeArchived | boolean | Include archived nodes (default: false) |
limit | number | Maximum results (default: 50) |
missingMetadata | string | Only return nodes that do NOT have this metadata field set. Example: "translated" to find untranslated nodes. |
project | string | Project ID (optional) |
unresolvedOnly | boolean | For predictions: exclude those with validates/invalidates edges. For questions: exclude those with answers edge. (default: false) |
graph_updates
Get graph changes (nodes, edges, errors) since a specific timestamp. Use this to maintain state without reloading the full context. Returns new nodes, edges, and YOUR recent actions (success/failure).
| Parameter | Type | Description |
|---|---|---|
since * | string | ISO timestamp (e.g., "2023-10-27T10:00:00.000Z") to fetch updates from. |
project | string | Project ID (optional) |
graph_context
Get the current understanding graph as XML context. For large graphs (50+ nodes), returns a compact view with overview of important concepts and region summaries. Use graph_context_region to drill into specific regions.
| Parameter | Type | Description |
|---|---|---|
compact | boolean | Force compact mode (region summaries instead of full graph). Auto-enabled for large graphs. |
detail_level | string | Control verbosity: "titles" = just node names, "brief" = titles + truncated understanding (100 chars), "full" = everything (default) |
hide_document_content | boolean | Hide content from document nodes but show their structure. Useful for seeing doc outline without full text. |
include_fields | array | Granular field selection. Overrides detail_level. Example: ["title", "trigger"] for minimal view |
max_tokens | number | Maximum tokens for output (default: 8000). Lower values show fewer concepts per region. |
nodeId | string | Focus context around a specific node and its neighbors. Overrides compact mode. |
project | string | Project ID (optional) |
show_evolution | boolean | Include superseded nodes to see how understanding evolved |
graph_context_region
Get full details for a specific region/cluster of concepts. Use after graph_context to drill into regions of interest.
| Parameter | Type | Description |
|---|---|---|
region_id * | number | The region ID from graph_context output |
detail_level | string | Control verbosity: "titles" = just node names, "brief" = titles + truncated understanding (100 chars), "full" = everything (default) |
hide_document_content | boolean | Hide content from document nodes but show their structure. |
include_fields | array | Granular field selection. Overrides detail_level. Example: ["title", "trigger"] for minimal view |
project | string | Project ID (optional) |
show_evolution | boolean | Include superseded nodes |
graph_skeleton
Ultra-minimal graph overview (~150 tokens) of the CURRENTLY ACTIVE project. Shows regions with sizes, hub nodes, and recent activity. Use for initial orientation before drilling into regions. To inspect a different project, call project_switch first — graph_skeleton always reports on whatever project is active at call time.
graph_path
Find the shortest path between two concepts. Shows how they connect through the graph.
| Parameter | Type | Description |
|---|---|---|
from * | string | Starting node (ID or name) |
to * | string | Ending node (ID or name) |
project | string | Project ID (optional) |
graph_analyze
Analyze graph structure to find gaps, cycles, bridges, and open questions.
| Parameter | Type | Description |
|---|---|---|
include | array | What to include in analysis |
project | string | Project ID (optional) |
show_evolution | boolean | Include superseded nodes in analysis |
graph_history
Read the recent activity and commit feeds for the current project: who created/revised which nodes and edges, with commit messages and agent attribution in chronological order. Returns one XML packet so structure is preserved when other agents quote from it. Use it when recent collaboration or activity could affect the current task; it is not a required session-opening ritual.
| Parameter | Type | Description |
|---|---|---|
entity | string | Filter to specific node/edge ID |
limit | number | Number of recent events to show (default: 50) |
project | string | Project ID (optional) |
project_switch
Switch to a different project, creating it if it does not exist yet. The project becomes the active target for all subsequent graph mutations and queries. Pass the project you want to use; the matching directory + SQLite database are loaded (or created) on demand. Set goal to describe the project purpose (shown in the UI).
| Parameter | Type | Description |
|---|---|---|
project * | string | Descriptive project ID to switch to or create |
goal | string | Short description of the project goal (e.g. "Deep reading of Erta Ale"). Saved to meta.json and shown in the frontend sidebar. |
project_list
List all available projects.
graph_similar
Find nodes structurally similar to a given node (share neighbors). Use this to discover related concepts you might want to connect.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node ID or name to find similar nodes for |
limit | number | Max results (default: 10) |
project | string | Project ID (optional) |
graph_semantic_gaps
Find potential missing connections - node pairs that are semantically similar but not connected. Uses embeddings when available, falls back to keyword matching.
| Parameter | Type | Description |
|---|---|---|
limit | number | Max results (default: 20) |
project | string | Project ID (optional) |
use_embeddings | boolean | Use embedding similarity instead of keyword matching (default: true, requires embeddings) |
graph_centrality
Get advanced centrality measures: PageRank (importance via link structure), Betweenness (bridges between clusters), Degree (connection count). Use to find the most important concepts.
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
graph_semantic_search
Search nodes by semantic similarity to a query. Uses embeddings to find conceptually related nodes even if they don't share keywords. Returns region_id for each result to enable efficient context loading via graph_context_region.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query - finds nodes with similar meaning |
limit | number | Max results (default: 10) |
project | string | Project ID (optional) |
graph_suggest_next
OPTIONAL UNDERSTANDING AID. Call when a substantive graph-backed task reaches a choice point where graph-specific pointers could deepen or diversify understanding, recover neglected material, test the current view, or make a useful connection newly visible. Direct use of graph_understand, graph_batch, and other graph tools is equally valid and loses no capability. This endpoint rolls several graph-state-, task-, and workflow-weighted concrete possibilities. Every option carries an epistemic stance—balanced, deepen, resist, connect, disrupt, revisit, or test—that can shape the next graph_un…
| Parameter | Type | Description |
|---|---|---|
task * | string | The live user task, local question, or uncertainty that the next move must serve. |
count | integer | Number of sampled options to return (default: 4). |
creativity | boolean | Whether this roll may include optional creativity provocations such as bisociation, ANI, disruption, and temporary forcing (default: true). false keeps ordinary re-entry, search, integration, artifact… |
focusNodeIds | array | Optional current graph focus. Unknown or hidden IDs are omitted from suggestions. |
project | string | Project ID (optional) |
updatesSince | string | Optional ISO timestamp cursor. When present, the roll can offer a concrete graph_updates catch-up route. |
workflow | string | Task workflow (default: general). |
graph_thermostat
Optional entropy-style graph-state pulse. Use it when deciding whether the current graph would benefit from convergence, ordinary continuation, or a more divergent creativity tool. It is advisory, not a governor; graph_suggest_next can turn the broad pressure into concrete weighted options.
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
graph_score
Calculate a structural diagnostic for ordinary graph state: chronological references, supersession, question resolution, edge specificity, connectivity, and explanations. Reserved Reader/CMP artifacts are excluded. This score is a proxy, not evidence of semantic quality.
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
graph_practice
Report how this graph has been WORKED, as distinct from how it is shaped: whether it is re-entered or only written to, whether artifact units carry links to the understanding that shaped them, whether practices present early have since decayed, whether existing predictions were later scored, and whether anything has been overturned. Absent node types are omitted rather than presented as missing work. graph_analyze and graph_score answer whether a graph is well formed and cannot answer whether it is doing anything — a graph nobody re-enters scores exactly like one that changes someone's mind.…
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
graph_batch
Execute multiple graph operations as an ATOMIC COMMIT. The entire batch is wrapped in a SQLite transaction. If any operation fails, the entire batch is rolled back as if it never ran — there is no half-state to clean up. This is the system's "Atomic Commit" primitive from the paper: it lets you branch and revert cognitive states cleanly. The required commit_message becomes the Origin Story attached to every node and edge created in the batch. Future agents reading those nodes see the intent that created them, not just the content. The commit stream is the provenance trail of how externaliz…
| Parameter | Type | Description |
|---|---|---|
agent_name * | string | REQUIRED. Who is committing (e.g. Alice, claude-opus-5, reader-3). A commit without it is anonymous forever: the graph cannot say whose understanding a node represents, which agent to disagree with, o… |
commit_message * | string | REQUIRED. A human-readable message explaining the intent of this batch. Like a git commit message, it describes WHY these changes are being made. Examples: "Added core auth concepts", "Refined underst… |
operations * | array | Array of operations to execute in sequence |
author | string | Optional human-facing identity responsible for the commit. Hosted gateways should set this from the authenticated account rather than trusting an agent-supplied value. |
ignoreWarnings | boolean | If true, skip duplicate detection and execute immediately. If false (default), check for potential duplicate concepts before executing and return warnings if found. |
stopOnError | boolean | If true (default), stop on the first error. If false, attempt the remaining operations to collect more errors, then roll back the entire batch if any operation failed. |
warningThreshold | number | Similarity threshold (0-1) for duplicate warnings. Default 0.8. Higher = stricter (fewer warnings), lower = more sensitive (more warnings). Use 0.9 for strict, 0.7 for lenient. |
workflow | string | Current task workflow. Pass this on broad/full or hosted MCP surfaces so the machine-readable graph_understand re-entry stays in reading, research, coding, collaborative coding, writing, or general wo… |
graph_discover
HIGH-DIVERGENCE, UNGROUNDED ANI (Axiomatic Noise Injection). Use when the live work genuinely benefits from high-divergence exploration, whether chosen directly or offered by a creativity-enabled suggestion roll. For ordinary connection-finding, prefer graph_discover_grounded: it first asks for a defensible bridge and allows "no connection" as an answer. WHAT IT DOES: 1. Selects random nodes from graph 2. Corrupts their synthesis with chaos seeds (dictionary words) 3. Returns a prompt for sense-making WORKFLOW: 1. Call graph_discover({ nodes: 2, cold: true }) 2. Read the returned "prompt" f…
| Parameter | Type | Description |
|---|---|---|
blind | boolean | When true, omits original graph material and seed details and supplies a prompt suitable for a fresh isolated context. The host must enforce isolation; the MCP tool cannot do so itself. |
cold | boolean | Prioritize rarely-accessed nodes for maximum semantic distance. Use true for more surprising connections. |
intensity | number | Experimental replacement probability from 0.0 to 1.0 (default: 0.25). Higher values perturb more of the material but carry no quality guarantee. |
nodes | integer | Number of random nodes to select (1-8; default: 3) |
project | string | Project ID (optional) |
graph_discover_grounded
DEFAULT serendipity workflow: 1) Pick random nodes and optional edges whose endpoints are among them, 2) Find a defensible connection or explicitly report none, 3) optionally perturb the grounded bridge, 4) integrate only what survives scrutiny. Prefer this over ungrounded graph_discover for understanding work.
| Parameter | Type | Description |
|---|---|---|
cold | boolean | Prioritize rarely-accessed nodes for maximum semantic distance. |
edges | integer | Maximum random edges among the selected nodes to include (0-8; default: 0) |
intensity | number | Chaos injection intensity for phase 3 (0.0-1.0). Applied AFTER sense-making. Default: 0.20 |
nodes | integer | Number of random nodes to select (2-8; default: 3) |
project | string | Project ID (optional) |
graph_discover_grounded_chaos
Phase 3 of grounded serendipity: Takes the genuine bridge you found and injects chaos to push it into unexplored territory. Call this AFTER graph_discover_grounded once you have articulated the real connection. Requires a host-installed newline-delimited dictionary; set UG_ANI_DICTIONARY_PATH when no standard system word list exists.
| Parameter | Type | Description |
|---|---|---|
bridge * | string | The genuine connection you found between the concepts (from Phase 2) |
source_nodes * | array | Node IDs from the original graph_discover_grounded call |
explanation | string | Your explanation of why this connection is real |
intensity | number | Chaos injection intensity (0.0-1.0). Default: 0.20 |
project | string | Project ID (optional) |
graph_bisociate
Optional Bisociation Engine: use spreading activation and information-gain signals to surface concrete concept pairs that may support an unexpected connection. Supply seed_nodes to spread from the current focus, or omit them for graph-wide mixed sampling. The candidates are provocations for model judgment, not claims that a connection exists.
| Parameter | Type | Description |
|---|---|---|
decay | number | Activation retained per hop for explicit seeds (default: 0.6). |
limit | integer | Maximum candidates to return (default: 8). |
project | string | Project ID (optional) |
seed_nodes | array | Optional node IDs or titles representing the current focus. Activation spreads through their graph neighborhoods. |
steps | integer | Maximum spreading-activation hops for explicit seeds (default: 3). |
strategy | string | Graph-wide seed strategy when seed_nodes is omitted (default: mixed). |
graph_random
Sample concrete graph elements for divergent exploration. Use the returned nodes as provocations: judge how, or whether, they matter to the live task. No defensible connection is valid. force:true enables the stronger local Physics What-If experiment; ordinary work should normally keep force:false.
| Parameter | Type | Description |
|---|---|---|
cold | boolean | Prioritize cold (rarely accessed) nodes for maximum semantic distance. Best combined with force:true. |
count | integer | Deprecated alias for nodes. Edges remain controlled independently by edges. |
edges | integer | Number of random edges to get |
force | boolean | Optional Physics What-If experiment that temporarily assumes sampled concepts connect and asks how. Default false; reject the result unless later scrutiny grounds it. |
nodeIds | array | Optional exact node IDs or titles supplied by graph_suggest_next. When present, inspect these nodes instead of drawing another random sample. |
nodes | integer | Number of random nodes to get (default: 2 when force:true, 3 otherwise) |
project | string | Project ID (optional) |
graph_chaos
ANI (Axiomatic Noise Injection): Corrupt text with chaos seeds to force a divergent reinterpretation. WHAT IT DOES: 1. Takes your text (or random node content) 2. Replaces words independently at a configurable probability (25% by default) 3. Returns corrupted text + "Physics What-If" prompt WORKFLOW: 1. graph_chaos({ text: "Your concept description" }) 2. Read the "prompt" field from result 3. CRITICAL: Start a BLIND agent or isolated model context using ONLY the prompt - Agent must NOT see original text - This tests the Inverse Hallucination method by asking the model to invent logic…
| Parameter | Type | Description |
|---|---|---|
blind | boolean | When true, omits original text and seed details and supplies a prompt suitable for a fresh isolated context. The host must enforce isolation; the MCP tool cannot do so itself. |
intensity | number | Experimental replacement probability from 0.0 to 1.0 (default: 0.25). Higher values perturb more of the material but carry no quality guarantee. |
project | string | Project ID (optional) |
source | string | Entropy source. "dictionary" (default): use the machine-local word list detected by the server. "graph": use existing node names for self-referential chaos. |
source_node | string | Optional graph node ID or title anchoring caller-supplied text. Supply it when a retained candidate should be attributable to existing graph material. |
text | string | Text to corrupt with chaos seeds. If not provided, uses a random node understanding from the graph. |
graph_evaluate_variations
Experimentally rank candidate texts by a Novelty Score: the harmonic mean of semantic divergence from the supplied original context and caller-assessed coherence. Returns candidates best-to-worst with per-candidate scores; it does not measure truth or validate the winner. Originally designed as the selection phase of the ANI serendipity pipeline (see graph_chaos / graph_discover).
| Parameter | Type | Description |
|---|---|---|
context * | string | The original context/text before chaos injection |
variations * | array | Array of generated narrative variations to compare |
coherence_scores | array | Optional 0-10 coherence scores for each variation (default: 8.0) |
project | string | Project ID (optional) |
source_load
Stage a text source for chronological reading when sequence matters: books, papers, articles, transcripts, or similar texts. The source body is stored in SQLite but NOT returned by this call; encounter it portion by portion with source_read. For a filePath, do not inspect or sample the file first. This is not the graph-native coding workflow: code belongs in ordered document nodes, with generated files used only as executable projections. Accepts content directly or a filePath within UG_SOURCE_ROOT (the server working directory by default).
| Parameter | Type | Description |
|---|---|---|
title * | string | Title of the source (e.g., "Attention Is All You Need") |
content | string | Full text content to read through (use filePath instead for large files) |
filePath | string | Relative or absolute path to a text file within UG_SOURCE_ROOT (defaults to the server working directory) |
project | string | Project ID (optional) |
sourceType | string | Type of sequential source: "book", "paper", "article", "transcript", "docs", etc. |
workflow | string | Purpose for re-entry guidance. Use research when passages serve a live inquiry; otherwise reading. |
source_read
Read the next portion of a text source and AUTO-CREATE a content node. The content is automatically committed to the graph as a document node - perfect replication from source, no manual copying needed. ORDINARY READING WORKFLOW: 1. source_read → exact encountered content is appended to the source chain 2. Stop at a natural, self-selected boundary when something will help later continuation 3. If warranted, use graph_batch to add each understanding with graph_add_understanding and connect it to the exact content node with learned_from 4. Continue with source_read; never use unread material…
| Parameter | Type | Description |
|---|---|---|
commit_message * | string | Why this is the next useful source-defined or self-selected reading boundary. Do not manufacture an insight; a read with no durable update is valid. |
sourceId * | string | Source ID from source_load |
anchorNode | string | Existing concept ID or exact title that this source reading should contextualize. Required only when starting a new source in a non-empty graph; the tool never guesses an anchor. |
chars | number | Read next N characters (default: 2000) |
lines | number | Read next N lines |
project | string | Project ID (optional) |
until | string | Read until this delimiter (e.g., "##" for markdown headers, "\n\n" for paragraphs) |
workflow | string | Purpose for re-entry guidance. Use research when passages serve a live inquiry; otherwise reading. |
source_position
Get the current reading progress for a text source. Hidden cursor IDs are never returned. In every ordinary mode, reserved synthetic Reader/CMP blocks are excluded and unavailable. TOOL_MODE="synthetic_reader" may read and export them.
| Parameter | Type | Description |
|---|---|---|
sourceId * | string | Source ID |
project | string | Project ID (optional) |
source_list
List all text sources in the current project.
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
source_export
Export a completed source reading. In an ordinary mode, the export is the exact source with reserved synthetic Reader/CMP blocks excluded and unavailable. TOOL_MODE="synthetic_reader" may include those blocks in chronological position. Preserves original source content and does not request private chain-of-thought.
| Parameter | Type | Description |
|---|---|---|
sourceId * | string | Source ID |
format | string | Output format: "markdown" uses code blocks, "xml" uses <thinking> tags. Default: markdown |
project | string | Project ID (optional) |
thinkingMode | string | Preexisting synthetic Reader/CMP block mode: "graph" uses original structured text, "fluid" uses its translated pretraining prose (if available). Default: graph |
doc_list_roots
List all document root nodes in the current project.
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
doc_get_tree
Get the document tree structure starting from a root node. Use brief=true for compact outline (just titles and hierarchy), or omit for full content.
| Parameter | Type | Description |
|---|---|---|
rootId * | string | Document root node ID |
brief | boolean | If true, returns compact outline (id, text, level, children only). If false/omitted, includes summary. Use brief=true to see document structure before drilling into specific sections. |
maxDepth | number | Maximum depth to traverse (default: 10) |
project | string | Project ID (optional) |
doc_get_children
Get the child nodes of a document node (via contains edges).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Parent node ID |
project | string | Project ID (optional) |
doc_get_chain
Get the sequence of nodes starting from a given node (via next edges).
| Parameter | Type | Description |
|---|---|---|
startId * | string | Starting node ID |
project | string | Project ID (optional) |
doc_flatten
Flatten a document tree into a linear sequence for rendering. Uses depth-first traversal.
| Parameter | Type | Description |
|---|---|---|
rootId * | string | Document root node ID |
project | string | Project ID (optional) |
doc_get_concepts
Get the concepts that a document node expresses (via expresses edges).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Document node ID |
project | string | Project ID (optional) |
doc_get_path
Get the path from a document root to a specific node in the document tree.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Target node ID |
project | string | Project ID (optional) |
doc_read
Read exact document content starting from any node. Pass a document root to read the whole document, or an exact passage/function/test node to inspect that unit. A root read without pagination is unbounded and intended only for small documents. For a bounded end-to-end reread, pass offset and limit, then continue with pagination.nextOffset until hasMore is false. Returns content, structure, and compact open attention. Add showRevisions: true for edit history and showProvenance: true for the recorded purpose, origin commit, and typed rationale relations that answer why this unit exists or chang…
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node ID to start reading from. Can be a document root (whole doc) or any section (just that branch). |
limit | integer | Maximum exact document units to return. Supplying offset or limit enables bounded pagination; default 10 in paginated mode. |
offset | integer | Zero-based document-unit offset in depth-first reading order. Supplying offset or limit enables bounded pagination. |
project | string | Project ID (optional) |
showProvenance | boolean | If true, include each unit's recorded purpose, origin commit, and all non-structural incoming/outgoing relations with their exact why. These are authored provenance claims, not verified causes. |
showRevisions | boolean | If true, include full revision history for each section showing how it evolved. Default false. |
doc_generate
Generate a file from a document root and resurface compact open attention linked to its units before the projection is tested. Outputs to the project generated/ folder.
| Parameter | Type | Description |
|---|---|---|
rootId * | string | Document root node ID to generate file from |
project | string | Project ID (optional) |
doc_generate_all
Generate files for all document roots in the project. Outputs to the project generated/ folder.
| Parameter | Type | Description |
|---|---|---|
project | string | Project ID (optional) |
doc_watch_start
Start watching a document for changes. The file will auto-update when document nodes change.
| Parameter | Type | Description |
|---|---|---|
rootId * | string | Document root node ID to watch |
project | string | Project ID (optional) |
doc_watch_stop
Stop watching a document for changes.
| Parameter | Type | Description |
|---|---|---|
rootId * | string | Document root node ID to stop watching |
project | string | Project ID (optional) |
node_get_metadata
Get metadata from a node.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or ID |
key | string | Specific key to retrieve (optional, returns all if not specified) |
project | string | Project ID (optional) |