PlatformReference

MCP tool reference

The complete public ContextStream tool map, including lifecycle, scope, availability, pagination, and the boundaries between similar records.

This page is the wire-level map for people building an agent, debugging a connection, or checking exactly where a kind of work belongs. The task guides elsewhere use plain language on purpose.

The catalog includes consolidated domains and checkout-dependent verification tools. The list your client sees depends on its toolset, account settings, transport, and connections. Ask help for the live catalog and use the MCP tools/list response for the exact JSON schema your client received.

Required lifecycle

For a coding session, use this order:

  1. Call init(folder_path="…") once. Keep the returned workspace, project, and session scope.
  2. Call context(user_message="…", session_id="…") before acting on each user turn. If instruct is exposed, get pending entries first and acknowledge the ones you applied.
  3. Search the ContextStream code index before broad local discovery.
  4. Use the domain that owns the record. Plans, lessons, documents, tickets, and capsules are not interchangeable generic notes.
  5. After local file changes, request a project index refresh. A hosted gateway may report requires_local_ingest; that is a handoff to the installed machine-local sync path, not an error to retry in a loop.

context can return grounding, lessons, preferences, decisions, matched skills, routing notices, and version notices. These are operational instructions for the current turn, not decorative metadata.

Complete domain catalog

DomainOwnsReader guide
initSession initialization, folder resolution, current workspace/project scope, and index stateConnect your assistant
contextTurn-specific grounding: relevant history, rules, lessons, preferences, decisions, skills, and routingWhat to say
searchIndexed source and file search, including exact, semantic, pattern, refactor, exhaustive, team, guided, and crawl modesSearch
instructSession-scoped dynamic instructions and their acknowledgement stateInstruction files
sessionRecall, snapshots, decisions, lessons, plans, context restoration, account mode, and session summariesPast sessions
memoryNodes, events, tasks, todos, documents, diagrams, transcripts, decisions, timelines, and team viewsWhat gets remembered
graphDependencies, circular imports, unused code, complexity, quality history/trends/freshness, and saved quality snapshotsCode health
projectProject records, file listings, index/ingest state, de-indexing, local mappings, statistics, and recent changesWorkspaces and projects
workspaceWorkspace listing, lookup, creation, and workspace-level scopeWorkspaces and projects
reminderReminder listing, active reminders, creation, snoozing, completion, and dismissalReminders
integrationUnified Slack, GitHub, Notion, Linear, Jira, and Figma search/knowledge operationsIntegrations
mediaImages, video, audio, and documents: indexing, search, status, metadata, and clip extractionMedia and PDFs
skillReusable instruction/action bundles: create, update, run, import, export, share, supersede, and deleteReusable skills
capsulePortable context bundles: create, share, open, hydrate by chunk, inspect, diff, audit, schedule, and revokeCapsules
qaGrounded questions plus curation of the workspace knowledge baseQuestions and answers
entityStructured workflow records: tickets, handoffs, backlog views, incidents, releases, experiments, goals, key results, sprints, reviews, risks, and discussionsOperational tracking
vcsGitHub, GitLab, and Bitbucket repositories, pull requests, issues, commits, trees, search, notifications, links, automations, webhooks, and ingestRepository workflows

Hosted and runtime domains

These last domains report on the running product or handle jobs that are available only through the hosted layer.

DomainOwnsReader guide
chartWorkspace dashboard chart queries; hosted/remote deployments onlyAnalytics and exports
async_jobLong-running memory exports and aggregates with submit, poll, and paged results; hosted/remote deployments onlyAnalytics and exports
helpLive tools, auth, billing, version, workflow, rule previews, bundles, and team subscription statusTroubleshooting

The catalog names are stable public domains. Individual actions and fields can grow. Generate clients from tools/list; do not freeze a copied schema from a documentation page.

Session and instruction actions

init, context, and search are request-shaped domains rather than action routers. Their behavior is selected by fields such as folder_path, context mode, and search mode.

