Skip to content

MCP Tools Reference

73 tools across 12 categories. Also available as 22 HTTP REST endpoints via --http mode. The agentstategraph-mcp binary additionally offers a migrate subcommand for schema upgrades — it’s a one-shot CLI, not an MCP tool.

CategoryToolsCount
Stateget, set, delete3
Branchesbranch, list_branches, merge, diff4
Namespacescreate_namespace, list_namespaces, delete_namespace, cross_namespace_merge4
Speculationspeculate, spec_modify, compare, commit_spec, discard5
History & Querylog, query, blame3
Epochscreate_epoch, seal_epoch, archive_epoch, export_epoch, enter_epoch, exit_epoch, list_epochs7
Sessionscreate_session, enter_session, exit_session, sessions4
Plans & Taskscreate_plan, list_plans, get_plan, add_task, list_tasks, start_task, complete_task, abandon_task, assign_task, next_task10
Policypolicy_propose, policy_ratify, policy_supersede, policy_list, policy_show, policy_history, policy_evaluate, policy_evaluate_change, policy_evaluate_change_with_taints, policy_check_tokens, policy_sign, policy_verify, policy_cedar, policy_rego, policy_wasm15
Taint & Quarantinetaint, untaint, quarantine, unquarantine, watch, unwatch, list_taints, check_taint8
Remindersreminder_create, reminder_list, reminder_remind_me, reminder_snooze, reminder_approve, reminder_cancel, reminder_record_execution7
Explorerlist_paths, get_tree, search, stats, commit_graph, intent_tree6

Every tool name in MCP is prefixed with agentstategraph_ (e.g., agentstategraph_get). Every tool that reads or writes state accepts an optional namespace parameter for multi-tenant isolation.

Read a value from state at any branch, tag, or commit.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch, tag, or commit ID
pathstringyesJSON path (e.g., /nodes/0/status). Use / for entire state.

Example input:

{ "ref": "main", "path": "/cluster/name" }

Example output:

"prod"

Write a value to state, creating a new atomic commit with intent metadata.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch to commit to
pathstringyesJSON path to set
valueanyyesJSON value to write
intent_categorystringyesExplore, Refine, Fix, Rollback, Checkpoint, Merge, Migrate
intent_descriptionstringyesWhy this change is being made
reasoningstringnoAgent’s chain-of-thought
confidencenumbernoSelf-assessed confidence (0.0-1.0)
tagsstring[]noQueryable tags

Example input:

{
"path": "/cluster/replicas",
"value": 3,
"intent_category": "Refine",
"intent_description": "Scale to 3 replicas",
"reasoning": "Traffic increased 40% over last hour",
"confidence": 0.85,
"tags": ["scaling", "auto"]
}

Example output:

Committed: a1b2c3d4

Remove a value from state, creating a new commit.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch
pathstringyesJSON path to delete
intent_categorystringyesIntent category
intent_descriptionstringyesWhy this deletion

Example input:

{
"path": "/cluster/deprecated_config",
"intent_category": "Fix",
"intent_description": "Remove deprecated config field"
}

Example output:

Deleted and committed: e5f6g7h8

Create a new branch from any ref. Supports namespaced names.

Parameters:

NameTypeRequiredDefaultDescription
namestringyesBranch name (supports / namespacing)
fromstringno"main"Ref to branch from

Example input:

{ "name": "agents/planner/workspace", "from": "main" }

Example output:

Branch 'agents/planner/workspace' created at a1b2c3d4

List all branches, optionally filtered by namespace prefix.

Parameters:

NameTypeRequiredDefaultDescription
prefixstringnoNamespace prefix filter

Example input:

{ "prefix": "agents/" }

Example output:

2 branches:
agents/planner/workspace -> a1b2c3d4
agents/executor/workspace -> e5f6g7h8

Merge source branch into target. Uses schema-aware merge. Returns conflicts if auto-resolution fails.

Parameters:

NameTypeRequiredDefaultDescription
sourcestringyesBranch to merge from
targetstringno"main"Branch to merge into
intent_descriptionstringyesWhy this merge
reasoningstringnoReasoning for merge

Example input:

{
"source": "feature/new-network",
"target": "main",
"intent_description": "Adopt flannel network config",
"reasoning": "Lower overhead than calico in benchmarks"
}

Example output (success):

Merged 'feature/new-network' into 'main': i9j0k1l2

Example output (conflict):

CONFLICTS (1):
[
{
"path": "/cluster/network/dns",
"base": "8.8.8.8",
"ours": "1.1.1.1",
"theirs": "9.9.9.9"
}
]

Structured diff between two refs. Returns typed DiffOps, not text diffs.

Parameters:

