Tool reference
The 87 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.
docs.Orientation
Where to start when you are not sure what is possible, what you already have, or why a call was rejected.
docsread onlyWith no arguments, the full tool catalogue grouped by domain plus the skill list. Pass a skill or uri to read one document, or a template name with its kind (site, mcp_server, agent) for a ready-to-deploy scaffold.
docsread only| Parameter | Type | Description |
|---|---|---|
| topic | string | Catalogue filter: a surface, a domain (projects, deployments, workloads, ...) or a tool name. |
| skill | string | Skill to read: short name (assistants, gateways, connections, mcp-servers, agents, oz-desktop-app, src) or its skill:// URI. |
| uri | string | Exact URI of any ref://, template://, doc:// or skill:// resource to read. |
| template | string | Scaffold to return, by name. site: opzero, landing, portfolio, blog, static, vite-react, react-esm. mcp_server and agent: see `kind`. |
| kind | site | mcp_server | agent | Scaffold family for `template`. Required when the name exists in more than one family (minimal). mcp_server names: the hosted MCP server templates; agent names: minimal, scheduler, chat, chat-model. |
system_statusread onlyaction status: 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. action auth: your token type, identity, roles, scopes, real session expiry, and the health of every OAuth discovery endpoint. Run auth first on any auth error.
system_statusread only| Parameter | Type | Description |
|---|---|---|
| actionreq | status | auth | status: plan, usage, projects, recent deploys and per-plan caps. auth: this credential and the OAuth infrastructure. |
ask_opzero_assistantread onlyAsk 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.
ask_opzero_assistantread only| Parameter | Type | Description |
|---|---|---|
| questionreq | string | Question to ask (e.g., 'What deployments are in progress?', 'Is my preview ready?', 'How many projects do I have?') |
| include_context | boolean | Include system context (projects, deployments, previews) automatically (default: true) |
identity_linkProve your MCP client identity and your OpZero account are the same person. Returns a link URL to confirm in the browser. Required before a gateway backend may use an external connection.
identity_linkTakes no parameters.
mcp_conformanceread onlyRun the cross-client matrix against a hosted server after deploy: protocol negotiation, auth discovery, CORS, catalogue limits, resources, and MCP Apps across Claude, OpenAI, xAI, IDE, and baseline profiles.
mcp_conformanceread only| Parameter | Type | Description |
|---|---|---|
| endpoint | string | Absolute https URL of the MCP endpoint. Provide exactly one of endpoint, project, gateway. |
| project | string | A hosted MCP server project (id or name). |
| gateway | string | A gateway slug. |
| credential | string | Bearer token to present. Without it the unauthenticated surface (challenge, discovery, CORS) is still checked; a token-mode hosted server uses its stored token. |
| clients | string[] | Restrict the run to these client profile ids. Omit to check every known client. |
| auth_mode | oauth | token | public | endpoint targets only: how the endpoint authenticates. OAuth discovery checks apply to oauth; public and token report them as skipped. |
Publishing pages and apps
Getting something live. One deploy tool, five formats that differ in how much you write: markdown is the least, files is the most control.
deployDeploy a site or app. format markdown: raw markdown becomes a themed page. format themed: body HTML wrapped in the OpZero design system. format html: one complete document, Tailwind compiled for you. format files: a multi-file site with full control. format react: a React component served live via ESM.sh; set ai and storage to give it a backend. Target an existing project to update it — a files map merges into the latest deployment (an empty string deletes a file) unless replace is true — or pass from to rebuild from stored source without sending any.
deploy| Parameter | Type | Description |
|---|---|---|
| format | html | files | react | markdown | themed | What is being deployed: html (one page), files (a path-to-content map), react (a component), markdown (a themed article), themed (an HTML body in the OpZero theme). Omit only with `from` or `commit`. |
| project | string | Existing project to deploy to (id or name). Omit to create a project named `name`. |
| name | string | Name for a new project (also its subdomain); auto-generated when omitted. A project of that name is reused unless new_project is true. |
| html | string | html: the page, inline CSS and JS allowed; Tailwind classes compile automatically. |
| files | object<string, string> | files: path to contents. Merged into an existing project ("" deletes a file) for static sites, MCP server projects and agent projects alike. |
| code | string | react: component source (JSX/TSX) exporting a default component; react, recharts and lucide-react are available. |
| markdown | string | markdown: GitHub Flavored Markdown; the title comes from the first heading unless `title` is given. |
| content | string | themed: HTML for the page body; oz-card, oz-grid, oz-btn-primary, oz-hero and plain HTML elements are styled. |
| title | string | react, markdown, themed: page title. |
| dependencies | object<string, string> | react: extra ESM.sh packages for the import map, { name: version }. |
| theme | dark | light | auto | markdown, themed: colour theme, default auto. |
| style | landing | article | dashboard | themed: layout, default article. |
| target | cloudflare | netlify | vercel | Hosting provider for a new project, default cloudflare. An existing project keeps its target. |
| ai | boolean | react: enable server-side AI (window.claude.complete); Cloudflare target only. |
| storage | boolean | react: enable per-user persistence (window.storage, window.files); Cloudflare target only. |
| system_prompt | string | react: pinned system prompt for the AI binding; clients cannot override it. |
| from | string | Redeploy stored files without content: "latest" or a deployment id of `project`. |
| commit | string | Redeploy an MCP server `project` from its repository at this commit (12 to 64 hex) instead of a stored record. Not with a deployment id in `from`. |
| replace | boolean | files: replace the whole file set of an existing `project` instead of merging into its current deployment. |
| new_project | boolean | Always create a fresh project, even when one named `name` exists. |
previewread onlyRender one of your deployed pages inline in the conversation, on hosts that support MCP Apps. Identify it by URL, project ID, or project name.
previewread only| Parameter | Type | Description |
|---|---|---|
| url | string | HTTPS URL of a page on opzero.sh (https://my-site.opzero.sh). Provide exactly one of url, project. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
live_canvasAn 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.
live_canvas| Parameter | Type | Description |
|---|---|---|
| html | string | HTML to deploy as the initial canvas content. Tailwind utility classes are auto-compiled. Provide exactly one of html, project_id, or project_name. |
| name | string | Optional project name when deploying html (reuses an existing project with the same name, else auto-generated). |
| project_id | string | Attach the canvas to this existing project (UUID). |
| project_name | string | Attach 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.
project_inspectread onlyaction list: everything you have deployed, with URLs and status, filtered by status, hosting target, type, name, or staleness. action get: one project by name or ID with its latest deployment. action cleanup: an audit for duplicates, stale projects, and throwaway test deploys — recommends, never deletes.
project_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | get | list | cleanup | get: one project with its latest deployment (needs `project`). list: your projects, filtered and paged. cleanup: duplicates, stale and auto-generated projects worth deleting. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| status | active | archived | deleted | all | list: default active. |
| project_type | static | mcp_server | agent | list: filter by type. |
| target | cloudflare | netlify | vercel | list: filter by hosting target. |
| name_contains | string | list: substring match on the name. |
| sort_by | created | last_deploy | name | type | list: default last_deploy. |
| stale_days | integer | list: only projects not deployed for this many days. |
| limit | integer | list: page size, default 50. |
| cursor | string | list: pagination.nextCursor from the previous page. |
projectdestructiveaction create: an empty container (usually unnecessary; deploy creates one). action rename: change the name without touching contents or history. action set_domain: point your own domain at a project, or clear it (Pro or Team, plus a CNAME at your registrar). action configure: turn AI or storage on or off for a running app, change its pinned system prompt, widen the model allowlist, or adjust caps — live within about a minute, no redeploy. action archive / unarchive: hide a project from default listings without deleting it.
projectdestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | create | rename | set_domain | configure | archive | unarchive | create: a new empty project (needs `name`). rename: needs `project` and `new_name`. set_domain: needs `project` and `domain` (empty string removes the domain; Pro or Team plan). configure: runtime bindings and the deploy webhook on an existing app (needs `project`). archive: takes the runtime offline and hides the project (needs `project` or `projects`, and `confirm: true`). unarchive: restores the record; the runtime needs a redeploy. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| projects | string[] | Up to 10 projects (ids or names) for a batch. Use instead of `project`. |
| name | string | create: the project name (also its subdomain). |
| description | string | create: optional description. |
| target | cloudflare | netlify | vercel | create: hosting target, default cloudflare. |
| new_name | string | rename: the new name. |
| domain | string | set_domain: the custom domain to point at the project; pass "" to remove the current one. The user must then add a CNAME to the project URL. |
| ai | object | configure: the window.claude.complete binding (Cloudflare-target apps). |
| storage | object | configure: the window.storage binding. |
| inject_sdk | boolean | configure: inject the OpZero runtime SDK into served pages. |
| webhook_url | string | configure: URL POSTed on every deploy of this project; "" clears it. |
| confirm | boolean | archive: must be true. Archiving takes a hosted server or agent offline (410) and is restored only by a redeploy. |
| actor_chain | object[] | Delegated caller chain, leaf last. Omit on a direct call. |
project_deletedestructiveTake projects offline. Soft by default, with a seven-day window in which redeploying the name restores them; hard delete is immediate and permanent.
project_deletedestructive| Parameter | Type | Description |
|---|---|---|
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| projects | string[] | Up to 10 projects (ids or names) for a batch. Use instead of `project`. |
| hard | boolean | true: remove the record and every deployment now, no 7-day grace, no restore. |
| actor_chain | object[] | Delegated caller chain, leaf last. Omit on a direct call. |
Deployment history
Inspecting what shipped, and moving between versions.
deployment_inspectread onlyaction list: recent deployments across all projects, or scoped to one. action get: everything about one deployment, including the full deployed file contents — the way to recover source a conversation has lost. action status: status, detail, URL, file count, and size for a deployment, or the last five for a project.
deployment_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | get | list | status | get: one deployment with its files (needs `deployment`). list: recent deployments, all projects or one `project`. status: status and history of a `deployment` or the last 5 of a `project`. |
| deployment | string | get, status: the deployment id. |
| project | string | list: only this project. status: this project's last 5 deployments. |
| limit | integer | list: rows to return, default 10. |
deploymentdestructiveaction rollback: republish an older deployment’s files as a new deployment — forward-only, nothing is destroyed. action delete_record: permanently remove one deployment record from history.
deploymentdestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | rollback | delete_record | rollback: republish the files of `deployment` as a new deployment of its project. delete_record: remove `deployment` from history permanently. |
| deploymentreq | string | The deployment id. |
Assistants
Your own agent — model, pinned instructions, and tool backends — behind a chat endpoint.
assistant_inspectread onlyaction list: your assistants with slugs, models, connected servers, and status. action get: one assistant’s full config and its chat endpoint URL. action models: every model an assistant can run on — the live Vercel AI Gateway catalogue with context windows, prices, and capability tags.
assistant_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | get | list | models | get: one assistant in full (needs `assistant`). list: your assistants. models: the model catalogue an assistant can run on. |
| assistant | string | Assistant slug or id. |
| status | active | archived | all | list: default active. |
| limit | integer | list: page size, default 50. |
| provider | string | models: only this provider (anthropic, openai, google, ...). |
| search | string | models: case-insensitive substring of the id or name. |
assistantdestructiveaction 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). action update: change the model, prompt, connected servers, or limits, effective immediately. action delete: remove it; the chat endpoint stops responding at once.
assistantdestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | create | update | delete | create: a new assistant (needs `name`; reuses an existing slug). update: change the given fields only (needs `assistant` and one field). delete: needs `assistant` and `confirm: true`. |
| assistant | string | Assistant slug or id. |
| name | string | create: display name, e.g. "Support Bot". update: the new name. |
| slug | string | create: URL-safe identifier (lowercase, hyphens); derived from name when omitted. |
| model | string | Vercel AI Gateway model id (provider/model), default anthropic/claude-sonnet-5. Versions use a dot (claude-haiku-4.5). Unknown ids are refused; assistant_inspect models lists the catalogue. |
| system_prompt | string | Pinned server-side; chat callers cannot override it. |
| mcp_servers | object[] | Already-running Streamable HTTP MCP servers the assistant calls as tools, replacing the whole list: { url, name, headers | connection | auth: "owner" } each. One credential source per entry; owner auth (default for your own hosted servers, gateways and OpZero endpoints) mints a per-run owner token. |
| max_tokens | integer | Max output tokens per reply, default 2048. |
| max_steps | integer | Max tool-use rounds per request, default 8, max 20. |
| rate_limit_per_minute | integer | Per-IP request limit on the chat endpoint, default 30. |
| daily_trigger_cap | integer | Unattended runs per UTC day (cron, webhook, ctx.assistants.ask), default 100, max 100000; 0 blocks them all. |
| visibility | public | private | private (default): the chat endpoint needs an owner bearer with deploy scope. public: anyone with the URL, rate limited per IP. |
| triggers | object | object[] | Full replace of the trigger set, upserted by name; omit to leave triggers untouched. cron { type, name, schedule, prompt } runs the prompt on a UTC schedule (5-minute floor). webhook { type, name, auth: { mode: hmac | key, preset github | stripe | slack, secret, ... }, prompt_template, allowed_tools, max_steps } gets a signed endpoint at hooks.opzero.sh; the secret is required on create and never echoed. |
| confirm | boolean | delete: must be true. The chat endpoint and every trigger stop immediately. |
assistant_chatTalk to one of your assistants server-side by slug — the way to test one before any app exists. Pass prompt for one turn or messages to replay a conversation; the whole reply comes back with a trace of each tool-use round.
assistant_chat| Parameter | Type | Description |
|---|---|---|
| assistantreq | string | Slug of one of your active assistants. |
| prompt | string | Single-turn shorthand: one user message. Either prompt or messages. |
| messages | object[] | The conversation, oldest first, max 100 turns of role user | assistant. The assistant keeps no history; replay every turn it should see. |
Hosted MCP servers and agents
Code you hand to OpZero that runs on a stable endpoint. kind mcp_server is a tools surface verified to speak MCP; kind agent is stateful code on the Cloudflare Agents SDK — WebSocket sessions, synced state, schedules, per-instance SQL. Scaffolds come from docs with a template name and kind.
workload_deploydestructiveBuild and deploy TypeScript or Python. kind mcp_server: hosted TypeScript gets 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. kind agent: each exported Agent class becomes a stateful instance type at <endpoint>/agents/<class-name>/<instance>; the result carries the URLs and a connect block for clients.
workload_deploydestructive| Parameter | Type | Description |
|---|---|---|
| kindreq | mcp_server | agent | mcp_server: a hosted MCP server (@opzero/mcp-runtime or opzero_mcp). agent: a Cloudflare Agents SDK agent. |
| filesreq | object<string, string> | Source files keyed by path (max 50). mcp_server: server.ts/index.ts/main.ts or server.py; agent: agent.ts/index.ts/main.ts exporting Agent classes. .html/.css/.svg/.txt/.md import as strings. |
| name | string | Project name; reusing a name redeploys in place unless new_project is true. |
| project | string | Existing project (id or name) to redeploy into. Omit for a new project or to match by name. |
| new_project | boolean | Create a fresh project even if one with the same name exists. |
| auth_mode | token | public | oauth | oauth (server default), token (agent default) or public. Omit on redeploy to keep the current mode. |
| secrets | object<string, string> | Encrypted environment secrets (ctx.env.KEY / this.env.KEY). OPZERO_* keys are reserved. |
| runtime | cloudflare | vercel | mcp_server: runtime target, default cloudflare. vercel needs account entitlement. |
| allow_public_shared_storage | boolean | mcp_server, public auth_mode only: allow ctx.storage shared-scope writes by anonymous callers. |
| multi_tenant | boolean | mcp_server, oauth only: admit any authenticated OpZero user, each with their own ctx.user, storage and connections. Omit on redeploy to keep. |
| schedule | string | mcp_server: cron (UTC, 5 fields or @hourly/@daily/@weekly/@monthly, min 5 minutes) for scheduled(). "" removes it; omit to keep. |
| durable | boolean | object | mcp_server, Cloudflare only: opt into ctx.durable (per-server SQLite): true, or { schema, methods, alarm } mirroring defineServer({ durable }). Omit on redeploy to keep. |
| blobs | boolean | mcp_server, Cloudflare only: opt into ctx.blobs (shared R2 under servers/<id>/). The source must also declare defineServer({ blobs: true }). |
| allowed_callers | string[] | agent, oauth only: emails or AuthKit subjects (usr_...) admitted alongside you. [] clears; omit to keep. |
| classes | string[] | agent: exported Agent class names to host. Defaults to every class extending Agent in the source. |
| idle_archive_days | integer | agent: days of inactivity before automatic archiving (default 14); 0 disables. Omit on redeploy to keep. |
workload_inspectread onlyaction list and get: your servers or agents with endpoint, auth mode, classes, and last verification. action logs: deployment health, recent deploy records, and a live Cloudflare tail — the first stop when a server misbehaves. action secrets: configured secret keys, never values. action widgets: which MCP Apps widgets a server exposes and which tools render into each. action model_grants and model_usage: the models a workload may call and what it has spent.
workload_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | list | get | logs | secrets | widgets | model_grants | model_usage | list: your servers or agents (needs `kind`). get: one workload (needs `kind`, `project`). logs, secrets, widgets: kind mcp_server (needs `project`). model_grants, model_usage: the model grant ledger. |
| kind | mcp_server | agent | mcp_server or agent. Required except for model_grants and model_usage, where it filters by grantee kind. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| limit | integer | list: page size, max 100 (default 50). logs: deployment records, max 50 (default 10). model_grants, model_usage: rows, max 200 (default 50). |
| cursor | string | list, kind mcp_server: pagination.nextCursor from the previous page. |
| since | string | logs: ISO timestamp lower bound for deployment records. |
| grantee_kind | install | run | home_assistant | mcp_server | agent | model_grants: only grants held by this kind of workload; defaults to `kind` when given. |
| grantee_id | string | model_grants: only grants held by this workload id. |
| include_revoked | boolean | model_grants: include revoked grants (default false). |
| grant_id | string | model_usage: only calls drawn against this grant. |
workload_configuredestructiveaction update: change a deployed server or agent’s settings without a rebuild. action secret_set / secret_delete: encrypted environment secrets, exposed as ctx.env.KEY (servers) or this.env.KEY (agents), hot-applied. action model_grant / model_grant_revoke: let a workload call platform models on your account, or stop it.
workload_configuredestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | update | secret_set | secret_delete | model_grant | model_grant_revoke | update: settings without resending source (needs `kind`, `project`). secret_set / secret_delete: one encrypted secret (needs `kind`, `project`, `key`; set needs `value`). model_grant: needs `grantee_id`, `grantee_kind` or `kind`, `model` or `model_class`, and a budget. model_grant_revoke: `grant_id`, or `grantee_id` with a kind. |
| kind | mcp_server | agent | mcp_server or agent. Required for update and the secret actions; stands in for grantee_kind on the grant actions. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| key | string | secret_set, secret_delete: environment variable name. OPZERO_* and platform-reserved keys are refused. |
| value | string | secret_set: the secret value; write-only, never returned. |
| auth_mode | token | public | oauth | update: new auth mode. Moving to public needs confirm_public. Omit to keep. |
| confirm_public | boolean | update: required to move an authenticated workload to auth_mode public. |
| multi_tenant | boolean | update, kind mcp_server, oauth only: admit any authenticated OpZero user. Omit to keep; false closes it. |
| allow_public_shared_storage | boolean | update, kind mcp_server, public only: allow anonymous ctx.storage shared-scope writes. |
| schedule | string | update, kind mcp_server: cron for scheduled() (UTC, min 5 minutes). "" removes it; omit to keep. |
| allowed_callers | string[] | update, kind agent, oauth only: emails or AuthKit subjects admitted alongside you. Replaces the list; [] clears. |
| idle_archive_days | integer | update, kind agent: days of inactivity before automatic archiving; 0 disables. Applied in place when alone. |
| grantee_kind | install | run | home_assistant | mcp_server | agent | model_grant, model_grant_revoke: the workload kind being granted; defaults to `kind`. install, run and home_assistant are opaque ids. |
| grantee_id | string | model_grant, model_grant_revoke: mcp server id or agent id (from workload_inspect get), or the opaque install/run id. |
| model | string | model_grant: explicit Vercel AI Gateway model id, e.g. anthropic/claude-sonnet-5. Or give model_class. |
| model_class | reasoning | fast | embedding | model_grant: grant a class of models rather than one id (oz.json models[].class). |
| capabilities | chat | tools | embeddings[] | model_grant: what the grant may be used for. Default ["chat"]. |
| budget_period | day | month | model_grant: budget window, default month. |
| budget_usd | number | model_grant: USD ceiling per window. One of budget_usd or budget_calls is required. |
| budget_calls | integer | model_grant: call-count ceiling per window. |
| enforcement | hard | soft | model_grant: hard (default) refuses once the ceiling is reached; soft records the overage and allows the call. |
| warn_at_pct | integer | model_grant: advisory warning threshold as a percentage of the ceiling. |
| reason | string | model_grant, model_grant_revoke: why, recorded as provenance. |
| grant_id | string | model_grant_revoke: the grant id (mg_...) from workload_inspect model_grants. |
workload_rotate_tokendestructiveReplace a token-mode server’s or agent’s shared access token. The old one stops working immediately; the new one is shown exactly once.
workload_rotate_tokendestructive| Parameter | Type | Description |
|---|---|---|
| kindreq | mcp_server | agent | mcp_server or agent. |
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
list_mcpsread onlyYour hosted MCP servers with what each client needs to add one: the claude.ai Add custom connector dialog for Claude, a claude mcp add command for Claude Code, config and install links for Cursor and VS Code, the URL for anything else. Renders as a widget with a client selector detected from the host and an Add button per server.
list_mcpsread only| Parameter | Type | Description |
|---|---|---|
| client | claude | claude_desktop | claude_code | chatgpt | cursor | vscode | other | Preselect the client the widget adds servers to. Omit to let the widget detect its host (Claude when it cannot). |
| name_contains | string | Only servers whose project name contains this text (case-insensitive). |
| limit | integer | Servers to return, most recently deployed first (default 50). |
Gateways
One MCP endpoint fronting many backends, behind an exposure policy.
gateway_inspectread onlyaction list: your gateways with endpoints and backend counts; materializes the default gateway on first call. action get: one gateway in full — exposure policy, backend attachments with namespaces, and per-backend health.
gateway_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | get | list | get: one gateway with its exposure policy, endpoint URL and backends (needs `gateway`). list: your gateways with backend counts and endpoint URLs. |
| gateway | string | Gateway slug or gateway id. "default" is the auto-created default gateway. |
| limit | integer | list: page size, default 50. |
gatewaydestructiveaction create: a federated endpoint at gw.opzero.sh/g/<slug>/mcp — choose the exposure mode carefully, search is right for Claude.ai. action update: name, exposure mode, inline limit, pinned tools, or tracking flag, live within about thirty seconds. action add_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. action remove_backend: detach one, revoking any connection grant it held. action delete: remove the gateway and its attachments; backends survive, the default gateway cannot be deleted.
gatewaydestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | create | update | delete | add_backend | remove_backend | create needs `name`. update needs `gateway` and a field. delete needs `gateway`, `confirm`. add_backend needs `gateway`, `type`, `namespace`. remove_backend needs `backend_id`, `confirm`. |
| gateway | string | Gateway slug or gateway id. "default" is the auto-created default gateway. |
| name | string | create: the gateway name, e.g. "Support Bot Tools". update: the new name. |
| slug | string | create: URL-safe identifier, derived from name when omitted. The endpoint is gw.opzero.sh/g/<slug>/mcp. "default" is reserved. |
| description | string | create, update: what this gateway is for. |
| exposure_mode | auto | inline | search | pinned | create, update: search (constant meta-tools; required for Claude.ai), inline (tools merged as <ns>_<tool>), pinned (chosen tools inline), auto (default: search when track_all_deployed, else by inline_tool_limit). |
| inline_tool_limit | integer | create, update: tool count where auto flips from inline to search (default 40). |
| pinned_tools | string[] | update: qualified tool names (<namespace>_<tool>) shown inline in pinned mode. |
| track_all_deployed | boolean | create, update: federate every active deployed MCP server automatically (default false; the default gateway has it on). |
| client_capabilities | object<string, string> | create, update: the MCP ClientCapabilities map declared to backends. Omit for the built-in map (ui, tasks); a configured map replaces it, {"extensions": {}} declares none. |
| reset_client_capabilities | boolean | update: true returns the gateway to the built-in ClientCapabilities declaration. Not with client_capabilities. |
| type | opzero_mcp | external_mcp | assistant | add_backend: opzero_mcp (your hosted server, by server_id), external_mcp (any MCP server, by url or connection), assistant (exposed as ask_<slug>). |
| namespace | string | add_backend: tool-name prefix, unique per gateway (lowercase alphanumeric and underscores, e.g. "shop"). |
| server_id | string | add_backend, opzero_mcp: the project id or the mcp_server id; both resolve to the current MCP endpoint. |
| assistant_slug | string | add_backend, assistant: the assistant slug. |
| assistant_id | string | add_backend, assistant: the assistant id (alternative to assistant_slug). |
| url | string | add_backend, external_mcp: the Streamable HTTP MCP endpoint. Optional with connection; pass it to point a connection at a self-hosted instance on the same origin. |
| connection | string | add_backend, external_mcp: an external connection (label, provider slug, or id) as the credential; attaching grants it to the backend. Needs a linked identity. |
| auth_bearer | string | add_backend, external_mcp: a bearer token sent to the backend. Stored encrypted, never returned. Prefer connection for OAuth services. |
| use_caller_token | boolean | add_backend, external_mcp: forward each caller's own OpZero bearer to the backend. OpZero service-owned endpoints only (https://code.opzero.sh). |
| tool_allowlist | string[] | add_backend: backend-local tool names to expose (omit for all). Required with the "opzero" connection, where it is also the grant. |
| position | integer | add_backend: sort order in listings (default 0). |
| backend_id | string | remove_backend: the backend attachment id (from gateway_inspect get). |
| confirm | boolean | delete, remove_backend: must be true. Both take tools off the live gateway within about 30 seconds; a removed attachment's settings (tool_allowlist, position, auth_bearer) are gone. |
External connections
OAuth grants to third-party MCP servers, stored encrypted and released only to workloads you name.
connection_inspectread onlyaction list: your connections with status, granted scope, and which workloads may use each. Status needs_reauth means the grant must be recreated.
connection_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | list | list: your external connections with status, granted scope and the workloads granted each one. |
| limit | integer | list: page size, default 50. |
connectiondestructiveaction create: connect Notion, Linear, Sentry, Neon, Vercel, or any RFC 9728 server; returns a one-time authorize URL, and 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 platform tools as you. action grant: let one workload use one connection, or revoke that permission — the consent boundary, nothing is ambient; granting "opzero" additionally requires a tool_allowlist, whose entries may be a tool name or tool:action. action delete: revoke at the provider where supported, delete the stored credential, and drop every grant on it.
connectiondestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | create | delete | grant | create needs `provider` or `url`. delete needs `connection`, `confirm`. grant (or revoke with `revoke`) needs `connection`, `subject_kind`, `subject_id`. |
| connection | string | delete, grant: the connection id (from connection_inspect). |
| provider | string | create: catalog provider slug (opzero, oz, notion, linear, sentry, neon, vercel). "opzero" is the platform; "oz" is your own server or gateway (see target). |
| url | string | create: Streamable HTTP MCP endpoint of any external server (must publish RFC 9728 metadata); overrides a catalog entry. Not with provider "opzero" or "oz". |
| target | string | create, provider "oz": a hosted MCP server slug, "gw" for your default gateway (the default), or "gw/<slug>". |
| label | string | create: a name for this connection, e.g. "Work Notion"; defaults to the provider name. Not with provider "oz". |
| grant_to_kind | gateway_backend | assistant | mcp_server | agent | create: also grant the new connection to a workload of this kind in the same step. |
| grant_to_id | string | create: id of the workload to grant; required with grant_to_kind. |
| subject_kind | gateway_backend | assistant | mcp_server | agent | grant: the kind of workload being granted or revoked. |
| subject_id | string | grant: the workload id: gateway backend id (gateway_inspect get), assistant id, mcp_server id, or agent id (workload_inspect). |
| note | string | grant: why this grant exists. |
| revoke | boolean | grant: true removes the grant instead of adding it. |
| tool_allowlist | string[] | grant: the tools the workload may call as you. Required for the "opzero" and "oz" providers; a current name, a legacy name, or tool:action. |
| confirm | boolean | delete: must be true. The stored credential is revoked at the provider and every workload grant on it is removed. |
Tasks and the builder
Long-running work on your account: tasks hosted servers mint, items waiting on your attention, and the Oz Build agent that builds and deploys apps through this same tool surface.
task_inspectread onlyaction list and get: tasks across your workloads, or one with its current status and result. action observe: wait for a task to change.
task_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | list | get | observe | list: durable tasks across the account, filtered and paged. get: one task by id (needs `task_id`). observe: a task with its event log from a cursor and its approvals (needs `task_id`). |
| project | string | Restrict to one project (id or name). get/observe: skips the account scan. |
| task_id | string | get/observe: the task id, from the call that minted it or from list. |
| home_id | string | list: only tasks bound to this home. |
| install_id | string | list: only tasks bound to this install. |
| actor | string | list: only tasks whose actor chain names this actor. |
| status | working | input_required | completed | failed | cancelled | list: only this status. |
| run_kind | hosted-mcp | assistant | agent | machine | sandbox | list: only tasks backed by this run kind. |
| tool | string | list: only tasks minted by this tool. |
| terminal | boolean | list: true for finished tasks only, false for in-flight only. |
| dead_lettered | boolean | list: true for dead-lettered tasks only. |
| after | integer | observe: last event seq you already have. Omit to read from the beginning. |
| limit | integer | list/observe: page size. |
| cursor | string | list: cursor from the previous page. |
taskaction approve: let a task past an approval gate. action cancel: stop one. action attention: what is waiting on you — approvals, failures, and stalls (re-derived on every call, so it needs deploy scope). action ack: clear an attention item.
task| Parameter | Type | Description |
|---|---|---|
| actionreq | approve | cancel | ack | attention | approve: decide one pending approval (needs `task_id`, `approval_id`, `decision`). cancel: record a cancel request (needs `task_id`). ack: acknowledge one attention record (needs `attention_id`). attention: what in this home is waiting on a person, re-derived unless `refresh: false`. |
| project | string | approve/cancel: the project holding the task, if known. Skips the account scan. |
| task_id | string | approve/cancel: the task id. |
| approval_id | string | approve: the approval to decide, from task_inspect observe. |
| decision | granted | denied | approve: grant or deny. |
| attention_id | string | ack: the record to acknowledge, from action attention. |
| home_id | string | attention: assert which home to read. Must be this account's home; it never selects another one. |
| kind | task_input_required | approval_pending | budget_threshold | run_failed | attention: only this kind of attention. |
| include_acknowledged | boolean | attention: false returns open rows only. Default true. |
| refresh | boolean | attention: false skips the re-derivation and reads the stored rows. Default true. |
| limit | integer | attention: page size. |
builder_runaction start: begin a turn on the durable Build run and wait up to wait_seconds for it to finish. action cancel: request a stop at the next tool boundary. Refused to workload grants, so a builder cannot start itself.
builder_run| Parameter | Type | Description |
|---|---|---|
| action | start | cancel | start (default): run one turn (needs `message`). cancel: record a cancel request against a run (needs `run_id`). |
| message | string | start: what the builder should do this turn. |
| messages | object[] | start: prior turns to replay, oldest first (max 100). The run keeps no history of its own; omit for a fresh conversation. |
| wait_seconds | integer | start: how long to wait for a terminal state before answering, 0 to 60. Default 20; 0 returns as soon as the run is created. |
| run_id | string | cancel: the run to request cancellation of. |
| reason | string | cancel: why, recorded with the request (max 200 characters). |
builder_run_inspectread onlyA Build run’s reply, tool calls, and stop facts.
builder_run_inspectread only| Parameter | Type | Description |
|---|---|---|
| run_idreq | string | The runId builder_run returned. |
Files
The file store your apps and hosted servers share, reached from app code through oz.files and from servers through ctx.files. These tools work on it from the conversation.
file_inspectread onlyaction list and search: browse or search files in a scope. action history: a file’s revisions. action attachments: what a file is attached to. action download_url: a short-lived URL for a file’s bytes.
file_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | list | search | history | attachments | grants | download_url | list: files under a prefix, metadata only. search: files matching every term of `query`. history: one file's revisions. attachments: one owner object's files or one file's owners. grants: file grants in force (owner role). download_url: a 5-minute presigned GET for an uploaded file. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| user_id | string | Address one end user's personal scope instead of the project-wide shared scope. |
| scope | string | Storage scope: 'shared' (project-wide, the default), 'user:<id>', 'app:<inst_...>:<subject>' or 'home:<home_...>'. Wins over user_id. |
| prefix | string | list, search: only paths starting with this prefix, e.g. "reports/". Case-sensitive. |
| after | string | list: resume after this path. attachments: the att_* id the previous page ended on. |
| reverse | boolean | list: scan in descending path order. |
| query | string | search: terms to match in path, display name or indexed text; every term must match. |
| cursor | string | search: the previous page's cursor. |
| path | string | history, download_url: file path. Pass exactly one of path or handle. |
| handle | string | object | File handle: the stable file_... id from a read or listing, unchanged by a rewrite or a move. Pass exactly one of path or handle. |
| before | string | history: resume after this revision. grants: the previous page's next_before (or an ISO-8601 instant). |
| owner_kind | string | attachments: with owner_id, list that object's files in position order. |
| owner_id | string | attachments: the app's own id for the owner object. |
| grant_id | string | grants: one exact grant by its fgr_* id, revoked or expired included. |
| home_id | string | grants: grants made inside one home. |
| grantee_kind | user | client | assistant | agent | mcp_server | gateway | gateway_backend | platform | grants: kind of actor holding the grant. |
| grantee_id | string | grants: id of the actor holding the grant. |
| grantor_subject | string | grants: AuthKit subject whose authority the grants spend. |
| target_file_id | string | grants: grants over one file handle. |
| include_revoked | boolean | grants: include revoked grants. Default false. |
| include_expired | boolean | grants: include lapsed grants. Default false. |
| limit | integer | Page size. list: default 200, max 1000. search: max 100. history, attachments, grants: default 50, max 200. |
file_readread onlyRead one file’s contents.
file_readread only| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| user_id | string | Address one end user's personal scope instead of the project-wide shared scope. |
| scope | string | Storage scope: 'shared' (project-wide, the default), 'user:<id>', 'app:<inst_...>:<subject>' or 'home:<home_...>'. Wins over user_id. |
| path | string | File path, e.g. "reports/q1.csv". Pass exactly one of path or handle. |
| handle | string | object | File handle: the stable file_... id from a read or listing, unchanged by a rewrite or a move. Pass exactly one of path or handle. |
| encoding | text | base64 | none | How to return the content. Default 'text'; 'none' returns metadata only. |
file_writeWrite one file, creating it or replacing its contents.
file_write| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| user_id | string | Address one end user's personal scope instead of the project-wide shared scope. |
| scope | string | Storage scope: 'shared' (project-wide, the default), 'user:<id>', 'app:<inst_...>:<subject>' or 'home:<home_...>'. Wins over user_id. |
| pathreq | string | File path, e.g. "reports/q1.csv". Printable ASCII, slashes allowed; no "..", leading/trailing slash, whitespace, or % ? # < > | * characters. |
| content | string | Text content, stored as UTF-8. Pass exactly one of content or content_base64. |
| content_base64 | string | Base64-encoded bytes, for binary files. Pass exactly one of content or content_base64. |
| content_type | string | Media type to store and serve. Defaults to a guess from the path extension. |
| display_name | string | User-facing name shown instead of the path; may contain spaces and accents. Omitted on a rewrite keeps the existing name. |
| public | boolean | Publish at a credential-free URL. Writes to the shared scope; cannot be combined with user_id. |
| metadata | object<string, string> | Arbitrary JSON kept alongside the file (max 4KB serialized). |
| if_revision | string | Only write if the file is still at this revision; otherwise nothing is written and the result is a revision_conflict. Omit for last-write-wins. |
file_uploadaction prepare: a presigned upload for bytes too large to send inline. action finalize: register the uploaded object as a file.
file_upload| Parameter | Type | Description |
|---|---|---|
| actionreq | prepare | finalize | prepare: stage a large file and get a presigned PUT URL (needs `path`, `size`, `sha256`). finalize: verify the PUT object and commit it as the file (needs `upload_id`). |
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| user_id | string | Address one end user's personal scope instead of the project-wide shared scope. |
| scope | string | Storage scope: 'shared' (project-wide, the default), 'user:<id>', 'app:<inst_...>:<subject>' or 'home:<home_...>'. Wins over user_id. |
| path | string | prepare: the path the upload becomes, e.g. "media/demo.mp4". Same grammar as file_write. |
| size | integer | prepare: exact byte length. finalize refuses an object of any other size. |
| sha256 | string | prepare: SHA-256 of the content, 64 hex characters or a 44 character base64 digest. |
| content_type | string | prepare: media type to store and serve. Defaults to a guess from the path extension. |
| display_name | string | prepare: user-facing name, shown instead of the path. |
| metadata | object<string, string> | prepare: arbitrary JSON kept on the finalized file (4KB max serialized); provenance for a derived artifact belongs here. |
| upload_id | string | finalize: the upl_... id prepare returned. |
filedestructiveaction attach / detach: link a file to a project or workload, or unlink it. action move, trash, restore, delete: reorganise, soft-delete, recover, or permanently remove. action share / unshare and grant / grant_revoke: publish a file or let a named workload read it.
filedestructive| Parameter | Type | Description |
|---|---|---|
| actionreq | attach | detach | move | trash | restore | delete | share | unshare | grant | grant_revoke | attach: reference a file from an owner object (needs `owner_kind`, `owner_id`, `handle`). detach: drop one reference (needs `attachment_id`). move: rename (needs `path` or `handle`, and `to_path`). trash / restore: soft delete and its undo. delete: remove now (needs `path`). share / unshare: move a file into or out of a home's shared scope (owner role). grant / grant_revoke: write or revoke a file grant (owner role). |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. |
| user_id | string | Address one end user's personal scope instead of the project-wide shared scope. |
| scope | string | Storage scope: 'shared' (project-wide, the default), 'user:<id>', 'app:<inst_...>:<subject>' or 'home:<home_...>'. Wins over user_id. share: the scope the file is in; unshare: where it lands. grant: the folder scope granted. |
| path | string | move, trash, restore, delete, share, unshare: the file path. Pass exactly one of path or handle. |
| handle | string | object | File handle: the stable file_... id from a read or listing, unchanged by a rewrite or a move. Pass exactly one of path or handle. |
| to_path | string | move: the new path, e.g. "reports/2026-q1.csv". Same grammar as file_write. |
| display_name | string | move: set the user-facing name at the same time. Omit to keep the current one. |
| if_revision | string | move, trash, restore, delete: only act if the file is still at this revision; otherwise a revision_conflict result. |
| owner_kind | string | attach: the app's kind for the owner object (lowercase letters, digits, underscores), e.g. document, message, task. |
| owner_id | string | attach: the app's own id for that object. |
| role | inline | attachment | thumbnail | attach: how the owner renders it. Default attachment. |
| label | string | attach: user-facing caption. Spaces and accents allowed; it is not a path. |
| revision | string | attach: pin this revision. Must be the file's current one, else the attach is refused with a revision_conflict. |
| position | integer | attach: ordering inside the owner object. Defaults to the end of its list. |
| added_by | string | attach: actor that attached it, recorded for audit. |
| attachment_id | string | detach: the att_* id. |
| home_id | string | share, unshare: the home (home_...); defaults to the one the project is attached to. grant: the home the grant is made inside. |
| grantee_kind | user | client | assistant | agent | mcp_server | gateway | gateway_backend | platform | grant: kind of the actor that will make the call, the leaf of its actor chain. |
| grantee_id | string | grant: id of that actor, e.g. the hosted server id or assistant id. |
| actions | file:read | file:write | file:list | file:search | file:share[] | grant: exact actions granted. An action absent here is denied; no implied read behind a write. |
| target_file_id | string | grant: a single file handle (file_<ULID>). Mutually exclusive with scope. |
| path_prefix | string | grant: folder grant path prefix inside scope, no leading slash; empty covers the whole scope. Matched on a segment boundary. |
| expires_at | string | grant: ISO-8601 instant the grant lapses. Omit for one that lasts until revoked. |
| grantor_subject | string | grant: AuthKit subject (usr_*) whose authority the grant spends. Defaults to the calling account. |
| grant_id | string | grant_revoke: the fgr_* id. |
Source repositories
Every project has a source repository. These tools read and edit it with anchored, compare-and-swap writes, branches, and proposals reviewed before they land. A refused call answers as unknown.
src_inspectread onlyaction list, outline, view: the tree, a file’s symbols, or a rendered view. action log, diff, changed_paths: history and what changed. action branches, repos: what exists. action quota_get, race_check: limits and concurrent-edit safety.
src_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | list | log | diff | changed_paths | outline | branches | repos | view | quota | list: a directory at a snapshot. log: commit history. diff: two snapshots (needs `from` and `to`). changed_paths: paths differing between two snapshots. outline: headings or symbols of one file (needs `path`). branches: heads and protection. repos: your projects as repositories (no `project`). view: the repository view. quota: object counts, metrics, queue depths, limits. |
| project | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| ref | object | list, log, outline, view: snapshot to read at. Defaults to { branch: "main" }; a branch resolves to its current head. |
| path | string | outline: the file. log: restrict history to this path. view: file to show in the Browse tab. |
| prefix | string | list: directory to list ("" for the root). diff, changed_paths: restrict to this directory. |
| depth | integer | list: tree depth, default 1. |
| limit | integer | list: entries, up to 2000. log: commits, up to 100. |
| from | object | diff, changed_paths: the older snapshot. Defaults to { branch: "main" }. |
| to | object | diff, changed_paths: the newer snapshot. Defaults to { branch: "main" }. |
| text | boolean | diff: return a unified diff instead of per-path line counts. |
| context_lines | integer | diff: unified diff context lines. |
| max_text_bytes | integer | diff: byte budget for the unified diff. |
| before | string | log: commit hash; start after this commit. |
| first_parent | boolean | log: default true, one entry per landed proposal. |
| proposal | integer | view: proposal id to inspect in the Queue tab. |
| tab | browse | queue | view: which tab to open; default browse, or queue when proposal is given. |
| full_hashes | boolean | Return full 64 character hashes instead of 12 character prefixes. |
src_readread onlyRead one file by path, or several with paths, at a ref.
src_readread only| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| path | string | One file to read. Use `paths` for several. |
| paths | string[] | Several small files to read at one snapshot. Use instead of `path`. |
| ref | object | Snapshot to read at. Defaults to { branch: "main" }; a branch resolves to its current head. |
| run | integer | paths only: run id whose candidate tree to read (the merge result a run would land), instead of ref. |
| start_line | integer | path: first line of a line range. |
| end_line | integer | path: last line of a line range. |
| section | string | path: markdown heading, with or without the leading #s. Returns exactly the section body bytes. |
| symbol | string | path: top level symbol name. Returns exactly the definition body. |
| max_bytes | integer | path: byte budget, default 16 KB; a longer body is truncated with a marker. |
| unchanged_since | string | path: commit hash. If the blob is identical there, returns unchanged: true and no content. |
| max_total_bytes | integer | paths: byte budget across all files. |
| full_hashes | boolean | Return full 64 character hashes instead of 12 character prefixes. |
src_writeWrite a whole file with compare-and-swap against the version you read.
src_write| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| branchreq | string | Branch to move. A protected branch refuses direct writes; open a proposal instead. |
| messagereq | string | Commit message. |
| mutation_idreq | string | Client generated unique id (a UUID). Retrying with the same id returns the original result verbatim. |
| expect_headreq | string | Commit hash you believe is the branch head. If it moved the server rebases per the tier or returns HEAD_MOVED. |
| filesreq | object[] | Files to write, replace or delete in this one commit. |
| rebase | path | edit | boolean | Rebase tier when the head moved: path (apply if no touched path changed), edit (src_edit only: also reanchor edits), false (never). |
| trace_id | string | W3C trace id, 32 lowercase hex characters, recorded in the commit. |
src_editApply anchored edits to a file — find this, replace with that — with compare-and-swap.
src_edit| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| pathreq | string | The one file to edit. |
| branchreq | string | Branch to move. A protected branch refuses direct writes; open a proposal instead. |
| messagereq | string | Commit message. |
| mutation_idreq | string | Client generated unique id (a UUID). Retrying with the same id returns the original result verbatim. |
| expect_headreq | string | Commit hash you believe is the branch head. If it moved the server rebases per the tier or returns HEAD_MOVED. |
| editsreq | object[] | Anchored edits: old/new, a line range with range_hash, a section, or a symbol. |
| rebase | path | edit | boolean | Rebase tier when the head moved: path (apply if no touched path changed), edit (src_edit only: also reanchor edits), false (never). |
| trace_id | string | W3C trace id, 32 lowercase hex characters, recorded in the commit. |
src_branchaction create: a branch. action protect / unprotect: guard one from direct writes. action rebase and restore: move a branch onto a new base, or bring back a deleted path.
src_branch| Parameter | Type | Description |
|---|---|---|
| action | create | protect | unprotect | rebase | restore | create (default): a new branch at a commit. protect / unprotect: a branch moves only through merge finalization, with its validation policy (needs `branch`). rebase: replay the branch onto another snapshot (needs `branch`, `onto`, `message`, `mutation_id`, `expect_head`). restore: a new commit whose tree equals snapshot `to` (needs `branch`, `to`, `message`, `mutation_id`, `expect_head`). |
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| name | string | create: the branch name. Defaults to contrib/<you>/<n>. |
| from | object | create: the commit the branch starts at. Defaults to { branch: "main" }; branch from the target head so a proposal needs no rebase. |
| require_validation | build[] | protect: validation classes a run must carry a pass for before finalize. Omit to leave unchanged; [] clears it. |
| onto | string | rebase: commit hash (or unique prefix) to rebase onto, usually the target head. |
| overlap | fail | branch | onto | rebase: paths changed on both sides. fail (default): REBASE_CONFLICT. branch: keep the branch version. onto: take the onto version. |
| to | string | restore: commit hash whose tree becomes the branch content. |
| branch | string | Branch to move. A protected branch refuses direct writes; open a proposal instead. |
| message | string | Commit message. |
| mutation_id | string | Client generated unique id (a UUID). Retrying with the same id returns the original result verbatim. |
| expect_head | string | Commit hash you believe is the branch head. If it moved the server rebases per the tier or returns HEAD_MOVED. |
| trace_id | string | W3C trace id, 32 lowercase hex characters, recorded in the commit. |
| rebase | path | edit | boolean | Rebase tier when the head moved: path (apply if no touched path changed), edit (src_edit only: also reanchor edits), false (never). |
src_proposeaction open: propose a change set for review. action validate: run the candidate’s checks. action validation_record: attach a result. action reject: close one without merging.
src_propose| Parameter | Type | Description |
|---|---|---|
| action | open | reject | validation_record | validate | open (default): open a proposal from `branch` onto `target` (needs `summary`). reject: remove a proposal (needs `proposal`, `reason`). validate: run the platform build evaluator on a run (needs `run`). validation_record: record evidence on a run; refused for callers, evidence comes from validate. |
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| branch | string | open: the source branch. |
| target | string | open: the target branch, default main. |
| summary | string | open: what the proposal changes. |
| proposal | integer | reject: the proposal id. |
| reason | string | reject: why. |
| run | integer | validate, validation_record: the run id from open or src_proposal_inspect; it must be evaluated (queued). |
| class | build | test | policy | review | validation_record: the validation class. |
| verdict | pass | fail | validation_record: pass or fail. |
| evidence | object<string, string> | validation_record: evaluator output to keep with the record (at most 16 KB serialized). |
| mutation_id | string | validation_record: client generated unique id; retrying with it returns the original record. |
src_proposal_inspectread onlyaction list: open proposals. action get: one proposal with its diff and validation record.
src_proposal_inspectread only| Parameter | Type | Description |
|---|---|---|
| actionreq | list | get | list: proposals with their current runs. get: one proposal with its run, queue position and conflicts (needs `proposal`). |
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| state | queued | conflict | rejected | merged | list: filter by state. |
| target | string | list: only proposals onto this branch, in queue order with positions. |
| mine | boolean | list: only proposals you opened. |
| proposal | integer | get: the proposal id. |
src_merge_finalizeLand a validated proposal on its target branch.
src_merge_finalize| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project slug (its name) or project id. The repository id is the project id; you must own the project. |
| runreq | integer | — |
| mutation_idreq | string | — |
| expect_target_head | string | — |
| expect_candidate_root | string | The 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_syncSync a working copy. action checkout: the manifest to fetch. action upload_prepare and blob_missing: stage local changes. action commit: land the manifest as one commit.
src_sync| Parameter | Type | Description |
|---|---|---|
| actionreq | checkout | upload_prepare | commit | blob_missing | checkout: the exact manifest of a snapshot or a run candidate. upload_prepare: presigned PUT URLs for blobs over 1 MB (needs `blobs`). commit: commit a manifest of blob hashes (needs `manifest` and the compare and swap fields). blob_missing: which hashes are not stored (needs `hashes`). |
| projectreq | string | Project id or project name (the name is also its opzero.sh subdomain). An ambiguous name is refused with the candidates. You must own the project; the repository id is the project id. |
| ref | object | checkout: snapshot to flatten. Defaults to { branch: "main" }; a branch resolves to its current head. |
| run | integer | checkout: run id whose candidate tree to flatten, instead of ref. |
| prefix | string | checkout: restrict the manifest to this directory. commit: restrict the change set to it. |
| blobs | object[] | upload_prepare: the blobs to stage. |
| hashes | string[] | blob_missing: full blob hashes to check. |
| manifest | object[] | commit: every path with its blob hash; only differences from the tree at expect_head apply. |
| prune | boolean | commit: delete paths present at expect_head but absent from the manifest. |
| branch | string | Branch to move. A protected branch refuses direct writes; open a proposal instead. |
| message | string | Commit message. |
| mutation_id | string | Client generated unique id (a UUID). Retrying with the same id returns the original result verbatim. |
| expect_head | string | Commit hash you believe is the branch head. If it moved the server rebases per the tier or returns HEAD_MOVED. |
| trace_id | string | W3C trace id, 32 lowercase hex characters, recorded in the commit. |
| rebase | path | edit | boolean | Rebase tier when the head moved: path (apply if no touched path changed), edit (src_edit only: also reanchor edits), false (never). |
Everything else
Tools the server exposes that this page has not yet written up by hand. The descriptions below come straight from the server.
mcp_diagnosticsread onlyDiagnose 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).
mcp_diagnosticsread onlyTakes no parameters.
mcp_diagnostics_reportCompanion 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.
mcp_diagnostics_report| Parameter | Type | Description |
|---|---|---|
| client_reportreq | object | The host-side findings the mcp-diagnostics widget collected: ui/initialize result, host capabilities and context, browser sandbox facts, bridge probe outcomes. |
src_ingestCommit 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.
src_ingest| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project slug (its name) or project id. The repository id is the project id; you must own the project. |
| branchreq | string | Branch to move. Protected branches refuse direct writes; open a proposal instead. |
| messagereq | string | Commit message. |
| mutation_idreq | string | Client generated unique id (a UUID). Retrying with the same id returns the original result verbatim. |
| expect_headreq | string | Commit 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_id | string | W3C trace id, 32 lowercase hex characters, recorded in the commit. |
| rebase | path | edit | boolean | Rebase 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. |
| prefix | string | Restrict the change set to this directory. |
| prune | boolean | Delete paths present at expect_head but absent in the manifest. |
| filesreq | object[] | Full manifest of the checkout under prefix. Reference unchanged blobs by blob_hash (a short hash is fine) to avoid resending bytes. |
src_race_checkSerialization 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.
src_race_check| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project slug (its name) or project id. The repository id is the project id; you must own the project. |
| writers | integer | Concurrent writers, default 8. |
src_exportread onlyRaw 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.
src_exportread only| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project slug (its name) or project id. The repository id is the project id; you must own the project. |
| after | integer | Sequence index to start commits from (0 is the first commit). With limit, pages the commit list. |
| limit | integer | Commits per page, at most 500. |
| hashes | string[] | Objects (blobs, trees, commits) to return by hash. Entries past the response budget come back under pending; request them again. |
src_replayReplay 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.
src_replay| Parameter | Type | Description |
|---|---|---|
| source_serverreq | string | The 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_reporeq | string | Repository id on the source server. |
| projectreq | string | Target project (slug or id). Its repository must be pristine (first touch only) or a previous replay of the same source. |
src_fpvread onlyOpen 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.
src_fpvread only| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project slug (its name) or project id. The repository id is the project id; you must own the project. |
| ref | string | Optional branch name or snapshot/commit prefix. Defaults to main. |
src_ideread onlyOpen 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.
src_ideread only| Parameter | Type | Description |
|---|---|---|
| projectreq | string | Project slug (its name) or project id. The repository id is the project id; you must own the project. |
| path | string | Optional file to open. Omitted, the view opens on the tree with no file loaded. |
| ref | string | Optional branch name or commit prefix. Defaults to main. A commit opens the session read-only. |
desktop_openOpen the Oz OS desktop as an MCP App widget. Returns its current layout, app catalogue and browser continuation.
desktop_open| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
desktop_get_stateread onlyRead one desktop session: windows in back-to-front order, minimized state, geometry, dock, wallpaper and revision. Does not capture app pixels, read app documents or start workloads.
desktop_get_stateread only| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
desktop_list_appsread onlyList apps with the exact app IDs accepted by desktop_launch_app. Narrow before you read: category (system, site, service, agent, assistant, app), project_type (static, mcp_server, agent), name_contains, sort_by (name, category, recent) and limit.
desktop_list_appsread only| Parameter | Type | Description |
|---|---|---|
| category | system | site | service | agent | assistant | app | system | site | service | agent | assistant | app[] | — |
| project_type | static | mcp_server | agent | — |
| name_contains | string | — |
| sort_by | name | category | recent | — |
| limit | integer | — |
| fields | summary | full | — |
desktop_list_sessionsread onlyList your desktop sessions. Background sessions are independent working spaces for agents; shared sessions are observed and controlled with the user.
desktop_list_sessionsread onlyTakes no parameters.
desktop_create_sessionCreate a named background or shared Oz desktop session. Each agent should create a background session and target its returned session_id, avoiding focus conflicts with the user.
desktop_create_session| Parameter | Type | Description |
|---|---|---|
| namereq | string | — |
| mode | background | shared | — |
desktop_end_sessionDiscard a temporary background desktop session when an agent is done. Requires its current expected_revision.
desktop_end_session| Parameter | Type | Description |
|---|---|---|
| session_idreq | string | — |
| expected_revisionreq | integer | — |
desktop_launch_appOpen an app by its exact catalogue app_id, or restore and focus its existing window. Requires expected_revision from desktop_get_state.
desktop_launch_app| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| app_idreq | string | — |
desktop_focus_windowBring an open window to the front and restore it if minimized. Target a background session to avoid changing the user screen.
desktop_focus_window| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| app_idreq | string | — |
desktop_close_windowClose one window. Saved documents, deployments and durable workloads are not deleted or cancelled.
desktop_close_window| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| app_idreq | string | — |
desktop_minimize_windowMinimize or restore an open window without closing its view. Minimized browser views remain mounted and may keep using resources.
desktop_minimize_window| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| app_idreq | string | — |
| minimized | boolean | — |
desktop_set_windowMove, resize, maximize, restore, or snap a window left/right. Coordinates are desktop CSS pixels; clients clamp them to their available screen.
desktop_set_window| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| app_idreq | string | — |
| x | number | — |
| y | number | — |
| width | number | — |
| height | number | — |
| mode | normal | maximized | left | right | — |
desktop_set_dockReplace the dock with the ordered app_ids provided. Every id must be a current catalogue app_id; an unknown id is rejected and nothing is written.
desktop_set_dock| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| app_idsreq | string[] | — |
desktop_set_wallpaperSet this desktop wallpaper: dune (golden hour), night (after hours), or sage (quiet morning).
desktop_set_wallpaper| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| wallpaperreq | dune | night | sage | — |
desktop_set_chromeSet whether the dock and menu bar automatically hide and reveal at the screen edges. Both default to auto-hide.
desktop_set_chrome| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| dock_auto_hide | boolean | — |
| menu_auto_hide | boolean | — |
desktop_show_desktopMinimize every window in the selected desktop session. Does not stop applications or background work.
desktop_show_desktop| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
desktop_save_layoutPersist the desktop UI layout with optimistic concurrency. Window and dock ids that are no longer in the catalogue are dropped from the saved layout rather than rejected, so a deleted project cannot wedge later saves.
desktop_save_layout| Parameter | Type | Description |
|---|---|---|
| session_id | string | — |
| expected_revisionreq | integer | — |
| layoutreq | object | — |
terminal_openRequires read and deploy scopes. Open or create an owner-scoped Oz Terminal session shared by the desktop and MCP widget.
terminal_open| Parameter | Type | Description |
|---|---|---|
| session_id | string | Terminal session UUID returned by terminal_open. |
| title | string | Title for a new session. |
terminal_listread onlyList your recent terminal sessions so a user or agent can resume the same transcript. Requires a direct user connection; workload grants cannot access shared terminal sessions.
terminal_listread onlyTakes no parameters.
terminal_getread onlyRead a terminal transcript, including commands in flight. A running entry is not proof its underlying task stopped or completed.
terminal_getread only| Parameter | Type | Description |
|---|---|---|
| session_idreq | string | Terminal session UUID returned by terminal_open. |
| if_revision | integer | Last observed session revision. Return entries only when it changed. |
| include_commands | boolean | Include the current caller-visible command catalogue. |
terminal_completeread onlyReturn caller-visible command, parameter and enum completions plus authoritative argument validation. Never execute.
terminal_completeread only| Parameter | Type | Description |
|---|---|---|
| commandreq | string | Registered tool name or tasks/projects/logs/status alias, followed by --argument value pairs or a JSON object. No shell syntax. |
terminal_observeread onlyRead one fresh task or observability snapshot without adding a transcript entry. Supports `task_inspect` (actions list, get, observe), `workload_inspect` (action logs), `log_query` and the obs_* read tools; native permissions still apply.
terminal_observeread only| Parameter | Type | Description |
|---|---|---|
| commandreq | string | Registered tool name or tasks/projects/logs/status alias, followed by --argument value pairs or a JSON object. No shell syntax. |
terminal_executedestructiveRequires read and deploy scopes. Run a schema-validated platform command in a shared terminal.
terminal_executedestructive| Parameter | Type | Description |
|---|---|---|
| session_idreq | string | Terminal session UUID returned by terminal_open. |
| commandreq | string | Registered tool name or tasks/projects/logs/status alias, followed by --argument value pairs or a JSON object. No shell syntax. |
| request_idreq | string | Fresh UUID per intended command. Reuse exactly this ID after an uncertain response to avoid repeating the effect. |
browser_openread onlyOpen Oz Browser, the default Oz OS web browser, as an MCP App. Returns saved tabs, history and owned deployed-project URL suggestions without starting paid runtime.
browser_openread onlyTakes no parameters.
browser_get_stateread onlyRead your Oz Browser tabs, active tab, history, deployed project URL suggestions and revision. Does not start or refresh a remote browser.
browser_get_stateread onlyTakes no parameters.
browser_new_tabOpen a browser tab, optionally at a URL. Supports up to twelve tabs.
browser_new_tab| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| url | string | — |
browser_select_tabSelect a tab in your shared Oz Browser and return its page. Requires expected_revision; may resume metered remote browsing.
browser_select_tab| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| tab_idreq | string | — |
browser_close_tabdestructiveClose a browser tab. Unsaved page work may be lost; saved history remain.
browser_close_tabdestructive| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| tab_idreq | string | — |
browser_backGo back one entry in the tab navigation history. Requires expected_revision.
browser_back| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| tab_idreq | string | — |
browser_forwardGo forward one entry in the tab navigation history. Requires expected_revision.
browser_forward| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| tab_idreq | string | — |
browser_reloaddestructiveReload a browser tab and return its page. Requires expected_revision.
browser_reloaddestructive| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| tab_idreq | string | — |
browser_read_pageread onlyRead the selected remote browser page as untrusted text and links, with viewport coordinates in the widget. May resume metered browsing after idle expiry; resumed tabs have fresh cookies and no former back/forward stack.
browser_read_pageread only| Parameter | Type | Description |
|---|---|---|
| tab_idreq | string | — |
browser_interactdestructiveInteract with a remote page: click at 1280x800 viewport coordinates, type text into the focused field, press a named key, or scroll by delta_y pixels. Requires expected_revision.
browser_interactdestructive| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
| tab_idreq | string | — |
| actionreq | click | type | key | scroll | — |
| x | number | — |
| y | number | — |
| text | string | — |
| key | Enter | Tab | Escape | Backspace | ArrowUp | ArrowDown | ArrowLeft | ArrowRight | Space | Delete | Home | End | PageUp | PageDown | — |
| delta_y | number | — |
browser_clear_historydestructiveClear saved Oz Browser address autocomplete history. Requires expected_revision.
browser_clear_historydestructive| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |
browser_stopdestructiveClose the remote browser and discard its temporary login cookies. Saved tab URLs and history remain.
browser_stopdestructive| Parameter | Type | Description |
|---|---|---|
| expected_revisionreq | integer | — |