Query governed knowledge from your assistant
Claude Code, Cursor or VS Code read governed knowledge through Ailu's MCP server: a fact, its neighbourhood, a path, why a relation exists, what depends on it. They can also propose a fact, which someone else approves. With your identity: what you may not read does not exist for these tools.
Before you start
The local MCP server hands your token and your organisation to the control plane (see Settings › Developer access). No tool below makes a language model answer, and none spends a credit.
The tools
| Tool | What comes back | Example call |
|---|---|---|
| brain_query | The neighbourhood of a question: { seeds, facts, relations, capped, budget: { tokens, used, omitted } }. Each relation is one line. | brain_query { "question": "Who approves refunds?", "depth": 2, "tokenBudget": 1500 } |
| brain_get | One fact: { id, type, name, status, provenance, confidence, source, period, episodes }. | brain_get { "id": "policy:refunds" } |
| brain_neighbors | The facts within 1–4 relations: { from, depth, neighbors }, filterable by type. | brain_neighbors { "id": "policy:refunds", "depth": 2, "types": ["person"] } |
| brain_path | The shortest path, at most 8 relations: { from, to, maxHops, undirected, path: { nodes, hops } } — or « No visible path ». | brain_path { "from": "code:pay.ts", "to": "person:jane", "maxHops": 4 } |
| brain_explain | Why a relation exists: { edge, ends, episodes, decisions, contradictions }. | brain_explain { "fromId": "code:pay.ts", "toId": "policy:refunds", "type": "IMPLEMENTS" } |
| brain_affected | What depends on a fact: { entity, depth, facts, citedBy, usedBy }. | brain_affected { "id": "policy:refunds", "depth": 2 } |
| brain_stats | Governed knowledge at a glance: { facts, relations, byStatus, byProvenance, byType, isolated }. | brain_stats {} |
| get_context | The most connected facts and their relations: { entities, relations, totalEntities, totalRelations }. | get_context { "limit": 40 } |
| brain_propose | A proposal, never a fact: { status: pending, created, relation, proposalId, review } — or status: active when the relation already exists. | brain_propose { "subject": "person:jane", "relation": "OWNS", "object": "policy:refunds", "source": "Handbook 2026, §4", "justification": "Named as the policy's owner." } |
Reading a relation
brain_query writes each relation on one line: A —TYPE [provenance, status]→ B (source). A and B are the facts' ids, the ones brain_get and brain_explain take. The provenance says where the relation comes from: extracted (read from code), inferred (proposed by a model), ambiguous (waiting for a decision), curated (set by a person). The source is the title of the document it was read from (else its file name), named only when you may read its collection; otherwise « no source ».
The budget and the moment
- The question recalls the closest facts, as the workspace search does.
- The neighbourhood spreads both ways: depth from 1 to 3 relations (2 by default), maxNodes from 1 to 100 facts (40 by default).
- The answer fits in tokenBudget, from 200 to 8000 tokens (2000 by default, about four characters a token): the nearest facts first, and budget.omitted counts what was left out.
- asOf shows the graph as it held in the world on a date; knownAt, as Ailu held it at an instant — an audit read, for approvers and owners only.
Proposing a fact
brain_propose only proposes: the relation subject —relation→ object between two active facts you may read waits in the Knowledge › To review queue, with who proposed it, why and where you read it. While it waits, no tool and no agent reads it.
- Proposing takes the approver or owner role, as extraction does; a viewer is refused.
- Another approver of your organisation approves or rejects it; you never approve your own proposal, nor does your assistant for you. Their decision is signed into governed knowledge's attestation chain.
- Proposed twice, the same proposal comes back: never a second. Already in governed knowledge, the answer says so and nothing is proposed.
- The relation type is one of your organisation's ontology, once it has declared some; collection, if you give it, is a collection you may read.
- Twenty proposals a minute at most.
What the tools do not show
A fact drawn from a collection reserved to a team you are not in is never recalled, walked or named: brain_get answers that it does not exist, brain_path that there is « no visible path », never which, and brain_propose proposes nothing about it. Another organisation's governed knowledge is never read.
Not yet
Soonbrain_community: the facts of a community in governed knowledge and its summary.