NameTypeRequiredDefaultDescription
ref_astringyesFirst ref
ref_bstringyesSecond ref

Example input:

{ "ref_a": "main", "ref_b": "feature/v2" }

Example output:

2 changes:
[
{ "op": "SetValue", "path": "/app/version", "value": "2.0" },
{ "op": "AddKey", "path": "/app/features/dark-mode", "value": true }
]

Create a lightweight speculation from a ref. O(1) creation.

Parameters:

NameTypeRequiredDefaultDescription
fromstringno"main"Ref to speculate from
labelstringnoHuman-readable label

Example input:

{ "from": "main", "label": "try-ceph-storage" }

Example output:

Speculation created: handle_id=1 (from 'main', label: "try-ceph-storage")

Modify state within a speculation. Changes are isolated until committed.

Parameters:

NameTypeRequiredDefaultDescription
handle_idnumberyesSpeculation handle ID
operationsarrayyesArray of {op, path, value?}

Each operation has:

  • op: "set" or "delete"
  • path: JSON path
  • value: required for "set"

Example input:

{
"handle_id": 1,
"operations": [
{ "op": "set", "path": "/storage/type", "value": "ceph" },
{ "op": "set", "path": "/storage/replicas", "value": 3 },
{ "op": "delete", "path": "/storage/legacy" }
]
}

Example output:

Applied 3 operations to speculation 1

Compare multiple speculations. Returns diffs showing how each diverges from base.

Parameters:

NameTypeRequiredDefaultDescription
handle_idsnumber[]yesSpeculation handle IDs to compare

Example input:

{ "handle_ids": [1, 2] }

Example output:

[
{
"handle": 1,
"label": "try-ceph",
"changes": 2,
"diff": [
{ "op": "SetValue", "path": "/storage/type", "value": "ceph" },
{ "op": "SetValue", "path": "/storage/replicas", "value": 3 }
]
},
{
"handle": 2,
"label": "try-nfs",
"changes": 1,
"diff": [
{ "op": "SetValue", "path": "/storage/type", "value": "nfs" }
]
}
]

Promote a speculation to a real commit on its base branch. The speculation is consumed.

Parameters:

NameTypeRequiredDefaultDescription
handle_idnumberyesSpeculation handle ID
intent_categorystringyesIntent category
intent_descriptionstringyesWhy this approach was chosen
reasoningstringnoReasoning
confidencenumbernoConfidence (0.0-1.0)

Example input:

{
"handle_id": 2,
"intent_category": "Checkpoint",
"intent_description": "Use NFS storage",
"reasoning": "Only 2 nodes available, Ceph needs 3+",
"confidence": 0.9
}

Example output:

Speculation committed: m3n4o5p6

Discard a speculation. All changes freed immediately.

Parameters:

NameTypeRequiredDefaultDescription
handle_idnumberyesSpeculation handle ID

Example input:

{ "handle_id": 1 }

Example output:

Speculation 1 discarded

List commits with full intent, reasoning, and metadata.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref
limitnumberno10Max commits to return

Example input:

{ "ref": "main", "limit": 3 }

Example output:

[
{
"id": "a1b2c3d4",
"agent": "mcp-agent",
"intent": {
"category": "Refine",
"description": "Scale to 3 replicas",
"tags": ["scaling"]
},
"reasoning": "Traffic increased 40%",
"confidence": 0.85,
"parents": 1,
"timestamp": "2026-04-06T12:00:00Z"
}
]

Query commits with composable filters. All filters are AND-combined.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch to query
agent_idstringnoFilter by agent
intent_categorystringnoFilter by category
tagsstring[]noFilter by tags (all must match)
authority_principalstringnoFilter by authority
reasoning_containsstringnoFull-text search in reasoning
confidence_minnumbernoMinimum confidence
confidence_maxnumbernoMaximum confidence
has_deviationsbooleannoOnly results with deviations
limitnumberno20Max results

Example input:

{
"agent_id": "agent/scaler",
"intent_category": "Refine",
"confidence_min": 0.8,
"limit": 5
}

Example output:

[
{
"id": "a1b2c3d4",
"agent": "agent/scaler",
"intent": {
"category": "Refine",
"description": "Scale to 3 replicas",
"tags": ["scaling"]
},
"reasoning": "Traffic increased 40%",
"confidence": 0.85,
"timestamp": "2026-04-06T12:00:00Z"
}
]

Find which commit last modified a value at a path and why.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch
pathstringyesPath to blame

Example input:

{ "path": "/cluster/replicas" }

Example output:

{
"commit_id": "a1b2c3d4",
"agent": "agent/scaler",
"intent": {
"category": "Refine",
"description": "Scale to 3 replicas"
},
"reasoning": "Traffic increased 40%",
"confidence": 0.85,
"timestamp": "2026-04-06T12:00:00Z"
}

