Tool reference

The 106 tools OpZero exposes over MCP, grouped by what they are for. You will rarely name one directly — Claude picks them from what you ask — but this is the map of what is possible.

Read this as a menu, not a manual
Every parameter table below is generated from the definitions the server actually serves, so it cannot drift from reality. What it does not tell you is which tool to reach for; that is in concepts. If you are ever unsure in a conversation, ask Claude to call help.

Orientation

Where to start when you are not sure what is possible, what you already have, or why a call was rejected.

helpread only

The full tool catalogue with usage notes. Pass a topic to narrow it to one area or a single tool.

ParameterTypeDescription
topicstringOptional filter: a section (e.g. "deploy", "assistants", "projects") or a tool name (e.g. "deploy_react_artifact"). Unknown topics return the list of valid topics.
get_system_statusread only

Your plan, usage, active projects, recent deployments, and how much of each per-plan cap is consumed. The cheapest way to confirm the connection works.

Takes no parameters.

ask_opzero_assistantread only

Ask a question about your own account in plain language. Answers over your recent activity, and renders an adaptive view on hosts that support MCP Apps.

ParameterTypeDescription
questionreqstringQuestion to ask (e.g., 'What deployments are in progress?', 'Is my preview ready?', 'How many projects do I have?')
include_contextbooleanInclude system context (projects, deployments, previews) automatically (default: true)
diagnose_authread only

Your token type, identity, roles, scopes, real session expiry, and the health of every OAuth discovery endpoint. Run this first on any auth error.

Takes no parameters.

Publishing pages and apps

Getting something live. The four deploy tools differ in how much you write: markdown is the least, files is the most control.

deploy_markdown

Send raw markdown, get a themed page. Full GitHub-flavoured markdown, light/dark toggle, title lifted from the first heading. The lowest-effort way to publish.

ParameterTypeDescription
markdownreqstringRaw markdown content. Supports GitHub Flavored Markdown: headings, bold, italic, links, images, code blocks, tables, task lists, strikethrough, blockquotes.
titlestringPage title (auto-extracted from first heading if not provided)
themedark | light | autoColor theme: auto (system preference, default), dark, or light
namestringSite name for the URL (auto-generated if not provided)
targetcloudflare | netlify | vercelHosting provider: cloudflare (fastest, default), netlify, or vercel
force_newbooleanWhen false (default), reuses an existing project with the same name and redeploys to it. Set true to always create a fresh project.
deploy_themed

Send body HTML, get it wrapped in the OpZero design system — glass nav, typography, colour palette. Standard HTML elements are styled for you.

ParameterTypeDescription
titlestringPage title (shown in nav and browser tab)
contentreqstringHTML content for the page body. Use OpZero CSS classes: oz-card (card container), oz-grid (auto grid), oz-btn-primary (cyan button), oz-btn-secondary (outline button), oz-gradient (gradient text), oz-hero (centered hero section), oz-glow (glow effect), oz-status (live indicator). Standard HTML (h1-h6, p, ul, table, pre/code, blockquote) is styled automatically.
themedark | light | autoColor theme: auto (system preference, default), dark, or light
namestringSite name for the URL (auto-generated if not provided)
stylelanding | article | dashboardLayout: article (800px centered, default), landing (hero-focused), dashboard (1200px wide)
targetcloudflare | netlify | vercelHosting provider: cloudflare (fastest, default), netlify, or vercel
force_newbooleanWhen false (default), reuses an existing project with the same name and redeploys to it. Set true to always create a fresh project.
deploy_html

Deploy one complete HTML document. Tailwind utility classes are compiled automatically, so no CDN script or config is needed.

ParameterTypeDescription
htmlreqstringHTML content to deploy (can include inline CSS/JS). Tailwind utility classes are auto-compiled — no CDN script needed.
namestringOptional site name (auto-generated if not provided)
targetcloudflare | netlify | vercelHosting provider: cloudflare (fastest, default), netlify, or vercel
force_newbooleanWhen false (default), reuses an existing project with the same name and redeploys to it. Set true to always create a fresh project.
deploy_files

Deploy a multi-file site — HTML, CSS, JS, assets — with full file-level control. Tailwind is still compiled for you.

ParameterTypeDescription
projectIdstringExisting project ID to deploy to (optional - creates new if not provided)
namestringProject name (auto-generated if not provided)
targetcloudflare | netlify | vercelHosting provider: cloudflare (fastest, default), netlify, or vercel
filesreqobject<string, string>Object mapping file paths to contents. Tailwind utility classes in HTML files are auto-compiled. Example: {'index.html': '<html>...</html>', 'styles.css': '...'}
force_newbooleanWhen false (default), reuses an existing project with the same name and redeploys to it. Set true to always create a fresh project.
deploy_react_artifact

Deploy a React component as a live site with zero build, via ESM.sh. React, Recharts, and Lucide are built in. Set ai and storage to turn it into a real application with a backend.

ParameterTypeDescription
codereqstringReact component code (JSX/TSX). Can use imports from react, recharts, lucide-react. Should export a default component. May call window.claude.complete(prompt) and window.storage when ai/storage are enabled.
namestringSite name (auto-generated if not provided)
titlestringPage title (optional, defaults to 'React App')
dependenciesobject<string, string>Additional ESM.sh dependencies to include in import map. Format: { 'package-name': 'version' }
targetcloudflare | netlify | vercelHosting provider: cloudflare (fastest, default), netlify, or vercel. Must be cloudflare when ai/storage are enabled.
aibooleanEnable server-side AI: window.claude.complete / oz.ai stream through the Vercel AI Gateway (Haiku/GPT-mini default allowlist, owner-funded, hard-capped). Default false (plain static artifact).
storagebooleanEnable persistence: window.storage / oz.storage give per-user (and shared) key-value storage, and oz.files / window.files give per-user file storage (bytes with a media type under a path, 3MB each) on the same store. Default false.
system_promptstringPinned system prompt for the AI binding, set server-side; the client cannot override it. Optional.
force_newbooleanWhen false (default), reuses an existing project with the same name and redeploys to it. Set true to always create a fresh project.
get_templateread only

Ready-to-deploy starter files: the branded opzero theme (recommended), landing, portfolio, blog, static, vite-react, or react-esm.

ParameterTypeDescription
templatereqlanding | portfolio | blog | static | vite-react | react-esm | opzeroTemplate type: opzero (branded theme with light/dark mode — RECOMMENDED), landing (marketing page), portfolio (personal site), blog (article site), static (basic HTML), vite-react (React app with Vite), react-esm (zero-build React via ESM.sh)
update_deployment

Patch a live site by merging a partial file map into its latest deployment. Unmentioned files are preserved; an empty string deletes one.

ParameterTypeDescription
project_namestringProject name to update
project_idstringProject UUID to update (alternative to project_name)
filesreqobject<string, string>Partial file map to merge. Keys are file paths, values are new contents. These overwrite matching files; unmentioned files are preserved. Set a value to empty string to delete a file.
preview_pageread only

Render one of your deployed pages inline in the conversation, on hosts that support MCP Apps. Identify it by URL, project ID, or project name.

