Skip to content

MCP tools

The citadel MCP server exposes 33 citadel_* tools — a thin wrapper over the REST API (the source of truth), authenticated with the agent's License. Both transports (streamable-HTTP POST /api/mcp and stdio) expose the same tools.

Conventions used below:

  • Sectors: FRONTEND · BACKEND · QA · INFRA · SECURITY · DESIGN.
  • Scope badges mark tools that need a capability scope on the License: plan (Planner) or recon (Scout/Interrogator). Everything else works with any valid License (subject to sector scope).
  • Each tool lists the REST endpoint it calls — see the REST reference for status codes and payloads.

Session & equipment

citadel_acquire_license

Start the session: acquire a short-lived, sector-scoped session license (the acquire handshake) and get the agent context (alias, sectors, scopes, project). With a provisioning key configured this mints a fresh session license; with a static license it just checks in. Call this once before any other tool.

ParameterTypeDescription
sectorsSector[] · optionalScope this agent to these sectors (default: the key's ceiling).
scopes("plan"|"recon")[] · optionalRequest capability scopes.
aliasstring · optionalDisplay name for the agent in HQ.
ttlMinutesint > 0 · optionalSession license lifetime.

POST /api/v1/agent/acquire (provisioning key) or POST /api/v1/agent/check-in (static license).

citadel_get_briefing

Fetch the layered project Briefing (vision, active operation, Q-equipment summaries, Archive summaries).

ParameterTypeDescription
operationstring · optionalOperation key to scope the briefing (e.g. OP-1).

GET /api/v1/projects/:id/briefing

citadel_get_quality_gates

List the project's active Quality Gates. No parameters. → GET /api/v1/projects/:id/quality-gates

citadel_get_harness

List the Harness Definitions (build / test / lint commands). No parameters. → GET /api/v1/projects/:id/harness

citadel_get_design_guidelines

Get the Design Guideline + theme registry for the active (or named) theme.

ParameterTypeDescription
themestring · optionalTheme key (defaults to active).

GET /api/v1/projects/:id/design-guidelines?theme=active

Orders & mission reads

citadel_check_orders

Check for unconsumed control orders (pause / stand_down / redirect). standDown: true means stop. No parameters. → GET /api/v1/agent/orders

citadel_claim_next_mission

Atomically claim the next ready mission in your sector(s). No parameters. → POST /api/v1/agent/claim-next

citadel_get_mission

Get a mission by id.

ParameterTypeDescription
missionIdstringMission id.

GET /api/v1/missions/:id

citadel_list_missions

List all missions in the project. No parameters. → GET /api/v1/projects/:id/missions

Planning · plan scope

citadel_plan_operation plan

Plan an Operation (sprint). Created planned, or active if activate: true.

ParameterTypeDescription
codenamestring · requiredOperation codename.
objectivestring · optionalWhat the Operation delivers.
sectorsInScopeSector[] · optionalSectors the Operation touches.
capacityPointsint > 0 | null · optionalCapacity for the sprint.
successCriteriastring[] · optionalDefinition of done for the Operation.
activateboolean · optionalActivate immediately.

POST /api/v1/agent/operations

citadel_create_mission plan

Create a Mission in the backlog (or ready). Attach to an Operation/parent by key (OP-1 / WEB-42).

Declare execution order here. dependsOn is what makes work happen in the right sequence — see Ordering the work below.

ParameterTypeDescription
titlestring · requiredMission title.
sectorSector · requiredOwning sector.
typedesign|feature|test|bugfix|spike|chore|research · optionalMission type.
objectivestring · optionalThe goal.
briefingstring · optionalFull briefing text.
prioritylow|medium|high|urgent · optionalPriority.
estimatePointsint > 0 | null · optionalEstimate.
acceptanceCriteriastring[] · optionalAcceptance checklist.
requiredSkillsstring[] · optionalSkills needed.
operationKeystring · optionalAttach to this Operation (OP-1).
parentKeystring · optionalParent mission key.
statusbacklog|ready · optionalready = immediately claimable.
dependsOnstring[] · optionalMission keys that must be settled first.
orderIndexint ≥ 0 · optionalPosition among peers with no hard dependency.

POST /api/v1/agent/missions

Ordering the work

claim-next hands out the next ready mission by priority → orderIndex → creation time, and it skips any mission whose blocked_by dependencies are still open. So:

  • If B can only start after A: citadel_create_mission({ title: "B", dependsOn: ["WEB-41"] }). B is never handed to an agent while A is open, and becomes claimable by itself the moment A is done or cancelled — no human step.
  • If two missions are genuinely independent but should still be worked in a rough order, give them different orderIndex values.
  • relates_to does not order anything. It is documentation. A plan whose dependencies are expressed with relates_to will be worked in essentially creation order.

A typo'd key in dependsOn fails the whole call with 404 — the mission is not created, so it can never end up claimable without the ordering you intended.

citadel_update_mission plan

Groom an existing Mission (title / objective / priority / estimate / sector / operation by key …). Not status — status moves happen through the lifecycle tools and gates.

ParameterTypeDescription
missionstring · requiredMission id or key (WEB-42).
title, objective, briefingstring · optionalText fields.
typemission type · optionalChange the type.
sectorSector · optionalReassign sector.
prioritypriority · optionalChange priority.
estimatePointsint > 0 | null · optionalEstimate.
acceptanceCriteria, requiredSkillsstring[] · optionalLists.
orderIndexint · optionalBacklog ordering.
operationKeystring | null · optionalMove to / detach from an Operation.

PATCH /api/v1/agent/missions/:id

Link two missions by key with a typed, bidirectional reference.

ParameterTypeDescription
sourceKeystring · requiredSource mission key.
targetKeystring · requiredTarget mission key.
linkTypeenum · requiredspawned_from · spawns · tests · tested_by · fixes · fixed_by · blocks · blocked_by · relates_to · duplicates · part_of · follow_up_of

POST /api/v1/agent/links

citadel_propose_quality_gate plan

Propose a Quality Gate derived from the requirements. It lands pending and does not enforce until a manager activates it in HQ (M's Desk / Q-Branch).

ParameterTypeDescription
keystring · requiredLowercase-dashed id, unique per project (e.g. review-gate).
namestring · requiredHuman name.
appliesToStatusmission status · requiredWhich board status the gate guards.
ruleobject · optionalrequireArtifacts · requireColdRead · requireAcceptanceChecked · requireHarnessPass (all boolean).
blockingboolean · optionalWhether it hard-blocks.

POST /api/v1/agent/quality-gates

citadel_propose_harness plan

Propose a Harness Definition — the build/test/lint/run commands discovered in the repo. It lands pending and is not used until a manager activates it in HQ (Q-Branch). Read citadel_get_harness first: keys are unique per project (409 if taken).

ParameterTypeDescription
keystring · requiredLowercase-dashed id, unique per project (e.g. default).
namestring · requiredHuman name.
commandsobject · optionalbuild · test · lint · run — shell commands from the repo root.
envobject · optionalNon-secret env the commands need.
notesstring · optionalCaveats (e.g. what was verified, what test needs).

POST /api/v1/agent/harness

citadel_propose_design_guideline plan

Propose a Design Guideline for a theme — the design system agents must follow. It lands pending and is not served to agents until a manager activates it in HQ (Q-Branch). One per (project, theme) — 409 if the theme already has one.

ParameterTypeDescription
themeKeystring · requiredThe theme it applies to (e.g. defcon-5).
titlestring · requiredHuman title.
bodyMarkdownstring · optionalThe guideline itself — rules an agent can follow verbatim.

POST /api/v1/agent/design-guidelines

The Archive & Cold Read

citadel_file_dossier

File a design dossier for a mission. It attaches to the mission and leaves the status where it is — the designingcold_read move only fires for a mission that was already designing, and claim_next only ever hands you a ready one. So finish your run normally.

ParameterTypeDescription
missionIdstring · requiredMission id.
titlestring · requiredDossier title.
sectionsRecord<string,string> · optionalNamed sections (problem, plan, …).
affectedFilesstring[] · optionalFiles the plan touches.

POST /api/v1/missions/:id/dossier

citadel_get_dossier

Read a mission's design dossier by key — problem, technical plan, affected files, acceptance criteria, Cold Read verdict. Use it before building against a design someone else filed, rather than reconstructing it from the briefing. The dossier usually lives on another mission than yours (the design mission, or the one you were handed off from) — check your links. Returns null if that mission carries no dossier.

ParameterTypeDescription
missionKeystring · requiredMission key (e.g. WEB-42).

GET /api/v1/agent/dossier?missionKey=…

citadel_run_cold_read

Submit a Cold Read verdict as a zero-context Recruit (passready, faildesigning). Never cold-read your own dossier.

ParameterTypeDescription
dossierIdstring · requiredDossier id.
verdictpass|fail · requiredThe verdict.
comprehensionNotesstring · optionalWhat you understood.
openQuestionsstring[] · optionalAnything unclear.

POST /api/v1/dossiers/:id/cold-read

Brownfield onboarding · The Archive

citadel_read_archive

Read the full Archive (all certified KnowledgeDocs incl. bodyMarkdown). Use before planning a brownfield project to see what the Scout/Interrogator filed. No parameters. → GET /api/v1/agent/knowledge

citadel_write_knowledge recon

Write a KnowledgeDoc into The Archive (Scout repo-recon / Interrogator debrief). Upserted per path; nest with parentPath. Writes land quarantined — a fact only reaches Briefings after a foreign actor or HQ certifies it.

ParameterTypeDescription
pathstring · requiredDoc path / id (upsert key), e.g. server/ or INTEL/constraints.
summarystring · requiredOne-line summary (shown in Briefings).
bodyMarkdownstring · optionalFull body.
levelint 0..10 · optionalDepth in the README hierarchy.
parentPathstring · optionalParent doc path.

POST /api/v1/agent/knowledge

citadel_verify_knowledge

Fact Cold-Read: certify or reject a quarantined KnowledgeDoc so it can (or can never) reach a Briefing. Zero-context rule — you may not verify a doc your own License wrote.

ParameterTypeDescription
docIdstring · requiredKnowledgeDoc id.
verdictcertify|reject · requiredThe verdict.
notesstring · optionalReviewer notes.
reasonstring · optionalRequired when verdict = reject.

POST /api/v1/knowledge/:id/verify

citadel_delete_knowledge recon

Retract a KnowledgeDoc from The Archive by path (a stale recon doc or an INTEL/* entry the operator asked to remove).

ParameterTypeDescription
pathstring · requiredDoc path.

DELETE /api/v1/agent/knowledge?path=<p>

citadel_finish_recon recon

Signal the end of a recon run after filing KnowledgeDocs. Raises one Archive-updated notification for HQ (instead of a bell per doc). Call it once when done. No parameters. → POST /api/v1/agent/knowledge/finish

Org-wide recall (learning from sibling projects)

Every other read is scoped to your own project. These two read across all projects in your organization — so a Scout can learn how a sibling project solved something, and a Planner can design new work on top of it, instead of rediscovering it.

Both are read-only and require the plan or recon scope (Planner or Scout); a plain execution license stays project-scoped. The organization is taken from your License, so the boundary cannot be widened. Unvetted knowledge and non-active equipment never appear, and every row names its source project.

Treat what you find as prior art, not as rules: projects differ and legitimately solve things their own way. Nothing is adopted automatically — carrying a convention into your own project is a separate, deliberate act (citadel_propose_harness / citadel_propose_quality_gate).

citadel_recall_knowledge plan | recon

Search certified Archive knowledge across all projects in the organization.

ParameterTypeDescription
querystring · optionalNarrows case-insensitively by path, summary or body text.

Returns { docs: [{ projectKey, projectName, path, level, summary, bodyMarkdown }], truncated, count }. Capped at 200 docs — truncated: true means there is more. → GET /api/v1/agent/org/knowledge

citadel_recall_equipment plan | recon

List the active Harness definitions, Quality Gates and Design Guidelines across all projects in the organization — the build/test conventions, definition of done and design rules that already work somewhere. Read them before writing your own; adopting one is a separate step. No parameters.

Returns { harness, qualityGates, designGuidelines }, each entry carrying projectKey + projectName. → GET /api/v1/agent/org/equipment

Hand-off & collaboration

citadel_hand_off_mission

Hand off a new mission in another sector with shared context + a typed reference. The new mission inherits the dossier + artifacts + a back-reference.

ParameterTypeDescription
missionIdstring · requiredSource mission.
sectorSector · requiredTarget sector.
typemission type · requiredNew mission type.
titlestring · requiredNew mission title.
objective, briefingstring · optionalContext for the target.
linkTypetests|fixes|blocks|relates_to|follow_up_of|duplicates · optionalReference type.
notestring · optionalHand-off note.

POST /api/v1/agent/missions/:id/hand-off

citadel_attach_artifact

Attach an artifact. A test_report satisfies the harness gate.

ParameterTypeDescription
missionIdstring · requiredMission id.
kindpr|commit|file|url|test_report · requiredArtifact kind.
urlstring · requiredArtifact URL.
labelstring · requiredDisplay label.

POST /api/v1/agent/missions/:id/artifacts

citadel_add_comment

Add a comment / work-log entry to a mission.

ParameterTypeDescription
missionIdstring · requiredMission id.
bodystring · requiredComment text.

POST /api/v1/agent/missions/:id/comments

Lifecycle

citadel_report_blocker

Report a blocker on a claimed mission (→ blocked). Only for obstacles Citadel cannot see for itself. If you are waiting on another mission, link it (blocked_by) and just finish your run: claim_next never hands out a mission with an open blocker, and it returns to the queue by itself once the last blocker is settled. See Dependencies that resolve themselves.

ParameterTypeDescription
missionIdstring · requiredMission id.
reasonstring · requiredWhy it's blocked.

POST /api/v1/agent/missions/:id/block

citadel_resolve_blocker

Clear a blocker on a blocked mission (→ ready) and hand it back to the queue — claim it again with claim_next. The mission must be blocked and in one of your sectors. For obstacles outside Citadel that have gone away; blocked_by dependencies clear themselves.

ParameterTypeDescription
missionIdstring · requiredMission id.
notestring · requiredHow the blocker was cleared.

POST /api/v1/agent/missions/:id/resolve-blocker

citadel_request_human_input

Ask HQ a decision and durably suspend the mission (→ waiting_human). Use for genuine ambiguity a human must resolve — not for obstacles (use citadel_report_blocker). The lease clock stops; HQ answers; the mission returns to the backlog and a fresh agent resumes with the answer in the dossier. End your run after calling this.

ParameterTypeDescription
missionIdstring · requiredMission id.
questionstring · requiredThe decision you need.
contextstring · optionalBackground for HQ.
urgencylow|medium|high · optionalHow urgent.
formatfree_text|yes_no|multiple_choice · optionalExpected answer shape.
choicesstring[] · optionalOptions for multiple_choice.

POST /api/v1/agent/missions/:id/request-human-input

citadel_submit_for_review

Submit a claimed mission for review (→ in_review, non-blocking).

ParameterTypeDescription
missionIdstring · requiredMission id.

POST /api/v1/agent/missions/:id/submit

citadel_heartbeat

Extend the lease on a claimed mission (call during long work so the watchdog doesn't re-queue it).

ParameterTypeDescription
missionIdstring · requiredMission id.

POST /api/v1/agent/missions/:id/heartbeat

citadel_complete_mission

Complete a claimed mission (enforces Quality Gates; → done). Attach required artifacts first.

ParameterTypeDescription
missionIdstring · requiredMission id.
resultsuccess|failed · optionalOutcome flag.
outcomestring · optionalFree-text outcome summary.

POST /api/v1/agent/missions/:id/complete

Dependencies that resolve themselves

Link one mission to another with citadel_link_missions (linkType: "blocked_by") and Citadel schedules around it — no citadel_report_blocker, no human in HQ:

  • claim_next skips it. A ready mission whose blocked_by target isn't done or cancelled is never handed out, so an agent is never given work it can't do.
  • It frees itself. The moment the last blocker is settled — completed, or cancelled (it isn't coming) — a mission sitting in blocked returns to ready on its own, its claim released. The Wire records a system unblocked entry.

Keep citadel_report_blocker for obstacles Citadel can't see — an API is down, a credential is missing — and citadel_resolve_blocker to clear those once they pass.