Create a new epoch to group related work.

Parameters:

NameTypeRequiredDefaultDescription
idstringyesEpoch ID (e.g., "2026-04-incident-node3")
descriptionstringyesDescription
root_intentsstring[]yesRoot intent IDs that define this epoch

Example input:

{
"id": "2026-04-incident-node3",
"description": "Node3 failure recovery",
"root_intents": ["intent-001", "intent-002"]
}

Example output:

Epoch '2026-04-incident-node3' created (status: Open)

Seal an epoch, making it read-only and tamper-evident. Cannot be undone.

Parameters:

NameTypeRequiredDefaultDescription
idstringyesEpoch ID
summarystringyesFinal summary

Example input:

{
"id": "2026-04-incident-node3",
"summary": "Node3 recovered. Replicas restored to 3. No data loss."
}

Example output:

Epoch '2026-04-incident-node3' sealed

List all epochs with their status, dates, and commit counts.

Parameters: None.

Example output:

[
{
"id": "2026-04-incident-node3",
"description": "Node3 failure recovery",
"status": "Sealed",
"commits": 12,
"agents": ["agent/monitor", "agent/recovery"],
"tags": ["incident", "node3"],
"created": "2026-04-06T10:00:00Z",
"sealed": "2026-04-06T11:30:00Z"
}
]

List active agent sessions with parent-child relationships and path scoping.

Parameters:

NameTypeRequiredDefaultDescription
agent_idstringnoFilter by agent

Example input:

{ "agent_id": "agent/planner" }

Example output:

[
{
"id": "session-001",
"agent": "agent/planner",
"branch": "agents/planner/workspace",
"parent_session": null,
"delegated_intent": "intent-001",
"report_to": "cbrown",
"path_scope": "/cluster",
"created": "2026-04-06T12:00:00Z"
}
]

List all leaf paths in the state tree under a prefix. Use to explore what data exists.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref
prefixstringno"/"Path prefix to list under
max_depthnumberno50Max tree depth to traverse

Example input:

{ "ref": "main", "prefix": "/cluster" }

Example output:

6 paths:
/cluster/name
/cluster/region
/cluster/nodes/0/hostname
/cluster/nodes/0/status
/cluster/network/topology
/cluster/config/log_level

Get an entire subtree as nested JSON. Efficient batch alternative to reading individual paths.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref
prefixstringno"/"Path prefix to get subtree for

Example input:

{ "ref": "main", "prefix": "/cluster/network" }

Example output:

{
"topology": "mesh",
"subnet": "10.0.0.0/24",
"dns": "1.1.1.1"
}

Search state values and key names for a query string. Case-insensitive.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref
querystringyesSearch query (matches values and key names)
max_resultsnumberno50Max results to return

Example input:

{ "query": "mesh" }

Example output:

[
{ "path": "/cluster/network/topology", "value": "mesh" }
]

Get summary statistics for a ref. Useful for dashboard displays.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref

Example output:

{
"commit_count": 47,
"branch_count": 5,
"path_count": 23,
"epoch_count": 2,
"agents": ["agent/monitor", "agent/planner", "agent/setup"],
"categories": ["Checkpoint", "Explore", "Fix", "Merge", "Refine"],
"latest_commit": {
"id": "sg_f5b2..17",
"agent": "agent/compliance",
"intent": "Seal Q1 epoch",
"timestamp": "2026-04-10T14:33:00Z"
}
}

Get the commit DAG for visualization. Returns nodes with parents, agent, category, and timestamps.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref
depthnumberno50Max commits to include

Example output:

[
{
"id": "sg_f5b2..17",
"full_id": "sg_f5b2c39e...",
"parents": ["sg_d1e8..9a"],
"agent": "agent/compliance",
"category": "Checkpoint",
"description": "Seal Q1 epoch",
"confidence": 0.99,
"timestamp": "2026-04-10T14:33:00Z",
"is_merge": false
}
]

Get the intent decomposition tree. Shows how intents are broken down into sub-tasks across agents.

Parameters:

NameTypeRequiredDefaultDescription
refstringno"main"Branch or ref
root_commit_idstringnoOptional root commit ID to start from

Example output:

{
"roots": [
{
"id": "sg_6c0d..78",
"agent": "agent/setup",
"category": "Checkpoint",
"description": "Initialize cluster",
"confidence": 0.99,
"children": [
{
"id": "sg_7d1c..56",
"agent": "agent/setup",
"category": "Checkpoint",
"description": "Add node-1 as worker",
"children": []
}
]
}
],
"total_commits": 47
}

Create a new isolated ref namespace.