ParameterTypeDescription
urlstringHTTPS URL of a page on opzero.sh (e.g. https://my-site.opzero.sh). Provide exactly one of url, project_id, or project_name.
project_idstringProject UUID — its deployed URL is looked up automatically. Use this to disambiguate when several projects share a name.
project_namestringName of one of your projects — its deployed URL is looked up automatically. Errors if the name is ambiguous; use project_id then.
live_canvas

An interactive widget showing your live site next to a prompt box. Edits typed there arrive back in the conversation, and the page hot-reloads once you apply them.

ParameterTypeDescription
htmlstringHTML to deploy as the initial canvas content. Tailwind utility classes are auto-compiled. Provide exactly one of html, project_id, or project_name.
namestringOptional project name when deploying html (reuses an existing project with the same name, else auto-generated).
project_idstringAttach the canvas to this existing project (UUID).
project_namestringAttach the canvas to the existing project with this name. Errors if ambiguous; use project_id then.

Projects and domains

Managing the containers your deployments live in.

list_projectsread only

Everything you have deployed, with URLs and status. Filter by status, hosting target, name, or staleness.

ParameterTypeDescription
statusactive | archived | deleted | allFilter by project status (default: active)
targetcloudflare | netlify | vercelFilter by hosting provider
name_containsstringSearch projects by name (case-insensitive partial match)
sort_bycreated | last_deploy | nameSort order (default: last_deploy)
stale_daysnumberOnly show projects with no deploy in this many days
limitnumberMax results to return (default: 50, max: 100)
get_project_detailsread only

One project by name or ID: metadata, current URLs, custom domain, status, and a summary of its latest deployment.

ParameterTypeDescription
namestringProject name to look up
project_idstringProject UUID to look up
create_project

Create an empty project container. Usually unnecessary — the deploy tools create one for you.

ParameterTypeDescription
namereqstringProject name
descriptionstringWhat this project is about
targetcloudflare | netlify | vercelHosting provider (default: cloudflare)
rename_project

Change a project name without touching its contents or deployment history.

ParameterTypeDescription
namestringCurrent project name (alternative to project_id)
project_idstringProject UUID to rename
new_namereqstringNew project name
project_archivedestructive

Hide a project from default listings without deleting it. Reversible with the unarchive action.

ParameterTypeDescription
namestringProject name to archive/unarchive
project_idstringProject UUID to archive/unarchive
namesstring[]Array of project names to bulk archive/unarchive (max 10)
actionarchive | unarchiveWhether to archive or unarchive. Default: archive. Note that "archive" deletes a hosted MCP server's Worker and "unarchive" does not recreate it.
project_cleanupread only

Audit your account for duplicates, stale projects, and throwaway test deploys. Recommends, never deletes.

Takes no parameters.

project_deletedestructive

Take a project offline. Soft by default, with a seven-day window in which redeploying the name restores it; hard delete is immediate and permanent.

ParameterTypeDescription
namestringProject name to delete
project_idstringProject UUID to delete
namesstring[]Array of project names to bulk delete (max 10)
hardbooleanPermanently delete now (record + deployments) with no grace period. The live runtime is taken offline in both modes. Default false.
set_custom_domaindestructive

Point your own domain at a project, or remove the current one. Requires Pro or Team, plus a CNAME record you add at your registrar.

ParameterTypeDescription
project_idstringProject UUID to change the domain for (from list_projects)
namestringProject name (alternative to project_id, from list_projects)
domainstringCustom domain to set (e.g. "example.com" or "app.example.com"). Do not include protocol, path, or port. Mutually exclusive with `remove`.
removebooleanSet true to remove the project's current custom domain. This takes the site off that domain. Mutually exclusive with `domain`.

Deployment history

Inspecting what shipped, and moving between versions.

list_deploymentsread only

Recent deployments across all projects, or scoped to one.

ParameterTypeDescription
projectIdstringFilter by project (optional)
limitnumberHow many to return (default: 10)
get_deployment_detailsread only

Everything about one deployment, including the full deployed file contents — the way to recover source a conversation has lost.

ParameterTypeDescription
deploymentIdreqstringThe deployment ID to inspect
get_deployment_statusread only

Status, status detail, URL, file count, and size for a deployment, or the last five for a project.

ParameterTypeDescription
deployment_idstringSpecific deployment ID to get details for
project_namestringProject name to get the last 5 deployments for
redeploy

Rebuild a project from its stored source. MCP server projects go through the full pipeline again, preserving auth mode and runtime.

ParameterTypeDescription
namestringProject name to redeploy
project_idstringProject UUID to redeploy
deployment_idstringOptional: specific deployment ID to redeploy from (defaults to latest)
commitstringOptional, MCP server projects only: a commit of the project repository (full hash or a unique prefix of at least 12 characters, as src_log returns) to deploy from instead of a stored record. Not combined with deployment_id.
rollback_deployment

Republish an older deployment’s files as a new deployment. Forward-only, so nothing is destroyed.

ParameterTypeDescription
deployment_idreqstringThe deployment ID to rollback to
delete_deployment_recorddestructive

Permanently remove one deployment record from history.

ParameterTypeDescription
deployment_idreqstringThe deployment ID to delete

App runtime and file storage

The backend your deployed apps get for free — server-side inference, key-value records, and file storage you can also reach from the conversation.

configure_bindings

Turn AI or storage on or off for a running app without redeploying its code. Also where you change the pinned system prompt, widen the model allowlist, or adjust caps. Live within about a minute.

ParameterTypeDescription
project_idreqstringProject ID (from list_projects or a deploy response)
aiobjectAI binding settings; omitted fields keep their current values
storageobjectStorage binding settings. Gates both oz.storage (key/value records) and oz.files (file storage) — they are two halves of one binding.
inject_sdkbooleanServe the oz.js SDK for this app (default true when any binding is enabled)
webhook_urlstringHTTPS URL that receives a POST for every deployment of this project (event, project, deployment_id, status, url), signed when the platform has a signing secret. Private, loopback and non-443 hosts are refused. Pass an empty string to remove it. Omit to leave it unchanged.
storage_list_filesread only

List a project’s stored files. Metadata only, never content. Defaults to the shared scope; pass a user ID for one end user’s files.

ParameterTypeDescription
project_idstringProject ID (from list_projects or a deploy response). Pass this or project.
projectstringProject name, if you do not have the id.
prefixstringOnly list paths starting with this prefix, e.g. "reports/". Case-sensitive.
user_idstringAddress one end user's personal scope instead of the project-wide shared scope.
afterstringResume after this path (pass the previous page's cursor).
limitnumberPage size. Default 200, max 1000.
reversebooleanScan in descending path order.
storage_read_fileread only

Read one file. Text by default, base64 for binary, or metadata only. Files over 256KB come back as metadata rather than inlined.

ParameterTypeDescription
project_idstringProject ID. Pass this or project.
projectstringProject name, if you do not have the id.
pathreqstringFile path, e.g. "reports/q1.csv".
user_idstringRead from one end user's personal scope instead of the shared scope.
encodingtext | base64 | noneHow to return the content. Default 'text'.
storage_write_file

Write a file (3MB max) where the app and its MCP servers can read it. Publish it at a credential-free URL with public.

ParameterTypeDescription
project_idstringProject ID. Pass this or project.
projectstringProject name, if you do not have the id.
pathreqstringFile path, e.g. "reports/q1.csv". Printable ASCII only (transliterate non-ASCII names and put the display name in metadata). Slashes allowed; no "..", leading/trailing slash, whitespace, or % ? # < > | * characters.
contentstringText content, stored as UTF-8. Pass exactly one of content or content_base64.
content_base64stringBase64-encoded bytes, for binary files. Pass exactly one of content or content_base64.
content_typestringMedia type to store and serve. Defaults to a guess from the path extension.
publicbooleanPublish at a credential-free URL. Writes to the shared scope; cannot be combined with user_id.
user_idstringWrite into one end user's personal scope instead of the shared scope.
metadataobjectArbitrary JSON kept alongside the file (max 4KB serialized).
storage_delete_filedestructive

Delete a file, and with it any public URL it was served from.

ParameterTypeDescription
project_idstringProject ID. Pass this or project.
projectstringProject name, if you do not have the id.
pathreqstringFile path to delete.
user_idstringDelete from one end user's personal scope instead of the shared scope.

Assistants

Your own agent — model, pinned instructions, and tool backends — behind a chat endpoint.

deploy_assistant

Create an assistant from a model, a system prompt, and connections to MCP servers that already exist. Served from one of your app subdomains via oz.assistant(slug).

ParameterTypeDescription
namereqstringHuman-readable name for the assistant (e.g. "Support Bot")
slugstringURL-safe identifier (lowercase, hyphens). Auto-generated from name if not provided. Used in oz.assistant(slug) and the /__oz/assistant/<slug>/chat endpoint.
modelstringVercel AI Gateway model id in provider/model form. Default: anthropic/claude-sonnet-5. Any language model the gateway serves works; ids not in its catalogue are rejected at deploy time. Current Anthropic ids: anthropic/claude-sonnet-5 (default, 1M context, $2/$10 per 1M in/out), anthropic/claude-opus-5 ($5/$25), anthropic/claude-fable-5.1 ($10/$50), anthropic/claude-haiku-4.5 (200K context, $1/$5), plus anthropic/claude-sonnet-4.6 and anthropic/claude-opus-4.8. Other providers: openai/gpt-6-astra, openai/gpt-5.6-sol, google/gemini-3.8-flash, spacexai/grok-4.6, deepseek/deepseek-v4-pro, mistral/mistral-large-3, meta/llama-4-maverick, moonshotai/kimi-k3, zai/glm-5.3. Note the gateway spells versions with a dot (claude-haiku-4.5), never the Anthropic-API hyphen form (claude-haiku-4-5). Call list_assistant_models for the full live catalogue with context windows, prices, and capability tags.
system_promptstringSystem prompt that defines the assistant's behavior. Pinned server-side — clients cannot override it.
mcp_serversobject[]MCP servers the assistant connects to and calls as tools — points at servers that ALREADY EXIST (one of OpZero's own mcps/* services, or any Streamable HTTP MCP server you already host elsewhere). This does not deploy or create a new MCP server for you; there is no deploy_* tool that turns arbitrary code into an MCP server. Each connected server's tools are discovered at request time and made available to the model.
max_tokensnumberMax output tokens per response (default: 2048)
max_stepsnumberMax tool-use rounds per request (default: 8, max: 20). Higher values let the assistant chain more tool calls.
rate_limit_per_minutenumberPer-IP rate limit (default: 30 requests/minute)
daily_trigger_capnumberCeiling on unattended trigger-driven invocations per UTC day — cron firings, webhook deliveries, and ctx.assistants.ask calls all draw from the same budget (default: 100, max: 100000). 0 blocks every unattended run; there is no unlimited value. Interactive chat is not counted.
visibilitypublic | privateWho may call /__oz/assistant/<slug>/chat. "private" (default): only requests carrying an Authorization: Bearer with your OpZero token that has the deploy scope (the same authority chat_with_assistant needs); anonymous callers get 401, an owner token without deploy or a connection-grant workload token gets 403. "public": anyone with the URL can chat, gated only by rate_limit_per_minute per client IP — choose it deliberately for an assistant embedded in a public page, and treat its system prompt as public. chat_with_assistant and triggers are owner-authenticated either way.
triggersobject[]Declarative triggers for the assistant — unattended invocations, no polling code. FULL REPLACE semantics: entries are upserted by name, existing triggers not named here are deleted; omit this param entirely to leave triggers untouched. Two kinds: cron ({ type, name, schedule, prompt }) runs the prompt on a UTC cron schedule (5-minute floor); webhook ({ type, name, auth }) gives an HTTPS endpoint at https://hooks.opzero.sh/t/<trigger-id> that verifies the sender's signature (HMAC presets for github/stripe/slack, or a static key) and invokes the assistant with the delivery payload. Webhook payloads are untrusted input to an assistant holding your MCP tools — use allowed_tools and max_steps to limit what a hooked run can do.
list_assistantsread only

Your assistants with their slugs, models, connected servers, and status.

ParameterTypeDescription
statusactive | archived | allFilter by status (default: active)
limitnumberMax results (default: 50, max: 100)
list_assistant_modelsread only

Every model an assistant can run on — the live Vercel AI Gateway catalogue with context windows, prices, and capability tags. The default is Claude Sonnet 5.

ParameterTypeDescription
providerstringOnly models from this provider, matched against the id prefix (anthropic, openai, google, spacexai, deepseek, mistral, meta, ...).
searchstringCase-insensitive substring of the model id or display name, e.g. "sonnet" or "flash".
get_assistantread only

One assistant’s full config and its chat endpoint URL.

ParameterTypeDescription
slugstringAssistant slug
assistant_idstringAssistant UUID
update_assistant

Change the model, prompt, connected servers, or limits. Effective immediately, no redeploy.

ParameterTypeDescription
slugstringAssistant slug to update
assistant_idstringAssistant UUID to update
namestringUpdated name
modelstringUpdated model ID. Vercel AI Gateway model id in provider/model form. Default: anthropic/claude-sonnet-5. Any language model the gateway serves works; ids not in its catalogue are rejected at deploy time. Current Anthropic ids: anthropic/claude-sonnet-5 (default, 1M context, $2/$10 per 1M in/out), anthropic/claude-opus-5 ($5/$25), anthropic/claude-fable-5.1 ($10/$50), anthropic/claude-haiku-4.5 (200K context, $1/$5), plus anthropic/claude-sonnet-4.6 and anthropic/claude-opus-4.8. Other providers: openai/gpt-6-astra, openai/gpt-5.6-sol, google/gemini-3.8-flash, spacexai/grok-4.6, deepseek/deepseek-v4-pro, mistral/mistral-large-3, meta/llama-4-maverick, moonshotai/kimi-k3, zai/glm-5.3. Note the gateway spells versions with a dot (claude-haiku-4.5), never the Anthropic-API hyphen form (claude-haiku-4-5). Call list_assistant_models for the full live catalogue with context windows, prices, and capability tags.
system_promptstringUpdated system prompt
mcp_serversobject[]Updated list of already-running MCP servers to connect to (replaces the full list). Points at existing Streamable HTTP servers, same as in deploy_assistant — does not create or deploy a new one.
max_tokensnumberUpdated max output tokens
max_stepsnumberUpdated max tool-use rounds
rate_limit_per_minutenumberUpdated rate limit
daily_trigger_capnumberUpdated daily cap on unattended trigger-driven invocations (0-100000; 0 blocks every unattended run)
visibilitypublic | privateUpdated chat-endpoint visibility. "private": owner bearer with the deploy scope only. "public": anyone with the URL, rate limited per IP. Takes effect within 30 seconds (the runtime caches assistant config).
triggersobject[]Declarative triggers for the assistant — unattended invocations, no polling code. FULL REPLACE semantics: entries are upserted by name, existing triggers not named here are deleted; omit this param entirely to leave triggers untouched. Two kinds: cron ({ type, name, schedule, prompt }) runs the prompt on a UTC cron schedule (5-minute floor); webhook ({ type, name, auth }) gives an HTTPS endpoint at https://hooks.opzero.sh/t/<trigger-id> that verifies the sender's signature (HMAC presets for github/stripe/slack, or a static key) and invokes the assistant with the delivery payload. Webhook payloads are untrusted input to an assistant holding your MCP tools — use allowed_tools and max_steps to limit what a hooked run can do.
delete_assistantdestructive

Delete an assistant. Its chat endpoint stops responding at once.

ParameterTypeDescription
slugstringAssistant slug to delete
assistant_idstringAssistant UUID to delete
chat_with_assistant

Talk to one of your assistants server-side — the way to test one before any app exists. Returns the whole reply plus a trace of each tool-use round.

ParameterTypeDescription
slugreqstringSlug of one of your deployed assistants (see list_assistants). Must be active.
promptstringSingle-turn shorthand: one user message. Provide either prompt or messages.
messagesobject[]Conversation to send, oldest first (max 100). The assistant keeps no history of its own, so replay every turn it should see. Provide either messages or prompt.

Hosted agents

Stateful code built on the Cloudflare Agents SDK: WebSocket sessions, synced state, schedules, and per-instance SQL. Not an assistant (no model loop) and not an MCP server (no tools surface).

get_agent_templateread only

A known-good scaffold: minimal (synced state over HTTP and WebSocket), scheduler (cron and delayed callbacks), or chat (a broadcast room). Start here rather than from memory.

ParameterTypeDescription
kindminimal | scheduler | chatTemplate kind. Default minimal (synced state, HTTP + WebSocket commands). scheduler demonstrates a recurring cron registered in onStart plus one-off delayed callbacks; chat demonstrates a broadcast room with per-connection state.
deploy_agentdestructive

Build and deploy TypeScript that exports Agent classes. Each class becomes a stateful instance type at <endpoint>/agents/<class-name>/<instance>; the result carries the URLs and a connect block for clients.

ParameterTypeDescription
namestringProject name for the agent. Reuse a name to redeploy in place.
filesreqobject<string, string>Source files keyed by path. Include agent.ts, index.ts, or main.ts as the entry and export every Agent class from it (export class Counter extends Agent<Env, State> { ... }). Only agents, zod, and cloudflare:workers may be imported; files ending in .html, .css, .svg, .txt, or .md bundle as importable strings. Deploy-time secrets arrive on this.env by key.
auth_modetoken | public | oauthtoken (the default for new agents) requires the shared access token as Authorization: Bearer <token> or ?token=<token> on WebSocket URLs, stripped before agent code sees the request; oauth requires a per-user OpZero token issued for this agent as its resource and admits only you (the deployer), and the agent reads the caller with this.oz.caller(); public admits anyone with the URL. Omit on redeploy to keep the current mode. token stays the default because browser WebSocket clients cannot run the OAuth flow at connect time - an oauth agent needs a token obtained beforehand and passed as ?token= on the socket URL.
secretsobject<string, string>Environment secrets exposed as this.env.KEY and stored encrypted. Must not share a name with an agent class. Keys beginning with OPZERO_ are reserved for platform runtime bindings and are rejected.
allowed_callersstring[]auth_mode oauth only: additional callers admitted alongside you, as OpZero account emails and/or AuthKit subject ids (usr_...). This is the only way to widen an oauth agent beyond its deployer - the OPZERO_* environment namespace is reserved, so the allow-list cannot be set through secrets or set_agent_secret. Omit on redeploy to keep the current list; pass an empty array to clear it and go back to owner-only. Ignored in token and public mode.
project_idstringExisting agent project ID to redeploy into.
force_newbooleanCreate a fresh project even if a matching name exists.
classesstring[]Exported Agent class names to host as stateful instance types. Defaults to every class extending Agent found in the source; pass this when a class extends your own base class and is not discovered.
idle_archive_daysintegerDays of inactivity after which the agent is archived automatically (default 14). Activity is any deploy, successful verification, secret or token change, owner-token exchange, or edge traffic the Worker served without failing - a window of nothing but exceptions does not count. 0 disables idle archiving for this agent. Omit on redeploy to keep the current setting.
list_agentsread only

Your agents: project, endpoint, auth mode, classes, last verification.

Takes no parameters.

get_agentread only

One agent in full: classes with URL templates, secret keys, last deployment, and the client wiring.

ParameterTypeDescription
project_idstringAgent project UUID. Provide exactly one of project_id or project_name.
project_namestringAgent project name.
set_agent_secret

Set an encrypted environment secret, exposed to the agent as this.env.KEY. Hot-applied.

ParameterTypeDescription
project_idreqstringThe agent project ID.
keyreqstringEnvironment variable name. Must not match an agent class name.
valuereqstringSecret value. It is write-only and never returned.
delete_agent_secretdestructive

Remove an environment secret.

ParameterTypeDescription
project_idreqstringThe agent project ID.
keyreqstringSecret key to delete.
rotate_agent_tokendestructive

Replace the shared access token. Shown once; the old one stops working at once.

ParameterTypeDescription
project_idreqstringThe agent project ID.

Hosted MCP servers

Write a server, hand it to OpZero, get a live endpoint that is verified to speak MCP.

get_mcp_server_templateread only

A known-good scaffold to build from: browser, connected MCP, storage/files, MCP Apps, resources, sync/webhooks, closed-loop execution, Python, and the minimal HTTP starters. Start here rather than from memory.

ParameterTypeDescription
kindminimal | fetch-api | oauth1-api | browser | connected-mcp | storage | files | widget | component | resources | sync | webhook | signals | closed-loop | durable | pythonTemplate kind. Default minimal. browser demonstrates metered, SSRF-guarded ctx.browser rendering and extraction; connected-mcp demonstrates OAuth-managed outbound MCP through ctx.connect and the deploy-then-grant lifecycle; storage and files demonstrate durable per-user KV and byte storage; widget and component demonstrate MCP Apps views; resources demonstrates resources/list + resources/read; sync demonstrates schedule + ingest + ranged scans; webhook demonstrates sender-authenticated ingest; signals demonstrates defineServer({ signals }) and ctx.signals - gated watches, an allowlisted action registry across the six action kinds, a deferred judge, and the required sweep schedule; closed-loop demonstrates defineServer({ closedLoop }), ctx.loop, internal capabilities, policy, ledger state, and the required recovery schedule; durable demonstrates per-server SQLite via ctx.durable (Cloudflare only, deploy with durable: true); python is the minimal opzero_mcp server. All non-python templates are hosted TypeScript; component and durable are Cloudflare-only, while browser, connected-mcp, and closed-loop support Cloudflare and entitled Vercel.
deploy_mcp_server

Build and deploy TypeScript or Python on a stable MCP endpoint. Hosted TypeScript includes ctx.browser, ctx.connect, ctx.signals, ctx.loop, storage/files, resources, ingest, MCP Apps, and an explicit cron schedule when the server must wake itself.

ParameterTypeDescription
namestringProject name for the MCP server.
filesreqobject<string, string>Source files keyed by path. TypeScript: include server.ts, index.ts, server.js, index.js, main.ts, main.js, or a .tsx/.jsx variant; only @opzero/mcp-runtime, zod, and the hono JSX runtimes (hono/jsx server-side, hono/jsx/dom client-side; vendored) may be imported; files ending in .html, .css, .svg, .txt, or .md bundle as importable strings (import html from './view.html') — author MCP Apps widget views as .html files and pass the import to widget({ html }), or author them as hono JSX components: import view from 'widget:./Signal.tsx' compiles the component into a client bundle and componentWidget({ name, view, render? }) wraps it in a runtime-generated document owning the handshake, tool-result wiring, and an oz.callTool bridge, with optional render for server-rendered results (get_mcp_server_template kind "component" shows the shape). A custom root-URL landing page ships as home.html passed to defineServer({ homepage }). Widget height is handled for you: the runtime reports the view's size to the host (hosts cannot measure a sandboxed iframe, and an unreported view is drawn at the host's default height with the rest clipped) and floors it at square, tunable with widget({ minHeight: 320 }) or widget({ minHeight: false }). Widgets are inline-only unless you ask for more: pass widget({ fullscreen: true }) to let the host present the view full-screen — it injects the fullscreen button hosts do not provide, and requires the view's own ui/initialize handshake to declare appCapabilities: { availableDisplayModes: ['inline', 'fullscreen'] } (the deploy fails with the exact snippet if it does not); displayModes: ['inline', 'fullscreen', 'pip'] is the explicit set, fullscreenButton: false drops the injected button while keeping the window.ozFullscreen client API (modes, mode, available, request, enter, exit, toggle, onChange) and the <html data-oz-display-mode> attribute it mirrors from the host, and an element marked data-oz-fullscreen-toggle is wired up as the control instead. componentWidget() takes the same knobs and generates the declaration. Python: include server.py, index.py, or main.py with a module-level server = define_server(...) from opzero_mcp; only the Python standard library, opzero_mcp, workers, js, and pyodide may be imported (get_mcp_server_template kind "python" shows the shape).
runtimecloudflare | vercelRuntime target. Default cloudflare. Vercel requires account entitlement.
auth_modetoken | public | oauthoauth (the default for new servers) validates per-user tokens through OpZero's authorization server and scopes access to you (the deployer) with audience-bound tokens so other users cannot call your server; token requires a shared Bearer token; public is unauthenticated. Omit on redeploy to keep the server's current mode. Python servers do not support oauth yet and default to token.
secretsobject<string, string>Environment secrets exposed as ctx.env.KEY and stored encrypted.
project_idstringExisting MCP server project ID to redeploy into.
force_newbooleanCreate a fresh project even if a matching name exists.
allow_public_shared_storagebooleanpublic auth_mode only: allow ctx.storage shared-scope operations (off by default because any anonymous caller could mutate shared state).
multi_tenantbooleanoauth auth_mode only: admit ANY authenticated OpZero user, not just you. Off by default — an oauth server admits only its owner (and any allow-list), because every server has a public *.mcp.opzero.sh URL and the shared gateway will issue a valid token to any OpZero user. Turn it on for a server meant to serve other people: each caller then gets their own ctx.user, their own ctx.storage scope, and their own ctx.connect connections. Omit on redeploy to keep the current setting; pass false to close it again. Rejected on token/public servers, which have no per-caller identity to admit.
schedulestringCron expression (UTC, 5 fields, or @hourly/@daily/@weekly/@monthly) that runs the server's exported scheduled() handler — a deployed server cannot wake itself, so this is how sync/rollup servers run unattended. Minimum interval is 5 minutes (the scheduler tick). Omit to keep the current schedule on redeploy; pass an empty string to remove it.
durableboolean | objectOpt-in per-server persistent SQLite database. When true, ctx.durable is configured: ctx.durable.sql.exec for queries, ctx.durable.transaction for atomic batches, ctx.durable.setAlarm/getAlarm/deleteAlarm for alarms, and ctx.durable.call(name, args) for the methods declared in defineServer({ durable: { schema, methods, alarm } }), which run inside the object on its single thread. An object mirroring that defineServer shape (schema statements, method names, alarm flag) is also accepted as the opt-in, with method names validated up front (^[a-z][a-z0-9_]*$); the source descriptor stays authoritative for behavior. Requires the Cloudflare runtime. Omit on redeploy to preserve whatever the server already has. A source that declares durable but a deploy that omits this flag is rejected with the fix named.
blobsbooleanOpt-in shared R2 bucket through the platform blob broker. When true, ctx.blobs is configured under this server's own key prefix (servers/<server-id>/, fixed server-side from the server id; no bucket binding or credential reaches the Worker): put (up to 2 MiB) / get / head / delete / list, and presignPut(key, { sha256 }) for a 15 minute S3 presigned PUT that the bucket accepts only with the declared x-amz-checksum-sha256. Needs the storage binding. The source must also declare defineServer({ blobs: true }); a source that declares it but a deploy that omits this flag is rejected with the fix named. Requires the Cloudflare runtime. Omit on redeploy to preserve whatever the server already has.
get_mcp_server_logsread only

Deployment health, recent deploy records, and a live Cloudflare tail when one is available. The first stop when a server misbehaves.

ParameterTypeDescription
project_idstringMCP server project UUID. Provide this or project_name.
project_namestringMCP server project name. Provide this or project_id.
limitintegerRecent deployment record count. Default 10.
sincestringISO timestamp lower bound for deployment records.
list_mcp_app_widgetsread only

Which MCP Apps widgets your server exposes and which tools render into each — including tools pointing at a widget that does not exist.

ParameterTypeDescription
project_idstringMCP server project UUID. Provide this or project_name.
project_namestringMCP server project name. Provide this or project_id.
check_mcp_conformanceread only

Run the cross-client matrix after deploy: protocol negotiation, auth discovery, CORS, catalogue limits, resources, and MCP Apps across Claude, OpenAI, xAI, IDE, and baseline profiles.

ParameterTypeDescription
endpointstringAbsolute https URL of the MCP endpoint. Provide exactly one of endpoint, project_id, project_name, or gateway_slug.
project_idstringHosted MCP server project UUID.
project_namestringHosted MCP server project name.
gateway_slugstringGateway slug from list_gateways.
credentialstringBearer token to present. Optional: without it the unauthenticated surface (auth challenge, discovery documents, CORS) is still checked, which is the part every connector walks first. For a token-mode hosted server the stored token is used automatically.
clientsstring[]Restrict the run to these client profile ids. Omit to check every known client.
auth_modeoauth | token | publicHow an endpoint target authenticates, when you know it. OAuth discovery checks (the 401 challenge, protected-resource and authorization-server metadata, PKCE, CIMD) apply to oauth servers only; with public or token they are reported under skipped with reason auth_mode=<mode> and never count against a client verdict. Without the hint, an endpoint that serves an anonymous initialize is reported as unproven on those checks rather than failing - a valid public server and a broken oauth one look identical on the wire. Hosted servers and gateways use their stored mode; do not pass this for them.
set_mcp_server_secret

Set an encrypted environment secret, exposed to the server as ctx.env.KEY. Cloudflare picks it up immediately.

ParameterTypeDescription
project_idreqstringThe MCP server project ID.
keyreqstringEnvironment variable name.
valuereqstringSecret value. It is write-only and never returned.
list_mcp_server_secretsread only

The secret keys configured on a server. Values are never returned.

ParameterTypeDescription
project_idreqstringThe MCP server project ID.
delete_mcp_server_secretdestructive

Remove an environment secret.

ParameterTypeDescription
project_idreqstringThe MCP server project ID.
keyreqstringSecret key to delete.
rotate_mcp_server_tokendestructive

Replace a token-mode server’s access token. The old one stops working immediately; the new one is shown exactly once.

ParameterTypeDescription
project_idreqstringThe MCP server project ID.

Gateways

One MCP endpoint fronting many backends, behind an exposure policy.

create_gateway

A federated endpoint at gw.opzero.sh/g/<slug>/mcp. Choose the exposure mode carefully — search is right for Claude.ai.

ParameterTypeDescription
namereqstringHuman-readable name for the gateway (e.g. "Support Bot Tools")
slugstringURL-safe identifier (lowercase, hyphens). Auto-generated from name if not provided. The gateway endpoint is gw.opzero.sh/g/<slug>/mcp. "default" is reserved.
descriptionstringWhat this gateway is for
exposure_modeauto | inline | search | pinnedHow tools are exposed. search (recommended, and required for clients that snapshot tools/list like Claude.ai): a constant meta-tool surface (search_tools, invoke_read_tool for backend tools explicitly marked read-only, invoke_write_tool for everything else, plus list_resources and read_resource for federated resources) whose shape never changes, with live discovery at call time. inline (all tools merged into tools/list, namespaced <ns>_<tool>): only for clients that re-list every session (Claude Code, API mcp_servers) with small fixed toolsets — the surface changes whenever backends do, which strands snapshot caches. pinned: chosen tools inline + meta-tools for the rest. auto: resolves to search whenever track_all_deployed is true (open-ended tool population must not flip surface shape mid-lifecycle); otherwise inline until the tool count exceeds inline_tool_limit, then search. Default: auto.
inline_tool_limitnumberTool-count threshold where auto mode flips from inline to search (default 40)
track_all_deployedbooleanWhen true, every active deployed MCP server is federated automatically without explicit backend rows (default false; the default gateway has this on)
list_gatewaysread only

Your gateways with endpoints and backend counts. Materializes the default gateway on first call.

ParameterTypeDescription
limitnumberMax gateways to return (default 50)
get_gatewayread only

One gateway in full: exposure policy, backend attachments with namespaces, and per-backend health.

ParameterTypeDescription
slugstringGateway slug
gateway_idstringGateway UUID (alternative to slug)
update_gateway

Change the name, exposure mode, inline limit, pinned tools, or tracking flag. Live within about thirty seconds.

ParameterTypeDescription
slugstringGateway slug
gateway_idstringGateway UUID (alternative to slug)
namestringNew name
descriptionstringNew description
exposure_modeauto | inline | search | pinnedNew exposure mode. search is recommended for any gateway consumed by Claude.ai (constant meta-tool surface immune to tools/list snapshot caching); inline suits only re-listing clients with small fixed toolsets; auto resolves to search whenever track_all_deployed is true.
inline_tool_limitnumberNew auto-mode threshold
pinned_toolsstring[]Qualified tool names (<namespace>_<tool>) shown inline in pinned mode
track_all_deployedbooleanAutomatically federate all deployed MCP servers
add_gateway_backend

Attach a hosted server, an external MCP server, or an assistant, under a namespace that prefixes its tool names. Use an external connection for third-party credentials.

ParameterTypeDescription
gateway_slugstringGateway to attach to (or use gateway_id)
gateway_idstringGateway UUID (alternative to gateway_slug)
typereqopzero_mcp | external_mcp | assistantBackend type
namespacereqstringTool-name prefix, unique per gateway (lowercase alphanumeric + underscores, e.g. "shop")
server_idstringopzero_mcp: the project id (UUID from list_projects) or the mcp_server id (from get_project_details). Both resolve to the project's current MCP endpoint.
assistant_slugstringassistant: the assistant slug
assistant_idstringassistant: the assistant UUID (alternative to assistant_slug)
urlstringexternal_mcp: the Streamable HTTP MCP endpoint URL. Optional when connection is given (the connection supplies its own server url); pass it anyway to point a connection at a self-hosted instance of the same service.
connectionstringexternal_mcp only: use one of your external connections (create_connection) as this backend's credential. Accepts the connection label, the provider slug, or the connection id from list_connections. The gateway fetches a fresh access token per call and refreshes it automatically, so this is the right choice for any OAuth service. Attaching also grants this backend access to the connection; remove_gateway_backend revokes that grant. Requires your MCP identity to be linked (link_identity) - external connections are never released to an identity matched only by an unverified email. Mutually exclusive with auth_bearer and use_caller_token.
auth_bearerstringexternal_mcp only: bearer token the gateway sends to this backend. Stored encrypted; never returned. Mutually exclusive with use_caller_token.
use_caller_tokenbooleanexternal_mcp only: forward each caller's own OpZero bearer token to the backend instead of a stored credential, so the backend sees the caller as themselves. Only allowed for OpZero service-owned endpoints (currently https://code.opzero.sh) — never tenant app subdomains or hosted MCP hosts, which run user-controlled code; the token is never sent anywhere else. Mutually exclusive with auth_bearer. Example: federate your CodeZ Hub machines through a gateway with url "https://code.opzero.sh/mcp", namespace "hub", use_caller_token true.
tool_allowliststring[]Backend-local tool names to expose (omit for all tools). REQUIRED when connection is the "opzero" platform connection: there the same list is also written to the connection grant, so it is what this backend may call as you, not merely what the gateway shows.
positionnumberSort order in listings (default 0)
remove_gateway_backenddestructive

Detach a backend. The backend itself survives; any connection grant it held through this gateway is revoked.

ParameterTypeDescription
backend_idreqstringThe gateway backend attachment UUID
delete_gatewaydestructive

Delete a gateway and its attachments. Backends are untouched. The default gateway cannot be deleted.

ParameterTypeDescription
slugstringGateway slug
gateway_idstringGateway UUID (alternative to slug)

External connections

OAuth grants to third-party MCP servers, stored encrypted and released only to workloads you name.

create_connection

Connect Notion, Linear, Sentry, Neon, Vercel, or any RFC 9728 server. Returns a one-time authorize URL; the grant is stored encrypted and refreshed for you. The "opzero" provider connects OpZero itself, with no browser step, so a workload can run named deploy tools as you.

ParameterTypeDescription
providerstringCatalog provider slug (opzero, notion, linear, sentry, neon, vercel). Omit when passing an explicit url. "opzero" is the platform itself and takes no url, no browser step, and no inline grant - grant it with grant_connection and a tool_allowlist.
urlstringStreamable HTTP MCP endpoint of any external server. Required for servers not in the catalog; also overrides a catalog entry so you can point at a self-hosted instance. The server must publish RFC 9728 protected resource metadata.
labelstringName for this connection, e.g. "Work Notion". Defaults to the provider name. Lets you hold several accounts with the same provider.
grant_to_kindgateway_backend | assistant | mcp_server | agentOptionally attach the resulting connection to a workload in the same step (otherwise use grant_connection later). Connections are never ambient: nothing can use one until it is granted.
grant_to_idstringId of the workload to grant. Required with grant_to_kind.
list_connectionsread only

Your connections with status, granted scope, and which workloads may use each. Status needs_reauth means the grant must be recreated.

ParameterTypeDescription
limitnumberMax connections to return (default 50)
grant_connection

Let one workload use one connection, or revoke that permission. This is the consent boundary — nothing is ambient. Granting the "opzero" connection, which lets a workload call these deploy tools as you, additionally requires a tool_allowlist.

ParameterTypeDescription
connection_idreqstringConnection UUID from list_connections
subject_kindreqgateway_backend | assistant | mcp_server | agentWhat kind of workload is being granted access
subject_idreqstringId of the workload: gateway backend id (get_gateway), assistant id (list_assistants), mcp_server id (get_project_details), or agent id (get_agent). A hosted agent granted the "opzero" platform connection can exchange its own credential for an owner token via this.oz.owner() and call the tools in tool_allowlist as you.
notestringOptional note recording why this grant exists
revokebooleanRemove the grant instead of creating it
tool_allowliststring[]Tool names this workload may call through the connection. REQUIRED for the "opzero" platform connection and rejected for any other provider. Every name must exist on this server; anything outside the list is refused before the tool runs, and before the scope check. Keep it to what the workload actually needs, e.g. ["deploy_markdown"] for a publisher, ["deploy_mcp_server","redeploy","rollback_deployment"] for a deployer. Re-running grant_connection with a new list replaces the old one.
delete_connectiondestructive

Revoke at the provider where supported, delete the stored credential, and drop every grant on it.

ParameterTypeDescription
connection_idreqstringConnection UUID from list_connections

Everything else

Tools the server exposes that this page has not yet written up by hand. The descriptions below come straight from the server.

get_skillread only

Read one of the OpZero skill documents: the step-by-step workflow, ordering constraints, and failure modes for a multi-step task (assistants, gateways, mcp-servers, agents, src). Call it before deploying or debugging an assistant, gateway, hosted MCP server, agent, or project source, and whenever guidance points you at a skill:// URI — this tool returns the same markdown as resources/read, for clients that only speak tools.

ParameterTypeDescription
skillstringWhich skill to read: a short name (assistants, gateways, connections, mcp-servers, agents, src), the frontmatter name (opzero-mcp-servers), or the full URI (skill://opzero/mcp-servers/SKILL.md). Also accepts the exact URI of any ref://, template://, or doc:// resource, such as ref://opzero/mcp-runtime/signals.d.ts or doc://opzero/errors.md. Omit to list the catalogue.
update_mcp_serverdestructive

Change a deployed MCP server's settings without resending its source. This is the tool for flipping auth_mode, opening or closing multi-tenant admission, toggling public shared storage, or setting/clearing the cron schedule - deploy_mcp_server requires the full file map, and reading a server's source back just to change a setting is what this exists to avoid.

ParameterTypeDescription
project_idstringThe MCP server project ID (from list_projects or a deploy response).
namestringProject name, as an alternative to project_id. An ambiguous name is refused rather than guessed.
auth_modetoken | public | oauthNew auth mode. oauth validates per-user tokens through OpZero's authorization server and admits you (plus multi_tenant, if set); token requires the shared Bearer token, which is returned once when it is first minted (rotate_mcp_server_token replaces it); public is unauthenticated and requires confirm_public. Omit to keep the current mode. Python servers do not support oauth.
multi_tenantbooleanoauth only: admit ANY authenticated OpZero user rather than only you. Omit to keep the current setting; false closes it again. Forced off whenever the effective auth mode is not oauth, so a server moved to token or public never carries a stale opt-in.
allow_public_shared_storagebooleanpublic only: allow ctx.storage shared-scope writes, which any anonymous caller could then make. Omit to keep the current setting. Forced off whenever the effective auth mode is not public.
schedulestringCron expression (UTC, 5 fields, or @hourly/@daily/@weekly/@monthly) for the server's scheduled() handler. Minimum interval 5 minutes. Omit to keep the current schedule; pass an empty string to remove it.
confirm_publicbooleanRequired to move an authenticated server to auth_mode "public". Without it that transition is refused, because every hosted server has a guessable *.mcp.opzero.sh URL and public admits anyone who has it.
validate_candidate

Platform build evaluator for a proposal run: materializes the candidate tree the run would land (the merge result src_checkout_manifest returns for run), builds it as a hosted MCP server bundle exactly as deploy_mcp_server would, and records the outcome on the run as build evidence (class build, verdict pass or fail, evidence bundle_bytes or error) under the platform evaluator principal. This is the only way build evidence enters a repository: src_validation_record refuses direct callers.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
runreqintegerRun id from src_propose or src_proposal_get. It must be evaluated (queued); a stale, conflicted, or merged run refuses.
update_agentdestructive

Change a deployed agent's settings without resending its source. Covers auth_mode, the oauth allowed_callers list, and idle_archive_days - deploy_agent requires the full file map, so this is the tool for a settings-only change.

ParameterTypeDescription
project_idstringThe agent project ID (from list_agents or a deploy response).
namestringProject name, as an alternative to project_id. An ambiguous name is refused rather than guessed.
auth_modetoken | public | oauthNew auth mode. token requires the shared access token as Authorization: Bearer or ?token= on WebSocket URLs; oauth admits per-user OpZero tokens issued for this agent, scoped to you plus allowed_callers; public admits anyone with the URL and requires confirm_public. Omit to keep the current mode. Note that browser WebSocket clients cannot run the OAuth flow at connect time, so an oauth agent needs a token obtained beforehand.
allowed_callersstring[]oauth only: callers admitted alongside you, as OpZero account emails and/or AuthKit subject ids (usr_...). Replaces the stored list; an empty array clears it and returns the agent to owner-only. Omit to keep the current list. This is the only way to set it - the OPZERO_* environment namespace is reserved, so it cannot go through set_agent_secret.
idle_archive_daysintegerDays of inactivity after which the agent is archived automatically (default 14). 0 disables idle archiving. Applied in place, with no redeploy, when nothing else changes in the same call.
confirm_publicbooleanRequired to move an authenticated agent to auth_mode "public". Without it that transition is refused: public admits anyone with the URL to every agent instance the deployment hosts.
mcp_diagnosticsread only

Diagnose the MCP session from both ends. Reports what this server sees of the calling client (protocol era and version marker, client identity and capabilities from _meta, transport headers, resolved caller identity, scopes) and what is going on inside the server (implemented JSON-RPC methods, tool catalog with per-tool allow/deny for this caller, widgets, resources, runtime bindings and configuration).

Takes no parameters.

mcp_diagnostics_report

Companion to mcp_diagnostics, called by its widget: stores the host-side findings it collected (client_report) in a short per-caller ring and returns the full diagnostics report with them under clientReports. Writes only diagnostic state for the calling identity; anonymous callers on a public server get the report back but nothing is kept.

ParameterTypeDescription
client_reportreqobjectThe host-side findings the mcp-diagnostics widget collected: ui/initialize result, host capabilities and context, browser sandbox facts, bridge probe outcomes.
src_viewread only

Open the repository view: branches, log, file tree, file contents, proposals, positions, conflicts and diff, as structured content. Pass path to show a file, proposal to inspect one, tab to choose the tab.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
refstringBranch name or commit hash prefix. Defaults to main.
pathstring | nullFile to show in the Browse tab.
proposalinteger | nullProposal id to inspect in the Queue tab.
tabbrowse | queueWhich tab to open. Defaults to browse, or queue when proposal is given.
src_protect

Mark a branch protected so it moves only through merge finalization, or unprotect it, and set its validation policy: require_validation names the classes a run must carry a pass for before src_merge_finalize lands it; an empty array clears the requirement. Only classes a platform evaluator can produce are accepted (build today, through validate_candidate; the set grows as test, policy and review evaluators land), so a gate can never be configured that nothing can satisfy: another class is refused UNSUPPORTED_VALIDATION_CLASS.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstring
protectedboolean
require_validationbuild[]Validation classes required before finalize, from the producible set. Omit to leave the requirement unchanged; [] clears it. Evidence is recorded by the platform evaluator (validate_candidate), never by the proposer.
src_branchesread only

List branches with heads, protection, and the validation policy (require_validation and its policy_hash) each enforces at finalize.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
full_hashesboolean
src_listread only

List a directory at a snapshot. Depth 1 by default; entries carry hash and size.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
refobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
prefixstringDirectory to list. Empty for the root.
depthinteger
limitinteger
full_hashesboolean
src_readread only

Read a file at a snapshot. Returns lines with a range_hash for src_edit.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
pathreqstring
refobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
start_lineinteger
end_lineinteger
sectionstringMarkdown heading text, with or without the leading #s. Returns exactly the section body bytes: the heading line is not part of the body, blank lines on either side are.
symbolstringTop level symbol name. Returns exactly the definition body through the newline ending its last line (regex outline, not tree-sitter).
max_bytesinteger
unchanged_sincestringCommit hash. If the blob at this path is identical there, returns unchanged: true and no content.
full_hashesboolean
src_read_manyread only

Read several small files at one snapshot in one call. Pass run instead of ref to read from the candidate tree a run would land (the merge result, which has no commit until finalized).

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
pathsreqstring[]
refobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
runintegerRun id whose candidate tree to read, as an alternative to ref.
max_total_bytesinteger
src_outlineread only

Markdown headings or top level code symbols with line ranges. A symbol ends where the brackets opened on its first line close; an anonymous export default is listed under its callee name (export default defineServer({ is the symbol defineServer, kind default).

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
pathreqstring
refobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
src_logread only

Commit history. first_parent defaults to true so a branch that receives merges reads as one entry per landed proposal.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
refobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
pathstring
limitinteger
beforestringCommit hash; start after this commit.
first_parentboolean
src_diffread only

Compare two snapshots. Default is per path added and removed line counts; text: true returns a unified diff.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
fromobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
toobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
prefixstring
textboolean
context_linesinteger
max_text_bytesinteger
src_changed_pathsread only

Paths that differ between two snapshots. Use after HEAD_MOVED to reread only what changed.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
fromobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
toobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
prefixstring
src_checkout_manifestread only

Exact manifest of a snapshot for materialization: commit, root, and every path with hash, mode and size. Write .src/HEAD in the checkout with the commit hash and use it as expect_head on ingest.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
refobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
runintegerRun id whose candidate tree to flatten, as an alternative to ref.
prefixstring
src_blob_missingread only

Which of these full blob hashes are neither stored inline nor verified in R2. A blob that was prepared but not yet uploaded counts as missing and is listed again under staged.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
hashesreqstring[]
src_upload_prepare

Stage blobs over 1 MB (INLINE_MAX) through R2: per blob, a 15 minute presigned PUT URL plus the headers to send, or already_present when the hash is stored. PUT the Git blob object (the frame "blob <size>\0" followed by the content, so its SHA-256 is the blob hash) with the headers verbatim; the bucket refuses a body whose digest differs.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
blobsreqobject[]
src_proposalsread only

List proposals (pull request equivalents) with each current run: candidate_root, projected_base_root (a tree root, not a commit), policy_hash and the validation verdicts per class. With target, entries come in queue order with positions.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
statestringqueued, conflict, rejected, or merged
targetstring
mineboolean
src_proposal_getread only

One proposal with its current run, queue position, predecessor, projected_base_root and candidate_root (tree root hashes; source_head, target_head, and merge_base are commit hashes), and conflicts. A read: it reports the run the queue produced and never creates one.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
proposalreqinteger
src_quota_getread only

Object counts, mutation and rebase metrics, queue depths, and limits.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
src_write

Write, replace, or delete whole files on a branch in one commit. Compare and swap on expect_head with path tier rebase by default.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringBranch to move. Protected branches refuse direct writes; open a proposal instead.
messagereqstringCommit message.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original result verbatim.
expect_headreqstringCommit hash the caller believes is the branch head. If the head has moved the server attempts a rebase per the rebase tier, otherwise it returns HEAD_MOVED.
trace_idstringW3C trace id, 32 lowercase hex characters, recorded in the commit.
rebasepath | edit | booleanRebase tier when the head moved. path: apply if none of the touched paths changed. edit (src_edit only): also reanchor old/new, section and symbol edits against the current blob. false: never rebase.
filesreqobject[]
src_edit

Edit one file with anchored edits: a unique old/new string, a line range with range_hash returned by src_read, a markdown section, or a symbol. Section and symbol edits replace exactly the anchor body bytes, byte for byte; pass the anchor_hash src_read returned so the edit is bound to the body you read.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringBranch to move. Protected branches refuse direct writes; open a proposal instead.
messagereqstringCommit message.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original result verbatim.
expect_headreqstringCommit hash the caller believes is the branch head. If the head has moved the server attempts a rebase per the rebase tier, otherwise it returns HEAD_MOVED.
trace_idstringW3C trace id, 32 lowercase hex characters, recorded in the commit.
pathreqstring
rebasepath | edit | booleanRebase tier when the head moved. path: apply if none of the touched paths changed. edit (src_edit only): also reanchor old/new, section and symbol edits against the current blob. false: never rebase.
editsreqobject[]
src_branch

Create a branch (O(1)) pointing at an existing commit. Defaults to contrib/<you>/<n>.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
fromobjectReference. Defaults to { branch: "main" }. A branch resolves to its current head; the response discloses the commit it resolved to.
namestring
src_restore

New commit whose tree equals snapshot to. History is preserved.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringBranch to move. Protected branches refuse direct writes; open a proposal instead.
messagereqstringCommit message.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original result verbatim.
expect_headreqstringCommit hash the caller believes is the branch head. If the head has moved the server attempts a rebase per the rebase tier, otherwise it returns HEAD_MOVED.
trace_idstringW3C trace id, 32 lowercase hex characters, recorded in the commit.
toreqstringCommit hash whose tree becomes the branch content.
rebasepath | edit | booleanRebase tier when the head moved. path: apply if none of the touched paths changed. edit (src_edit only): also reanchor old/new, section and symbol edits against the current blob. false: never rebase.
src_rebase

Move a branch onto another snapshot by replaying its change set from the merge base as one new commit whose parent is onto (a squashing rebase, like git rebase --onto then squash). Resolves add/add conflicts that editing the source branch cannot: the merge base moves to onto.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringBranch to move. Protected branches refuse direct writes; open a proposal instead.
messagereqstringCommit message.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original result verbatim.
expect_headreqstringCommit hash the caller believes is the branch head. If the head has moved the server attempts a rebase per the rebase tier, otherwise it returns HEAD_MOVED.
trace_idstringW3C trace id, 32 lowercase hex characters, recorded in the commit.
ontoreqstringCommit hash (or unique prefix) to rebase onto, usually the target head.
overlapfail | branch | ontoWhat to do with paths changed on both sides. fail (default): REBASE_CONFLICT with overlapping_paths and nothing written. branch: take the branch version. onto: take the onto version and drop the branch change; reapply it with src_edit on the new head.
src_ingest

Commit a checkout back as a change set: the manifest is diffed against the tree at expect_head and only differences apply. Paths absent under prefix are deleted only with prune: true.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringBranch to move. Protected branches refuse direct writes; open a proposal instead.
messagereqstringCommit message.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original result verbatim.
expect_headreqstringCommit hash the caller believes is the branch head. If the head has moved the server attempts a rebase per the rebase tier, otherwise it returns HEAD_MOVED.
trace_idstringW3C trace id, 32 lowercase hex characters, recorded in the commit.
rebasepath | edit | booleanRebase tier when the head moved. path: apply if none of the touched paths changed. edit (src_edit only): also reanchor old/new, section and symbol edits against the current blob. false: never rebase.
prefixstringRestrict the change set to this directory.
prunebooleanDelete paths present at expect_head but absent in the manifest.
filesreqobject[]Full manifest of the checkout under prefix. Reference unchanged blobs by blob_hash (a short hash is fine) to avoid resending bytes.
src_commit_manifest

Commit a manifest of paths that reference blobs by hash only: inline blobs already stored, R2 blobs staged with src_upload_prepare (verified before the commit; BLOB_NOT_STAGED lists any without an object), or unchanged blobs. Change set semantics like src_ingest: only differences from the tree at expect_head apply, and prune deletes paths absent from the manifest.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringBranch to move. Protected branches refuse direct writes; open a proposal instead.
messagereqstringCommit message.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original result verbatim.
expect_headreqstringCommit hash the caller believes is the branch head. If the head has moved the server attempts a rebase per the rebase tier, otherwise it returns HEAD_MOVED.
trace_idstringW3C trace id, 32 lowercase hex characters, recorded in the commit.
rebasepath | edit | booleanRebase tier when the head moved. path: apply if none of the touched paths changed. edit (src_edit only): also reanchor old/new, section and symbol edits against the current blob. false: never rebase.
prefixstringRestrict the change set to this directory.
prunebooleanDelete paths present at expect_head but absent in the manifest.
manifestreqobject[]
src_propose

Open a proposal (equivalent to a pull request) and enqueue it on the target. The dry merge runs against the projected base, which is the candidate of the entry ahead or the target head; the run reports it as projected_base_root (a tree root hash, unlike source_head, target_head, and merge_base, which are commit hashes).

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
branchreqstringSource branch.
targetstringTarget branch, default main.
summaryreqstring
src_reject

Reject a proposal and remove it. Entries behind it repin, and conflicted proposals on the same target are re-evaluated against the new queue.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
proposalreqinteger
reasonreqstring
src_merge_finalize

Gate tool: land an evaluated run. Succeeds only at the head of its queue and only when the target root equals the run projected base.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
runreqinteger
mutation_idreqstring
expect_target_headstring
expect_candidate_rootstringThe candidate root you validated or reviewed: full hash or a prefix of at least 12 characters. The call fails CANDIDATE_MISMATCH unless it names the run candidate.
src_validation_record

Record validation evidence on an evaluated run: one class (build, test, policy, review) with a pass or fail verdict, bound to the run candidate_root, projected base and policy hash at the moment of recording. Only the platform evaluator principal records, and never on a proposal it opened; the platform refuses direct calls with CAPABILITY_DENIED, because evidence comes from a platform owned evaluator such as validate_candidate, not from the caller.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
runreqintegerRun id from src_proposal_get; it must be evaluated.
classreqbuild | test | policy | reviewValidation class.
verdictreqpass | failpass or fail.
evidenceobject<string, string>Evaluator output to keep with the record (at most 16 KB serialized): bundle size, an error message, a report id.
mutation_idreqstringClient generated unique id (a UUID). Retrying with the same id returns the original record verbatim.
src_race_check

Serialization self test (spec R8): N concurrent src_write calls race one throwaway branch with the same expect_head, fanned out into the repository object at once. Exactly one must land and every other writer must see HEAD_MOVED at the winner.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
writersintegerConcurrent writers, default 8.
src_exportread only

Raw repository export for replay: refs with full heads, commits in sequence order with their stored objects (after and limit page them), and objects by full hash. Proposal, queue and mutation records are not exported.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
afterintegerSequence index to start commits from (0 is the first commit). With limit, pages the commit list.
limitintegerCommits per page, at most 500.
hashesstring[]Objects (blobs, trees, commits) to return by hash. Entries past the response budget come back under pending; request them again.
src_replay

Replay a standalone src repository into this project repository (spec 1.1 section 4.5): the platform reads the source under your identity, walks its commits in sequence order, inserts blobs and trees by hash (R2 objects copied by key), re-encodes every commit and refuses with REPLAY_DIVERGENCE naming the commit if a hash differs (the target is left untouched), and recreates the refs at the same heads. Idempotent and resumable.

ParameterTypeDescription
source_serverreqstringThe standalone server: its slug (for example src) or its MCP URL (https://<slug>.mcp.opzero.sh/mcp). Must be a hosted server this account owns.
source_reporeqstringRepository id on the source server.
projectreqstringTarget project (slug or id). Its repository must be pristine (first touch only) or a previous replay of the same source.
src_fpvread only

Open a first-person operational view of a project repository. Returns a bounded, read-only snapshot of branch/HEAD, recent commits and paths, proposals/runs/queues, quota pressure, metrics and audit activity.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
refstringOptional branch name or snapshot/commit prefix. Defaults to main.
src_ideread only

Open the project repository in an editor: file tree, branches, log, proposals, and the contents of one file, with syntax highlighting and editing in the view. Read-only itself - it returns a snapshot.

ParameterTypeDescription
projectreqstringProject slug (its name) or project id. The repository id is the project id; you must own the project.
pathstringOptional file to open. Omitted, the view opens on the tree with no file loaded.
refstringOptional branch name or commit prefix. Defaults to main. A commit opens the session read-only.
src_reposread only

List your projects as repositories: project id, slug, main_head (abbreviated; null until the repository is first touched), created, and each row's canonical repo identity { id, authority, uri }. Every project has one repository, created on first touch with a protected main; there is no create tool.

ParameterTypeDescription
full_hashesbooleanReturn full 64 character heads instead of 12 character prefixes.
Next
Other clients

Connecting from Claude Code, Cursor, Codex, and raw HTTP.