The action-routed session surfaces are:

DomainGroupPublic actions
instructInstruction lifecyclebootstrap, get, push, ack, clear, stats, checkpoint, verify
sessionCapture and lessonscapture, retro_capture, capture_lesson, get_lessons, update_lesson, delete_lesson
sessionAccount settingsremote_checks
sessionRecall and contextrecall, ground, set_account_mode, remember, user_context, summary, compress, delta, smart_search, decision_trace, restore_context
sessionPlanscapture_plan, get_plan, update_plan, list_plans
sessionPlan loopsstart_loop, loop_status, advance_loop, resolve_gate, abort_loop, resume_loop, list_loops
sessionSuggested ruleslist_suggested_rules, suggested_rule_action, suggested_rules_stats

The plan-loop actions run a saved plan as a loop with review gates; see Run a plan with review points. resolve_gate with request_changes needs a note, and a repeated identical resolution is a no-op.

Use retro_capture when saving a decision, note, or snapshot after the fact from transcript evidence. smart_search searches memory and conversation history; it is not a substitute for source-code search.

Memory and reusable-context actions

DomainGroupPublic actions
memoryNodes and queriessearch, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, decisions, timeline, summary
memoryEventscreate_event, get_event, update_event, delete_event, distill_event, list_events, import_batch
memoryTaskscreate_task, get_task, update_task, delete_task, list_tasks, reorder_tasks
memoryTodoscreate_todo, list_todos, get_todo, update_todo, delete_todo, complete_todo
memoryDiagramscreate_diagram, list_diagrams, get_diagram, update_diagram, delete_diagram
memoryDocumentscreate_doc, list_docs, get_doc, update_doc, delete_doc, create_roadmap
memoryTranscriptslist_transcripts, get_transcript, search_transcripts, search_archive, delete_transcript
memoryTeam viewsteam_tasks, team_todos, team_diagrams, team_docs, team_discussions, team_transcript_topics
reminderReminderslist, active, create, snooze, complete, dismiss
skillSkillslist, get, create, update, supersede, run, delete, import, export, share
qaQuestions and knowledge baseask, search, save_kb, list_kb, get_kb, update_kb, delete_kb, feedback, explain

Capsules have their own larger lifecycle:

DomainGroupPublic actions
capsuleCoreopen, get, delete, list, create, share
capsuleHydration and handoffchunk, stream, context_doc, bootstrap_prompt, graph, audit, list_shares, revoke_share, ack, primer, diff
capsuleScheduled refreshschedule, schedule_list, schedule_delete
capsuleExplanationexplain

Scope and analysis actions

DomainGroupPublic actions
workspaceWorkspace recordslist, get, create, delete, associate, bootstrap, team_members, index_settings
projectProject and index lifecyclelist, get, create, update, merge, combine, index, delete, purge, forget_local, remove_paths, overview, statistics, files, index_status, index_history, ingest_local, team_projects, recent_changes
graphRelationships and healthrelated, dependencies, impact, ingest, outbox_status, outbox_canary, call_path, path, circular_dependencies, unused_code, complexity_metrics, quality_trends, quality_history, quality_freshness, quality_snapshot, contradictions, code_drift, decisions, usages
entityStructured recordslist, get, create, update, delete

workspace.delete, project deletion/de-indexing, graph ingestion/outbox operations, and entity writes are not read-only merely because they share a consolidated domain with reads. Use the live annotations and obtain user authorization appropriate to the operation.

External and hosted utility actions

The full integration and vcs action lists and provider-specific contracts are on the integration action reference and repository action reference.

DomainGroupPublic actions
mediaAssetsindex, status, search, get_clip, list, delete
chartHosted analyticsrender, list
async_jobHosted long-running jobssubmit_export, submit_aggregate, poll, result
helpRuntime informationtools, auth, billing, version, workflow, editor_rules, enable_bundle, team_status

