Reference
MCP server reference
Endpoint, authentication, permissions, and every SwiftCNS MCP tool grouped by method step.
Before you start
- Endpoint:
https://api.swiftcns.ai/mcp(streamable HTTP). The app shows the URL for your environment under Settings → MCP client access. - Auth: OAuth 2. Your client opens a sign-in page; access tokens last up to 5 minutes and refresh automatically.
- Scopes:
cns:read(Read CNS),cns:write(Update CNS),cns:decide(Make decisions),cns:sources:read(Read connected sources).
Steps
How an agent should drive a conversation:
Find scope
list_workspaces,list_projects. To start:generate_resource_id,create_project,create_conversation.Read the position
get_conversation_progressreturns the stage, active Action Requests,actionOperations(ready-to-submit tools),permittedTransitionIdsandnextTransitionId.Talk or submit
Ordinary input:send_messagewith a stablerequestKey(noparentMessageIdon the first message), then pollget_messageuntilexecution.statusis no longer queued or running. The messagestatusmay berequires-actionwhen a card is waiting. Decisions: the tool named inactionOperations, withactionRequestIdandcontractVersion.Continue
AddcontinueConversation: trueandparentMessageId(the request'smessageId; for workflow-surface requests, the latest assistant leaf) to get the next agent turn. The receipt'scontinuationModesays whether one is needed:NONEmeans the next request is already waiting.Recover
Ifexecution.statusisFAILEDandretryableis true, callretry_response.Reload
After every action, read progress again. Tool results, not prose, are the authority.
What you get
Tools by method step:
| Step | Tools |
|---|---|
| Setup | list_workspaces, list_projects, get_project, create_project, generate_resource_id |
| Conversation | create_conversation, open_experiment_conversation, list_conversations, get_conversation, get_conversation_progress, list_conversation_messages, list_conversation_option_sets, send_message, get_message, retry_response, stop_response, attach_sources_to_conversation, apply_field_edit_proposal |
| 1. Assumption | answer_clarifying_questions, select_assumptions, select_hypothesis, get_assumption, get_hypothesis |
| 2. Success criteria | select_experiment, assign_experiment, list_eligible_experiment_assignees, approve_experiment, get_experiment, list_experiments |
| 3. Experiment | configure_data_tracker, get_data_tracker, list_data_tracker_rows, add_data_tracker_rows, update_data_tracker_row, preview_data_tracker_import, import_data_tracker_rows, get_data_tracker_import, complete_experiment |
| 4. Decide | get_learning, list_learnings, update_learning_draft, publish_learning, get_insight, prepare_decision_review, submit_decision, get_decision, list_decisions, list_evidence_assessments (history only) |
| Documents | list_documents, get_document, begin_document_upload, complete_document_upload, import_document, search_project_sources |
Resources: swiftcns://projects/{projectId} (project context), .../experiments/{experimentId} (experiment brief), .../learnings/{learningId} (published Learning), .../decisions/{decisionId} (Decision Record).
Prompts: continue_experiment, import_experiment_evidence.
Workflow stages reported by get_conversation_progress: DISCOVERY, DRAFT, TRACKER, LEARNING (RUNNING only in edge cases).
Action Requests, in order: question_answer (any time), assumption_selection, hypothesis_selection, experiment_card_selection, assign_experiment, approve_experiment, setup_tracker, mark_complete, learning_card, and decision_record (separate slot). Learning results: MET, NOT_MET, UNCLEAR. Decision choices: MOVE_FORWARD, CHANGE_COURSE, TEST_AGAIN, DROP_IT.
Done when
- Your agent can go from
list_workspacestosubmit_decisionusing only the tools above.
Troubleshooting
- No tool drafts the Learning. Submit
complete_experimentwithcontinueConversation: true. If you didn't, callsend_messagewith that action'sactionRequestIdand a returnedparentMessageId. - Tracker set up, but no complete request. The stage waits on
log_evidence; add rows first, thenmark_completeappears. setup_trackerhas no proposed columns. Ask the user what one row is and propose columns; submit them withconfigure_data_tracker.update_learning_draftconflicts. Readget_learningfor the currentversionand test that value first.- Nothing offered after
publish_learning. Callprepare_decision_reviewyourself. - Conflict on resubmit. Replay with the original identity and identical input; never a new key.
For agents: MCP tools and gotchas
Create IDs with generate_resource_id and reuse them on retry. create_conversation needs a title. Writes that take a requestKey (send_message, add_data_tracker_rows, imports) treat the same key as the same request. continueConversation: true on an action requests the next agent turn; it needs cns:read and cns:write.