Mainmind Docs

MCP tools

The mount at https://mainmind.app/mcp (streamable HTTP), surface v0.4.0. This page is generated from the same registry the server registers its tools from, so it cannot drift from the runtime. Machine-readable twin: /api/surface. Authentication, error shapes and a worked example are on Auth, errors, examples.

OAuth mounts carry {member, name, role, charter, tenant} as token props, stamped at /authorize when the person types their invite code. Roles are enforced at registration: a tool a role may not use is a tool that role's session never sees.

whoami

Rolesall

Who am I on this mount, identity, role, tenant, and how fresh the read is. Cheap; call it when unsure what this connection may do.

ReturnsOne line of identity plus the projection's commit and freshness.

boot

Rolesall

Call this FIRST in any session that will do real work for the organization. Returns the organization's entry documents (ORG.md, AUTHORITY.md), your role charter, and how to work from this mount. Everything else routes from here.

ReturnsORG.md, AUTHORITY.md, your charter, and the working rules, at a named commit.

find_process

Rolesall

Route a task to the organization's Process for it. Give the task in plain words ('a customer wants a refund', 'restock from a vendor'); returns the routing index plus closest matching Processes. Read the matched Process with read_node before acting.

ArgumentTypeRequiredWhat
intentstringyesWhat you're trying to do, in plain words

ReturnsClosest matching Processes plus the routing index.

read_node

Rolesall

Read one document from the company file by path, e.g. 'processes/create-purchase-order.md' or 'records/systems/shopify.md'. Returns full content plus the commit it reflects. Cite the path when you use what you read.

ArgumentTypeRequiredWhat
pathstringyesRepo-relative path, as listed by search/find_process

ReturnsThe full node at the projection's commit, never with third-party annotations mixed in.

Rolesall

Full-text search across the whole company file: processes, records, lessons, decisions, roles. Returns paths with snippets, follow up with read_node on the hits that matter.

ArgumentTypeRequiredWhat
querystringyesWords to find, e.g. 'gst refund shiprocket'
kindstringnoLimit to a kind: process | record | lesson | decision | role | system

ReturnsRanked hits (BM25 + vector, fused, reranked) with snippets.

run_start

Rolesstewardfounder

Open a run on the live control plane at the START of real work, before doing it. This is what makes you visible to the whole team as currently working. Returns a run_id, carry it through run_heartbeat, emit_event and run_finish so everything you do is attributed to one run.

ArgumentTypeRequiredWhat
taskstringyesOne plain-English sentence: what this run is setting out to do
actor_labelstringnoWho is working, as a person would say it. Defaults to your member identity
actor_idstringnoStable slug for the actor. Derived from the label if omitted
harnessstringnoclaude-ai | claude-code | codex | byo | cron
processstringnoThe Process being run, e.g. 'reconciliation-run'
doingstringnoThe first step, short
scopesstring[]norepo: scopes this run holds, e.g. ['repo:processes/reconciliation-run.md']

Returnsrun_id

run_heartbeat

Rolesstewardfounder

Report that a run is still alive and say what it is doing now. Call this as you move between steps. It is what the dashboard renders as the live line. A run that stops heartbeating shows as stalled, not working.

ArgumentTypeRequiredWhat
run_idstringyesThe run_id returned by run_start
doingstringnoWhat is happening right now, one short phrase
scopesstring[]noReplace the scopes this run holds

ReturnsAcknowledgement.

run_finish

Rolesstewardfounder

Close a run. Use status 'landed' when the work is done, 'awaiting-ruling' when it is parked on a founder decision (the run keeps its branch and stays visible), 'conflict' when the target moved and the work must be rebuilt, 'failed' when it broke.

ArgumentTypeRequiredWhat
run_idstringyesThe run to close
statuslanded | awaiting-ruling | conflict | failedyeslanded | awaiting-ruling | conflict | failed
outcomestringnoOne or two plain sentences on how it ended
proposal_refstringnoThe branch carrying the diff, if one was pushed

ReturnsAcknowledgement with the terminal status.

list_runs

Rolesall

List runs on the live control plane: which are open right now (and what each is doing), and which recently ended.

ReturnsJSON: open runs (with derived staleness) and recent finished runs.

emit_event

Rolesstewardfounder

Report a real operational event from a run to the live control plane. Use after completing real work. Title must be one plain-English, buyer-readable sentence; no secrets, no repo paths. Pass run_id to attribute it to an open run.

ArgumentTypeRequiredWhat
typerun | brief | judgment | ruling | deposit | noteyesrun=a process ran; brief=morning brief; judgment=needs the founder; ruling=founder ruled; deposit=lesson/record/amendment landed; note=anything else
titlestringyesOne plain-English sentence, buyer-readable, no jargon, no secrets
detailstringnoOptional 1-3 sentences of context
amountstringnoOptional money figure involved, e.g. $1,240.00
needs_youbooleannotrue if this waits on the founder
actorstringnoWho did it, e.g. 'operator (claude code)'
run_idstringnoThe run this belongs to, from run_start

ReturnsAcknowledgement with the recorded timestamp.

list_events

Rolesall

List recent events from the live instance feed.

ArgumentTypeRequiredWhat
limitnumbernomax events, default 20

ReturnsJSON array of events, newest first.

ask_founder

Rolesstewardfounder

Put ONE decision to the Founder as a link with two buttons. Use when work hits something only the Founder may decide, an approval boundary, spend, a rule change. You do the reading and arguing first; what reaches the Founder is one question and what becomes true on yes. Returns a URL. It lands in the Founder's queue, and you can also paste it to them directly.

ArgumentTypeRequiredWhat
askstringyesThe one question, plain words, answerable yes/no
becomesstring[]yesShort lines: what becomes true if they say yes
becausestringnoOne sentence of why now
coststringnoWhat it costs or gives up, one line
run_idstringnoThe run this belongs to

ReturnsThe decision URL (/d/<key>), one question, two buttons, evidence attached.

Generated from src/surface.js, the same registry the server registers from, so this page cannot drift from what actually runs. Raw markdown for agents: /docs/mcp-tools.md. Index: /llms.txt.