chart.render uses an allowlisted chart identifier. Async submissions require a collection (transcripts, decisions, lessons, or docs), return a job_id, and must be polled before paging results.

Run a remote check

Use session(action="remote_checks") to read the account setting, price, balance, and project language coverage. Pass enabled: true or false to change the setting and more_engines to change coverage for additional languages. The account API for these settings is GET or PUT /api/v1/mcp/hosted-tools/enabled. The PUT body requires enabled.

ToolInputBehavior
checkcommand required. Optional cwd, fresh, timeout_seconds.Runs an eligible command on a remote worker with a snapshot of the local checkout. Requires remote checks to be enabled and access to the checkout.
verifyOptional changed_paths, cwd, scope.Selects and runs checks for the edit. See Plan checks with verify.

check includes saved edits that are not committed and reports files it withholds. cwd is relative to the repository root. An exact matching result can be served from cache. Set fresh: true to request a rerun. A worker's exit 75 signals a local fallback. In that case, the tool reports ran: false and asks the caller to run the command locally. The terminal runner performs that fallback. See Run checks remotely.

Supported commands include Cargo checks and tests, Go builds and tests, Python tests and linting, and JavaScript or TypeScript checks such as Vitest, ESLint, Biome, Oxlint, Oxfmt in check mode, tsc, tsgo, svelte-check, vue-tsc --noEmit, and astro check. Next.js, Vite, Storybook, and Playwright commands are supported where their requirements match the worker. See the supported toolchains.

Run Prettier through npx, pnpm exec, yarn exec, npm exec, or node_modules/.bin. The worker uses the project's installed version from its locked dependencies. The remote allowlist accepts --check (-c) and --list-different (-l). Write mode (--write or -w) is refused.

The MCP reports up to 32 tool versions for matching the worker environment. The matching rules depend on the toolchain. Workers can fetch and verify supported missing releases from the publisher for future checks. If no worker can use the version your check needs, run that check locally.

Read failures and stage progress

When the worker has a cached result for the same command on the base tree, failing_on_base separates new failures from failures already present on the base. The compact text report puts new failures first. When ContextStream finds a match, diagnostics cites relevant lessons, decisions, or commits. The MCP can request enrichment through POST /api/v1/mcp/hosted-tools/calls/{call_id}/diagnose.

Supported && chains run in order on one uploaded checkout and stop at the first failing stage. For example, run npx prisma generate && npx tsc --noEmit, npx next typegen && npx tsc --noEmit, or npx svelte-kit sync && npx svelte-check. Clients that supply _meta.progressToken receive notifications/progress with the current step, total steps, and a stage message.

Plan checks with verify

verify is available in MCP 1.0.95 and later. Calls can also use the ms_verify alias. Use a local MCP session with access to the checkout. cwd overrides the discovery folder, and changed_paths overrides the repository-relative paths discovered from Git. The default targeted scope uses indexed test coverage, co-change history, and dependency impact through POST /api/v1/mcp/hosted-tools/plan-check.

The planner selects the full tier for recognized lockfiles and Go module files, migrations, auth paths, shared fixtures and test utilities, and build or test configuration such as the root Cargo.toml, tsconfig.json, pyproject.toml, and Vitest or Jest config. It also widens when changes have high downstream impact, paths are unsafe or unmapped, the changed-path list is empty, or graph evidence is unavailable. Use scope: "full" when you want the full detected suite before closing out the task.

verify tries the remote worker when available and falls back to local execution if it cannot run an eligible check remotely. The result reports the selected tier, the reason it widened, the commands actually run, and where they ran. It stops at the first failed command.

During targeted planning, saved Verification Map rules for the most specific matching directory add checks before the graph-selected commands. You can edit these rules under Settings → Agent controls, for the project that is open. The next plan request reads the saved rules. GET and PUT /api/v1/mcp/hosted-tools/verification-map/{project} take workspace_id as a query parameter. Save the current revision and the updated rules, each with a changed directory, command, and cwd. Missing directories or scripts and repeated exit 75 make a rule inactive. Live Capsule MCP connectors can read the map.

