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:
- Call
init(folder_path="…")once. Keep the returned workspace, project, and session scope. - Call
context(user_message="…", session_id="…")before acting on each user turn. Ifinstructis exposed, get pending entries first and acknowledge the ones you applied. - Search the ContextStream code index before broad local discovery.
- Use the domain that owns the record. Plans, lessons, documents, tickets, and capsules are not interchangeable generic notes.
- 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
| Domain | Owns | Reader guide |
|---|---|---|
init | Session initialization, folder resolution, current workspace/project scope, and index state | Connect your assistant |
context | Turn-specific grounding: relevant history, rules, lessons, preferences, decisions, skills, and routing | What to say |
search | Indexed source and file search, including exact, semantic, pattern, refactor, exhaustive, team, guided, and crawl modes | Search |
instruct | Session-scoped dynamic instructions and their acknowledgement state | Instruction files |
session | Recall, snapshots, decisions, lessons, plans, context restoration, account mode, and session summaries | Past sessions |
memory | Nodes, events, tasks, todos, documents, diagrams, transcripts, decisions, timelines, and team views | What gets remembered |
graph | Dependencies, circular imports, unused code, complexity, quality history/trends/freshness, and saved quality snapshots | Code health |
project | Project records, file listings, index/ingest state, de-indexing, local mappings, statistics, and recent changes | Workspaces and projects |
workspace | Workspace listing, lookup, creation, and workspace-level scope | Workspaces and projects |
reminder | Reminder listing, active reminders, creation, snoozing, completion, and dismissal | Reminders |
integration | Unified Slack, GitHub, Notion, Linear, Jira, and Figma search/knowledge operations | Integrations |
media | Images, video, audio, and documents: indexing, search, status, metadata, and clip extraction | Media and PDFs |
skill | Reusable instruction/action bundles: create, update, run, import, export, share, supersede, and delete | Reusable skills |
capsule | Portable context bundles: create, share, open, hydrate by chunk, inspect, diff, audit, schedule, and revoke | Capsules |
qa | Grounded questions plus curation of the workspace knowledge base | Questions and answers |
entity | Structured workflow records: tickets, handoffs, backlog views, incidents, releases, experiments, goals, key results, sprints, reviews, risks, and discussions | Operational tracking |
vcs | GitHub, GitLab, and Bitbucket repositories, pull requests, issues, commits, trees, search, notifications, links, automations, webhooks, and ingest | Repository workflows |
Hosted and runtime domains
These last domains report on the running product or handle jobs that are available only through the hosted layer.
| Domain | Owns | Reader guide |
|---|---|---|
chart | Workspace dashboard chart queries; hosted/remote deployments only | Analytics and exports |
async_job | Long-running memory exports and aggregates with submit, poll, and paged results; hosted/remote deployments only | Analytics and exports |
help | Live tools, auth, billing, version, workflow, rule previews, bundles, and team subscription status | Troubleshooting |
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:
| Domain | Group | Public actions |
|---|---|---|
instruct | Instruction lifecycle | bootstrap, get, push, ack, clear, stats, checkpoint, verify |
session | Capture and lessons | capture, retro_capture, capture_lesson, get_lessons, update_lesson, delete_lesson |
session | Account settings | remote_checks |
session | Recall and context | recall, ground, set_account_mode, remember, user_context, summary, compress, delta, smart_search, decision_trace, restore_context |
session | Plans | capture_plan, get_plan, update_plan, list_plans |
session | Plan loops | start_loop, loop_status, advance_loop, resolve_gate, abort_loop, resume_loop, list_loops |
session | Suggested rules | list_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
| Domain | Group | Public actions |
|---|---|---|
memory | Nodes and queries | search, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, decisions, timeline, summary |
memory | Events | create_event, get_event, update_event, delete_event, distill_event, list_events, import_batch |
memory | Tasks | create_task, get_task, update_task, delete_task, list_tasks, reorder_tasks |
memory | Todos | create_todo, list_todos, get_todo, update_todo, delete_todo, complete_todo |
memory | Diagrams | create_diagram, list_diagrams, get_diagram, update_diagram, delete_diagram |
memory | Documents | create_doc, list_docs, get_doc, update_doc, delete_doc, create_roadmap |
memory | Transcripts | list_transcripts, get_transcript, search_transcripts, search_archive, delete_transcript |
memory | Team views | team_tasks, team_todos, team_diagrams, team_docs, team_discussions, team_transcript_topics |
reminder | Reminders | list, active, create, snooze, complete, dismiss |
skill | Skills | list, get, create, update, supersede, run, delete, import, export, share |
qa | Questions and knowledge base | ask, search, save_kb, list_kb, get_kb, update_kb, delete_kb, feedback, explain |
Capsules have their own larger lifecycle:
| Domain | Group | Public actions |
|---|---|---|
capsule | Core | open, get, delete, list, create, share |
capsule | Hydration and handoff | chunk, stream, context_doc, bootstrap_prompt, graph, audit, list_shares, revoke_share, ack, primer, diff |
capsule | Scheduled refresh | schedule, schedule_list, schedule_delete |
capsule | Explanation | explain |
Scope and analysis actions
| Domain | Group | Public actions |
|---|---|---|
workspace | Workspace records | list, get, create, delete, associate, bootstrap, team_members, index_settings |
project | Project and index lifecycle | list, 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 |
graph | Relationships and health | related, 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 |
entity | Structured records | list, 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.
| Domain | Group | Public actions |
|---|---|---|
media | Assets | index, status, search, get_clip, list, delete |
chart | Hosted analytics | render, list |
async_job | Hosted long-running jobs | submit_export, submit_aggregate, poll, result |
help | Runtime information | tools, 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.
| Tool | Input | Behavior |
|---|---|---|
check | command 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. |
verify | Optional 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 variable | Effect |
|---|---|
CONTEXTSTREAM_SPECULATIVE_CHECKS | on opts in locally when remote checks are available. off overrides the account setting and stops speculative checks. |
CONTEXTSTREAM_SPECULATIVE_DEBOUNCE_MS | Pause after the last observed edit. Defaults to 3,000 ms. |
CONTEXTSTREAM_SPECULATIVE_HOURLY_CAP | Local speculative credit budget across repositories. Defaults to 30 per hour. |
CONTEXTSTREAM_SPECULATIVE_REPO_HOURLY_CAP | Local speculative credit budget per repository. Defaults to 15 per hour. |
CONTEXTSTREAM_HOSTED_TOOLS | off 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 field | Effect |
|---|---|
require_verified_tree_before_push | Requires a receipt for a push checked by the managed editor or Git pre-push hook. |
require_verified_tree_before_pr | Requires a receipt before gh pr create in an editor with the managed pre-tool hook. |
require_verified_tree_before_complete | Requires a receipt before the managed editor hook lets an agent mark progress completed or a ticket resolved or closed. |
required_command_families | Requires a matching receipt for every specified family. An enabled gate with an empty list still requires a passing receipt. |
receipt_ttl_secs | Maximum 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:
| Mode | Use it for |
|---|---|
auto | Normal default; chooses a suitable strategy |
hybrid | Keyword plus semantic retrieval |
semantic | Conceptual questions |
keyword | Exact text or quoted symbols |
pattern | Globs and regular expressions |
exhaustive | Every occurrence in the selected scope |
refactor | Symbol usage and rename-safe navigation |
team | Cross-project team search |
crawl | A deeper multi-modal investigation |
guided | Raw 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:
| Need | Correct home |
|---|---|
| A durable multi-step implementation plan | session plan actions; capture structured steps and linked tasks |
| A mistake that should warn future work | session lesson actions with trigger, impact, prevention, and severity |
| A decision or session checkpoint | session capture with the matching event type |
| A runbook, ADR, RFC, postmortem, PRD, glossary, or other versioned document | memory document actions |
| A lightweight task tied to a plan | memory task actions with plan and step IDs |
| A personal reminder | reminder |
| A bug, incident, release, sprint, review, risk, or other lifecycle record | entity |
| A portable or shareable context bundle | capsule |
| A handoff workflow record plus a portable payload | An entity handoff paired with a capsule |
| A quick note, checklist, saved link or idea | Notes: /api/v1/notes (API available; not yet an MCP action) |
| Brand colors, type, voice, logos, sonic assets and their rules | Brand 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 provenance | Media: /api/v1/media/import (API available; not yet an MCP action) |
| What a team said in its Coflow channels | Memory 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.
| Family | Supported values |
|---|---|
node | fact, decision, preference, constraint, habit, lesson, goal, risk, term |
event | decision, 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 |
document | roadmap, 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 |
diagram | flowchart, sequence, class, er, gantt, mindmap, pie, other |
entity_kind | ticket, handoff, backlog_view, incident, release, experiment, goal, key_result, sprint, review, risk, discussion |
media_type | video, audio, image, document |
media_output | remotion, ffmpeg, raw |
qa_knowledge_kind | guidance, guardrail, faq, runbook, caveat |
reminder_status | pending, completed, dismissed, snoozed |
reminder_priority | low, normal, high, urgent |
reminder_recurrence | daily, weekly, monthly |
Capsule inputs have their own policy vocabulary:
| Family | Supported values |
|---|---|
capsule_scope | workspace, project, session |
capsule_mode | live, snapshot |
capsule_audience | self, team, external_agent, public_link, support, bootstrap_link |
capsule_purpose | bootstrap, handoff, snapshot, debug, review, onboarding, external_agent, custom |
capsule_code | none, lazy, inline |
capsule_redaction | none, standard, strict |
capsule_graph | explorer, knowledge, code |
capsule_format | summary, 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.workspaceorproject: 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_ingestnotice 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").