ParameterTypeRequiredDescription
namespacestringyesNamespace identifier
descriptionstringnoHuman-readable description

List all namespaces. No parameters.

Delete a namespace and all its refs.

ParameterTypeRequiredDescription
namespacestringyesNamespace to delete

Merge a ref from one namespace into another. Requires both namespace policies to permit it.

ParameterTypeRequiredDescription
source_namespacestringyesNamespace to merge from
source_refstringyesRef in the source namespace
target_namespacestringyesNamespace to merge into
target_refstringyesRef in the target namespace
intent_descriptionstringyesWhy this cross-namespace merge
reasoningstringnoReasoning

Archive a sealed epoch to long-term storage. The epoch remains queryable but is marked archived.

ParameterTypeRequiredDescription
idstringyesEpoch ID

Export a sealed epoch as a portable JSON bundle with the Merkle root hash for offline verification.

ParameterTypeRequiredDescription
idstringyesEpoch ID

Scope subsequent commits to a specific epoch. All commits made while in an epoch are automatically tagged with its ID.

ParameterTypeRequiredDescription
idstringyesEpoch ID to enter

Exit the current epoch scope. No parameters.


Create a new agent session with an identity, branch, parent, and optional path scope.

ParameterTypeRequiredDescription
agent_idstringyesIdentity for this session
branchstringyesWorking branch
parent_sessionstringnoParent session ID for delegation chains
delegated_intentstringnoIntent this session is executing on behalf of
path_scopestringnoRestrict all writes to this path prefix
report_tostringnoWho receives the resolution report

agentstategraph_enter_session / agentstategraph_exit_session

Section titled “agentstategraph_enter_session / agentstategraph_exit_session”

Enter an existing session (scoping subsequent operations to it) or exit the current session. Both accept the session ID or no parameters (for exit).


See Core Concepts → Plans & Tasks for the full model.

ParameterTypeRequiredDescription
idstringyesPlan identifier
descriptionstringyesWhat this plan accomplishes
tagsstring[]noQueryable tags

agentstategraph_list_plans / agentstategraph_get_plan

Section titled “agentstategraph_list_plans / agentstategraph_get_plan”

List all plans or get a specific plan with its tasks.

Add a task to an existing plan.

ParameterTypeRequiredDescription
plan_idstringyesPlan to add to
task_idstringyesTask identifier
descriptionstringyesWhat this task accomplishes
assigned_tostringnoAgent assigned to this task
blockersstring[]noTask IDs that must complete first

agentstategraph_start_task / agentstategraph_complete_task / agentstategraph_abandon_task

Section titled “agentstategraph_start_task / agentstategraph_complete_task / agentstategraph_abandon_task”

Transition a task’s state machine: pending → in_progress → done (or abandoned).

Assign or reassign a task to an agent.

Get the next unblocked task for an agent.

ParameterTypeRequiredDescription
agent_idstringyesAgent to find work for
plan_idstringnoRestrict to a specific plan

See Policy guide for the full lifecycle.

ToolDescription
policy_proposeSubmit a new policy for ratification
policy_ratifyApprove a proposed policy, making it active
policy_supersedeReplace an active policy with a new version
policy_listList policies, optionally filtered by status
policy_showGet a specific policy’s full definition
policy_historyGet the propose → ratify → supersede chain for a policy
policy_evaluateEvaluate a subject+action+resource triple against active policies
policy_evaluate_changeEvaluate a planned commit against active policies
policy_evaluate_change_with_taintsEvaluate a planned commit including taint checks
policy_check_tokensCheck whether a commit’s estimated token cost is within policy
policy_signSign a policy with the configured Ed25519 key
policy_verifyVerify a policy’s signature
policy_cedarRegister a Cedar policy as the active evaluator
policy_regoRegister a Rego policy as the active evaluator
policy_wasmRegister a WASM policy runner as the active evaluator

See Taint & Quarantine guide for detailed examples.

ToolDescription
taintMark a path as sensitive with a severity and reason
untaintRemove a taint marker from a path
quarantineHard-gate a path — blocks all writes until lifted
unquarantineLift a quarantine
watchSubscribe an agent to change notifications on a path
unwatchRemove a watch subscription
list_taintsList active taints, optionally filtered by severity
check_taintCheck taint and quarantine status for a set of paths

See Reminders guide for detailed examples.

ToolDescription
reminder_createCreate a reminder with due time, priority, and optional recurrence
reminder_listList reminders, filtered by assignee or status
reminder_remind_meRetrieve all reminders currently due for the calling agent
reminder_snoozePush a reminder’s due time forward
reminder_approveApprove an approval-gated reminder, making it active
reminder_cancelCancel a reminder
reminder_record_executionRecord the result of acting on a reminder; schedules next recurrence