Background preparation and speculative checks

In supported editor setups, a local hook can send a free :prepare request when a session starts. It supplies the checkout's base tree and detected language markers so a worker can set up the workspace and dependencies in the background. The session continues even if preparation is busy or fails.

Speculative checks are off by default. After a successful edit observed by a managed editor hook, a short pause lets it check a snapshot in the background. A later explicit check can reuse the result when its inputs match. Set the variables in the environment of the local MCP and editor hooks. There is no dashboard switch for speculative checks. To opt in at the account level, send {"enabled": true, "speculative_checks": true} to PUT /api/v1/mcp/hosted-tools/enabled.

Environment variableEffect
CONTEXTSTREAM_SPECULATIVE_CHECKSon opts in locally when remote checks are available. off overrides the account setting and stops speculative checks.
CONTEXTSTREAM_SPECULATIVE_DEBOUNCE_MSPause after the last observed edit. Defaults to 3,000 ms.
CONTEXTSTREAM_SPECULATIVE_HOURLY_CAPLocal speculative credit budget across repositories. Defaults to 30 per hour.
CONTEXTSTREAM_SPECULATIVE_REPO_HOURLY_CAPLocal speculative credit budget per repository. Defaults to 15 per hour.
CONTEXTSTREAM_HOSTED_TOOLSoff disables hosted tools in this environment, including remote checks and preparation.

The service also applies an account-wide speculative credit cap. Explicit checks use their usual budget. See What remote checks cost.

Contract checks

After a successful explicit remote check, the MCP can also verify up to four downstream consumers when the checkout changes a shared contract. Candidate changes include OpenAPI and Swagger definitions, protobuf, GraphQL, Avro, SQL, TypeScript declarations, and files under directories such as contracts/, api/, schemas/, types/, and sdk/. ContextStream looks for eligible projects in the same workspace through service relationships and indexed contract paths.

Each consumer check uses the consumer's default branch with the changed contract applied in the worker's temporary checkout. The consumer must be indexed and its branch accessible through its GitHub connection. The MCP adds the outcomes to consumer_contracts on the original result. Compiler failures fail that result. If a worker cannot run the check with the change applied, that consumer is unverified and consumer_contracts_passed is false. Check the consumer outcomes before relying on the producer's pass.

Contract checks are enabled by default for eligible calls. Set CONTEXTSTREAM_CONTRACT_CHECK=off in the MCP environment to disable them. Consumer runs use ordinary remote-check billing. See What remote checks cost.

Verification receipts and gates

The API can issue a receipt for a remote run that reports a signed, verified success. A receipt binds the repository and exact tree to the command digest, exit status, and verification time. A local pass does not produce a server-verified receipt.

Workspace owners and admins use GET or PUT /api/v1/mcp/hosted-tools/gate-policy with a workspace_id, a project_id, or both. Supply scope as query parameters for reads and in the JSON body for writes. Project policy can override workspace policy. The API is the configuration surface for gates. There is no dashboard control.

Policy fieldEffect
require_verified_tree_before_pushRequires a receipt for a push checked by the managed editor or Git pre-push hook.
require_verified_tree_before_prRequires a receipt before gh pr create in an editor with the managed pre-tool hook.
require_verified_tree_before_completeRequires a receipt before the managed editor hook lets an agent mark progress completed or a ticket resolved or closed.
required_command_familiesRequires a matching receipt for every specified family. An enabled gate with an empty list still requires a passing receipt.
receipt_ttl_secsMaximum receipt age for the gate. Defaults to 86,400 seconds (24 hours).

