Skip to content

MCP tools

The citadel MCP server exposes 29 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).

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.

POST /api/v1/agent/missions

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

The Archive & Cold Read

citadel_file_dossier

File a design dossier for a mission (moves designingcold_read).

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_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

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).

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

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

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