The gates are off by default. In the MCP workflow, the installed hooks enforce them and let the action through if the receipt service cannot be reached. Check a decision at GET /api/v1/mcp/hosted-tools/receipts/check with target_tree, the workspace or project scope, and gate (push, pr, or complete). When a gate blocks, run the named check on that same tree and retry after it passes remotely.

Handoff details can compare receipts with the tree supplied in metadata.target_tree. When creating a Review Capsule via POST /api/v1/capsules/review, pass verification_receipt_ids to attach receipts you own for the project. See Verification in capsules.

Search and graph

Use search for source code, symbols, paths, and file content. Its modes are:

ModeUse it for
autoNormal default; chooses a suitable strategy
hybridKeyword plus semantic retrieval
semanticConceptual questions
keywordExact text or quoted symbols
patternGlobs and regular expressions
exhaustiveEvery occurrence in the selected scope
refactorSymbol usage and rename-safe navigation
teamCross-project team search
crawlA deeper multi-modal investigation
guidedRaw evidence plus bounded navigation for an implementation intent

Use output_format="paths" for a file set, count for totals, minimal for compact evidence, and full when snippets and metadata matter. limit and offset page ordinary results; refactor searches can return an opaque cursor, which must be passed back unchanged.

Use graph after search when the question is relational: dependency blast radius, cycles, unused elements, complexity, or quality trends. Graph results may be cached scans. Check quality freshness before treating a dashboard count as a current source fact.

graph(action="call_path") crosses services within a project: an HTTP request continues into the route that serves it, and a published event into its consumers. Each path's hops give how every step is made: call, http with the method and path, or event with its name. The languages and frameworks it covers are listed under Code health.

graph(action="decisions") with target_id set to a file path or a code graph id (src/store.rs::Store.grant) returns the decisions, lessons, and constraints that refer to that code, with its tasks and docs; with node_id set to a knowledge node it returns the decisions related to it. graph(action="related") lists what links to any memory item (a knowledge node, plan, task, note, doc, ticket, or handoff) and the code it names; relation_types restricts it to knowledge relations. graph(action="path") finds the chain of links between two such items.

Memory, sessions, and structured work

These boundaries prevent the most common data-model mistakes:

NeedCorrect home
A durable multi-step implementation plansession plan actions; capture structured steps and linked tasks
A mistake that should warn future worksession lesson actions with trigger, impact, prevention, and severity
A decision or session checkpointsession capture with the matching event type
A runbook, ADR, RFC, postmortem, PRD, glossary, or other versioned documentmemory document actions
A lightweight task tied to a planmemory task actions with plan and step IDs
A personal reminderreminder
A bug, incident, release, sprint, review, risk, or other lifecycle recordentity
A portable or shareable context bundlecapsule
A handoff workflow record plus a portable payloadAn entity handoff paired with a capsule
A quick note, checklist, saved link or ideaNotes: /api/v1/notes (API available; not yet an MCP action)
Brand colors, type, voice, logos, sonic assets and their rulesBrand kits: /api/v1/brand-kits, and /brand-kits/:id/agent-packet for an agent (API available; not yet an MCP action)
Generated or agent-made images, video and audio, with provenanceMedia: /api/v1/media/import (API available; not yet an MCP action)
What a team said in its Coflow channelsMemory events with source_type coflow_channel (in search, recall and context), or /api/v1/collaboration/channels/search

The 12 entity kinds are ticket, handoff, backlog_view, incident, release, experiment, goal, key_result, sprint, review, risk, and discussion. A ticket can represent a bug, feature, task, chore, or epic; use the dedicated incident entity when severity and an incident status timeline matter.

Transcript reads live under memory; ranked continuation and snapshots live under session. Capture is client/configuration dependent. The presence of a transcript search action does not mean every client conversation was saved.

Supported content and record values

These are the current exact wire values for the record families that the task-oriented guides describe in plain language.

FamilySupported values
nodefact, decision, preference, constraint, habit, lesson, goal, risk, term
eventdecision, preference, insight, uncategorized, note, general, manual_note, implementation, operation, command_execution, file_operation, task, bug, feature, correction, lesson, warning, frustration, conversation, session_snapshot, standup, status_update, question, approval, feedback, discovery, achievement
documentroadmap, spec, runbook, adr, rfc, postmortem, retro, release_notes, playbook, prd, user_story, persona, interview, design_spec, critique, glossary, oncall_schedule, slo, q_and_a, changelog, style_guide, general
diagramflowchart, sequence, class, er, gantt, mindmap, pie, other
entity_kindticket, handoff, backlog_view, incident, release, experiment, goal, key_result, sprint, review, risk, discussion
media_typevideo, audio, image, document
media_outputremotion, ffmpeg, raw
qa_knowledge_kindguidance, guardrail, faq, runbook, caveat
reminder_statuspending, completed, dismissed, snoozed
reminder_prioritylow, normal, high, urgent
reminder_recurrencedaily, weekly, monthly

Capsule inputs have their own policy vocabulary:

FamilySupported values
capsule_scopeworkspace, project, session
capsule_modelive, snapshot
capsule_audienceself, team, external_agent, public_link, support, bootstrap_link
capsule_purposebootstrap, handoff, snapshot, debug, review, onboarding, external_agent, custom
capsule_codenone, lazy, inline
capsule_redactionnone, standard, strict
capsule_graphexplorer, knowledge, code
capsule_formatsummary, markdown, text, ndjson

The live schema remains authoritative. In particular, entity body and query objects are forwarded to the corresponding API resource and can grow independently from this value table.

Scope and account mode

Reuse the workspace_id and project_id returned by init or context. Pass them explicitly for writes and for reads where ambiguity would be dangerous. folder_path resolves a local checkout; target_project is for a known child project after initialization from a multi-project parent.

Team and personal records can coexist. account_mode chooses team, personal, or auto; it does not bypass membership or record-level access. If a response contains a project-routing warning, resolve it before a project-scoped write.

Notes, todos, documents, media and brand kits also say where they live with scope:

  • account: the person's own, with no workspace or project needed. These are always private.
  • workspace or project: where the person is working, with the matching id.

Without scope, a write goes where it always has. When the person has no workspace, it goes to their account. Responses report the scope an item lives at. scope=account and account_mode are unrelated: one is where an item lives, the other is which records a request reads.

session/init returns the person's account block (open todos, pinned notes and checklists, recent media, brand kits) as account unless the request sends include_account: false. context/smart adds it only with include_account: true. An agent answering in a shared channel must not surface a person's private items.

List APIs do not share one pagination vocabulary. Depending on the domain, the live schema may use limit/offset, page/page_size, or an opaque cursor. Preserve cursors exactly and keep all original filters on the next request.

External systems and availability

Use integration to search and summarize connected product data through one provider-aware surface. Use vcs for repository-native operations such as pull diffs, checks, reviews, issue writes, branches, blobs, notifications, and webhooks. The integration action reference lists every supported provider/action combination.

chart and async_job require the hosted/remote product layer. Integration actions require the corresponding account connection. Some managed clients hide disconnected domains to keep their tool list small; absence can therefore mean configuration or entitlement, not an old server.

Results, notices, and failures

Tool results can contain both readable text and structured content. Preserve the structured payload when another program consumes the result, but show the human text when explaining it to a person.

Treat these cases distinctly:

  • A transport or schema error means the call did not run as requested.
  • An in-band routing, archive, stale-index, or requires_local_ingest notice is a successful response with a required next step.
  • A partial result with has_more, a next offset, or a cursor is not an empty result.
  • A stale index can still answer about existing indexed code. Refresh before concluding that a newly edited symbol is absent.
  • A missing hosted-only or integration action is an availability issue, not a reason to invent a similarly named call.

For the exact server build and currently exposed catalog, call help(action="version") and help(action="tools", format="full").