This server advertises the tools below. A tool list is an inventory of what the server can do — it is not a finding, and it is not part of the score.
The spec in deploy_source's description passes as given with your names; run this only if you change more. Validate an InfraSpec (JSON) against the LIVE AICC admission gate (a spec that passes here passes at deploy). Returns {passed, violations:[{code,message,fix_it}], rejection_reasons}.
Params
spec
Check source policy before submission (no #![forbid(unsafe_code)] at the crate root = CODE_UNSAFE_PERMITTED; a dependency besides ferrite-app). Fix violations before continuing. Admission is not compilation or a test verdict. For existing-app repairs, commit changed files and deploy the exact returned reference; see rcs_commit.
Cargo.toml: [package] name="<name>" version="0.1.0" edition="2021" [dependencies] ferrite-app={path="../ferrite-app"}
API for handle() in deploy_source's loop. Request: r
Params
files
packages
Explain a gate violation code (CODE_*/APP_*/CAP_*/DELTA_*/SERVICE_*/SPEC_*/COMPUTE_*) and how to fix it. For spec violations, validate_spec's live fix_it is canonical.
Params
code
A small web app (poll, RSVP, sign-up sheet): read {"doc":"page-app-starter"}, a verified one-file app, and nothing else before the first deploy. Read further docs only when one specific API, gate code or bound blocks you. READ the Ferrite documentation. With no arguments: the agent brief (the rules to know before building) and the index of every document with its size. {"doc":"<id>"} returns a document of 12 KB or less whole and a larger one as its outline of section ids; then {"doc":"<id>","sec
Params
doc
full
section
Send Ferrite a bug report, a suggestion, or feedback from your user. Omit secrets and private logs. Reuse the same request_id when retrying.
Params
kind
report
request_id
source
topic
SEARCH the Ferrite documentation: the published developer docs (the ferrite CLI and its local loop, `ferrite add` packages, authentication, Alloy, Rsx, data, agents, deploy, observe, limits), the support guides, and the platform documents `read_docs` serves. Large documents are searched section by section. Returns up to `limit` ranked matches {doc,title,section,heading,snippet,bytes,read}; read a match with read_docs and its `read` object. Every word of the query must appear in a match.
Params
limit
query
A one-page app (poll, form, sign-up sheet) needs no package. LIST the Ferrite source packages this server can compile into your app: vendored Rust source (sign-in, the Alloy runtime, crypto, cookies, MCP and ACP, the agent SDK, a browser engine and more), because a deployable app may depend on no crate but ferrite-app. Each entry is {name, version, root, summary, dependencies, files, bytes}; `query` keeps the packages whose name, summary or guide holds every word. read_package gives one package'
Params
query
A one-page app (poll, form, sign-up sheet) needs no package; alloy (thousands of lines) is for larger sites, auth for sign-in. READ one Ferrite source package. Without `file`: its version, module root, dependency closure in install order, its files (paths as they land in your app), its guide (README and setup), and `use`, the exact steps to compile it in: the crate-root lines for src/lib.rs, the `packages` argument for code_gate and deploy_source, and any Cargo features or spec entries it needs.
Params
file
name
offset
The HOST an app has, or will have once deployed: `<shortcode>.<app domain>`, the shortcode derived from the app id `<account>/<app>` the way the platform names hosts, so an app's origin and OAuth callbacks are known before its first deploy (the `auth` package's secrets need them). Answers {app, host, origin, derived, callback_urls}; callback_urls are the auth package's GitHub and Google callbacks under its default /auth prefix. `app` is your app's name (the account comes from your bearer) or a f
Params
app
token
Provision a DURABLE tenant account (open — no auth). Returns {Provisioned:{id,token}} (the bearer token) or {AlreadyProvisioned}. credit_micros is granted only where the platform's test credit mint is on; elsewhere a nonzero credit_micros is refused ({Rejected}, TEST_CREDIT_MINT_DISABLED) and nothing is created. Use the token on every other Ring 2 call (Authorization header preferred, or the 'token' argument).
Params
credit_micros
id
Open a trial account with free credit, ready to deploy at once, for a client that has no sign-in of its own: a script, or an agent without a browser. A connected application never needs it: it is already signed in to the person's account or to its own trial. Returns {EphemeralProvisioned:{account,token,claim_token,expires_at_ms,credit_micros}}: keep both tokens private.
Claim an ephemeral session to a DURABLE owner, ending its subsidy. With owner_id: into that NEW account, created now (credit_micros is granted only where the platform's test credit mint is on); an id that already exists is refused. Without owner_id: into the EXISTING account your token authenticates (Authorization header or token), which that token authorizes. Needs claim_token from provision_ephemeral. Returns {Claimed:{account,token}} for a new account, {ClaimedInto:{account}} for your own.
Params
claim_token
credit_micros
owner_id
token
Grant TEST/development credit directly to the authenticated account; returns {Funded:{balance_micros}}. Admitted only where the platform's test credit mint is on (the front's `[commerce] test_credit_mint`); elsewhere it answers Rejected (TEST_CREDIT_MINT_DISABLED), grants nothing, and names the account's top-up page -- credit is bought there, through `billing_portal`. This is NOT a card payment: real human top-ups use `billing_portal`, then Stripe's hosted checkout. F-17 remains the precondition
Params
micros
token
FIRST deploy and fork redeploy: ONE build (4-8 min), not rcs_commit+test_ref+deploy_ref (two). First run code_gate on the files (1 s; it lists Cargo.toml and the API). Then build_status {build_id, wait_s: 50}; never resubmit. Same app and service names again = update, data kept.
spec (string; set name, artifact_key apps/<name>@v1). For a small store, hot_set_gib 0 uses the default cache; 1 requests 1 GiB per store copy. Call estimate_cost with this spec and the planned instance count first:
{"se
Params
files
instances
packages
spec
token
Read a build, test run or fork by build_id. Pass wait_s: 50 and it waits up to 50 s for the state to change before answering, so you need no sleep between calls; call it again until terminal (deploy build 4-8 min, test run 2-4, fork seconds). Do not end your turn or rely on a background timer meanwhile: in a non-interactive session that ends the session mid-build. deployed: live at https://<host>; give the user that URL (a new host can answer 504 for a minute or two while it is placed). rejected
Params
build_id
token
wait_s
The account this connection acts as, and its balance. Call it first. On a connection that has not signed in, the person's application opens Ferrite's connect page, where they sign in to their own account or start a trial. To act as another account, start over or disconnect, the person uses Connected agents in the Ferrite Dashboard; this connection follows on its next call.
Params
token
List the apps the authenticated account owns, each with its serving host (URL) and running/desired instance counts.
Params
token
Read an owned deployment's complete operational status: running/desired instances, observed generation, the exact admitted compute hold, parked state, per-worker serving/candidate rollout documents, and the instance lifecycle: each worker's serving set (a new set_id is a new process) with every process's start and unexpected exits, and the sets that ENDED there with why and their last lines. Use this when diagnosing placement, rollout, reservation or crash-loop state, or a restart you did not ca
Params
app
token
Remove an OWNED app's hosted source repository, for an app that is withdrawn or was never deployed: every branch, tag and release goes at once, and the objects go within about three hours, which is when the bytes stop counting against your account. A commit landing after this reads stands, with what it reaches, and you are told so: run this again to remove it. What landed before it is gone, even if its commit was answered after. Nothing here can be undone.
Params
app
token
What this account's source repositories hold and may hold: the figure a commit, push, capture, merge or fork is judged against, its ceiling, whether it shares the pool trials and accounts with no payment answer to, and what each repository held at the last hourly measure, largest first.
Params
token
What each service of an OWNED app reserves and is charged, and what that costs a month at the prices in force, by axis: its stated disk (`volume_mib`) and its charged memory (the hot set it declares, or the default). These are the figures the bill reads. `copies` says how many copies each byte is held in, and `notes` says which prices these are. It charges nothing.
Params
app
token
Read an owned app's durable captured-log tail (newest last), including each ended instance set's last lines followed by its end line: when, why, and how many processes it stopped.
Params
app
tail
token
Scale an owned app to 'instances' instances (the platform reconciles; survivors are not restarted).
Params
app
instances
token
Set both finite per-replica compute axes on an owned deployment without changing its artifact: `memory_mb` and `cpu_percent` (100 = one core). The front re-runs account admission and the worker applies the new cgroup bound; use `status` to observe the exact admitted hold and rollout.
Params
app
cpu_percent
memory_mb
token
Roll an owned app back to its previous artifact (health-gated by the worker).
Params
app
token
End a deploy or fork that is still under way, by the build_id it returned: use it when a deploy is waiting on capacity and you want the name back. Returns {{BuildState:{{...}}}}. state 'cancelled' means nothing of it landed, any fee it took is returned, your running application is untouched and you can deploy again; 'deployed' means its operation had already finished, so the version is registered and `status` says whether it has landed, and this ends no trial; 'undoing' means it cannot land and
Params
build_id
token
Withdraw an owned app: end any deploy still under way on its name, unpublish its routes and tear it down. Nothing begun before this answers can land after it.
Params
app
token
List a queue service's dead letters, oldest first: messages delivered as many times as the queue allows without being acknowledged, which no consumer can take and which keep their bytes against the service's volume_mib until removed. Each says its id, its attempts and its size, and for an ordered message its key, its number and whether it killed its key. `total` is the queue's whole count; page with `after`, the last id seen.
Params
after
app
limit
service
token
Remove a queue service's dead letters: `ids`, or `all`, one of the two. The bytes come back at once, so a queue refused for its volume_mib takes writes again. An id not dead now is passed over and not counted, so a live message is never removed. Removing the message an ordered key died on BRINGS THE KEY BACK: its later messages resume in order, with a gap where the removed number was, and `came_back` says how many per key; it can be none, since messages delivered together spend their attempts to
Params
all
app
ids
service
token
Describe an owned app: serving host, artifact, desired/running instances, generation, compute bound, autoscale policy.
Params
app
token
List the services an owned app's CURRENT deployment holds, read from its committed deployment record: each binding's handle, primitive (store, log, topics, queue, ape, blob or egress), shard count and replication (the member seats per shard; null for egress), with the record's generation. generation is null and services empty when the app has no current deployment. Carries no address, key or credential.
Params
app
token
Attach/replace an owned app's autoscale policy: scale between min and max replicas at `capacity` requests/sec per replica.
Params
app
capacity
max
min
token
List the custom domains you own (name, verified, bound app).
Params
token
Claim a custom domain; returns a verify_token to publish as a DNS TXT record, then call verify_domain.
Params
domain
token
Verify a claimed domain by presenting the issued token (after publishing it in DNS).
Params
domain
presented_token
token
Point a verified owned domain at an owned app (host-routing; HTTPS cert provisioning for custom domains is a follow-on).
Params
app
domain
token
Copy a running app WITH its data (copy-on-write, seconds): {app, fork_app}, fork_app a new name such as <app>-karaoke. Returns {BuildStarted:{build_id}}; build_status reports deployed within seconds with the fork's host and one line per service (forked = copied). The original keeps serving, unchanged.
To change the copy: deploy_source ONCE with your edited files and the same spec except application name = fork_app exactly (artifact_key apps/<fork_app>@v1); keep the service names so the copied da
Params
app
as_of_unix_micros
fork_app
token
For an existing-app repair, send only changed files with complete contents; omitted files remain in the hosted repository, so do not re-upload unchanged generated packages. Save RcsCommitted.commit and use that exact reference for required test_ref and deploy_ref. Preserve the existing manifest and app identity. COMMIT files to the app's hosted source repository — INCREMENTAL: each commit overlays the previous tree, so you build the app up over MANY commits (many generations) instead of one gian
Params
app
branch
files
message
packages
token
CHECK OUT (clone/pull) the app repository's source at a ref (a branch name or a commit id; omit for the 'main' head). Returns {RcsCheckout:{app,commit,files}} — the {path: content} to iterate on.
Params
app
reference
token
Read the app repository's commit log (of 'branch'; default 'main', newest first). Returns {RcsLog:{app,commits:[{commit,message,author,timestamp_ms}]}}.
Params
app
branch
limit
token
For existing-app repairs, use the exact commit returned by rcs_commit; unchanged files are already in the repository. Deploys a revision committed with rcs_commit; not for a first deploy or a fork redeploy (deploy_source: one build, no verdict). When the platform requires tests, it refuses a commit without a passing test_ref verdict; the repository's ferrite.json must name exactly this app (for a fork, the fork's name). Deploy a COMMITTED revision of the app's repository: the platform checks out
Params
app
instances
reference
spec_path
token
Runs a committed revision's #[test]s as its own 2-4 minute build. Run required tests against the exact committed revision before deploying it. TEST a COMMITTED revision (the platform's in-house test gate — no external CI): the platform checks out the app's repo at the ref (omit for the 'main' head), GATES + RUNS its tests (constrained test code against the platform's vetted test SDK), and stores a commit-bound verdict. When the platform requires tests, deploy_ref requires a passing verdict for t
Params
app
reference
token
Create a BRANCH (the branching model — a concurrent line on the SAME codebase, distinct from fork's physical independent copy): create 'branch' at 'from' (a branch name or commit id; omit for the 'main' head), so it starts from that snapshot and diverges as you rcs_commit onto it (branch=<name>) and deploy_ref it (reference=<name>). Returns {RcsCommitted:{app,branch,commit}}.
Params
app
branch
from
token
List the app repository's branches (name + tip commit). Returns {RcsBranches:{app,branches:[[name,tip]]}}.
Params
app
token
Merge the 'from' branch's tip into 'into' (three-way; reconcile a branch back, e.g. an experiment into main). On a content conflict the diverged paths are returned and NO commit is made. Returns {RcsMerged:{app,into,commit,status,conflicts}}.
Params
app
from
into
token
LAND a branch onto a protected trunk through the merge-result GATE (the trunk gate / branch protection): admitted ONLY if 'from' DESCENDS from the current 'into' tip (so the commit that was tested IS the commit that lands — the merge-queue insight; a stale branch behind the trunk is refused with status 'stale' — re-integrate via rcs_merge then re-test) AND, when the platform requires tests, 'from's tip carries a PASSING verdict (test_ref it first). A version-guarded fast-forward, so concurrent l
Params
app
from
into
token
Cut an IMMUTABLE release name for a committed revision (a reproducible snapshot). 'reference' is a branch name or commit id (omit for the 'main' head). When the platform requires tests, the commit must carry a PASSING verdict (a release is a tested snapshot). Returns {Released:{app,release,commit}}, {AlreadyReleased}, or {Rejected}.
Params
app
reference
release
token
Deploy a cut RELEASE to an ENVIRONMENT (env: prod | staging | canary | any [a-z0-9-]). 'prod' deploys the app's canonical id; another env deploys a derived '{app}-{env}' with its OWN subdomain, record, and instances (so staging and prod run side by side). The platform runs it AND advances the environment's audit log. It runs as a durable operation (the attested build, the deploy, then the environment's pointer as its LAST step), so a large application's gates never hold the call: it returns Buil
Params
app
env
instances
release
token
Promote the release 'from_env' names into 'to_env' (e.g. staging -> prod), once it has landed in 'from_env'. Until then it is refused by a first word: RELEASE_ON_TRIAL, RELEASE_MOVED and RELEASE_UNREAD ask you to promote again, and RELEASE_FAILED, RELEASE_NOT_RUNNING and RELEASE_GONE need a deploy first. Returns BuildStarted{build_id}; poll build_status as for deploy_release.
Params
app
from_env
instances
to_env
token
Roll an ENVIRONMENT to a specified prior RELEASE (forward-moving; the audit log records it, never rewritten). Returns BuildStarted{build_id}; poll build_status as for deploy_release.
Params
app
env
instances
to_release
token
List the app's IMMUTABLE releases (name + commit). Returns {Releases:{app,releases:[{name,commit}]}}.
Params
app
token
List the app's ENVIRONMENT pointers (each env -> its current release + the last deploy event). Returns {Environments:{app,environments:[{env,release,commit,at_ms,by}]}}.
Params
app
token
Read one ENVIRONMENT's deploy history (newest first — the audit trail of what release ran, when, and by whom). Returns {DeployLog:{app,env,events:[{release,commit,at_ms,by}]}}.
Params
app
env
token
Deploy a COMMITTED revision as an UNGATED, throwaway PREVIEW on its OWN subdomain (a validation copy, safe by isolation: NOT test-gated, NEVER charged, NEVER a permanent name claim; authorized by owning the base app). Auto-expires (TTL) and is swept. Preview un-green code on purpose before you cut a release. ASYNCHRONOUS: it compiles your source, which takes minutes. Returns {BuildStarted:{build_id,app}}; poll `build_status`, which answers {PreviewDeployed:{app,preview_app,host,expires_at_ms,com
Params
app
instances
reference
token
DELETE a preview explicitly - previews are part of the testing lifecycle, NOT permanent artifacts: the base-app OWNER tears a preview down IMMEDIATELY, without waiting for its TTL sweep. `preview_app` is the id returned by preview_ref ({owner}/{base}-preview-{short}). Authorized by owning the base app (a foreign-namespace id is refused); idempotent (deleting an already-gone preview succeeds); the TTL sweep composes (a deleted preview is skipped). Returns {PreviewDeleted:{preview_app}}.
Params
preview_app
token
PRE-DEPLOY COST + CAPS ESTIMATE (the try-before-you-buy surface — charges nothing, deploys nothing): validates the spec exactly as a deploy would and reports what a deploy WOULD charge now (the deploy fee), your balance + tier, the per-app instance count + per-instance compute bound that WILL apply (ephemeral tier: clamped to 1 instance and 256 MiB / 50% CPU per instance, enforced as a cgroup bound; durable tier: your spec's compute, or the platform default when undeclared), your tier's caps (so
Params
instances
spec
token
Set one per-app SECRET (confidential config: an API key, token, or connection string). The value is stored ENCRYPTED at rest and injected DECRYPTED into your app at deploy — the app reads it via ctx.secret("<name>") (NEVER an env var; the code gate bars std::env). Owner-gated; the value is write-only (never returned by the API). Bounds: name [A-Za-z0-9_.-] <=64, value <=64 KiB, <=64 secrets per app. Returns {SecretSet:{app,name}}.
Params
app
name
token
value
List an owned app's secret NAMES only (values are never returned by the management API — they only reach the app by deploy-time injection). Returns {Secrets:{app,names}}.
Params
app
token
Delete one owned app secret by name (idempotent — deleting a missing name succeeds). The app stops receiving it on its next deploy. Returns {SecretDeleted:{app,name}}.
Params
app
name
token
Retry a PARKED app: one whose instances crash-looped, so its rollout was paused and further deploys answer ParkedMutationRefused. Fix the cause first, then call this: the app is re-admitted against your account's current balance and quotas and its rollout resumes. Returns {ParkRetryStarted:{app,generation}}; {ParkRetryBlocked:{app,resource,requested,cap,retry_after_ms}} when an account quota cannot cover it; {ParkedMutationRefused:{app,phase,retry_after_ms}} while the park is still settling (cal
Params
app
token
Read your BILLING STATEMENT (spend observability): current balance, lifetime charged + funded totals, and recent reason-tagged ledger lines (deploy fees, occupancy metering, gateway usage). Anchor: 1,000,000 micros = $1.00. Returns {Statement:{account,balance_micros,total_charged_micros,total_funded_micros,lines:[{at_ms,kind,micros,reason,balance_after}]}}.
Params
token
Read an OWNED app's USAGE + TELEMETRY (the tenant observability surface): total + error request counts, bytes served, average + peak served latency (ms), the per-request credit spent, and the observation window — folded live from the gateway's per-response usage events. Returns {Usage:{app,requests,errors,bytes,avg_latency_ms,max_latency_ms,charged_micros,first_ms,last_ms}}.
Params
app
token
Read your NOTIFICATION FEED — the platform's durable, account-scoped 'your production changed state' events: a payment credited, your apps SUSPENDED because occupancy charges exhausted the balance, a deploy REFUSED for insufficient funds. This is how you find out something happened to your production that you did not initiate. Check it when something seems off, after funding, and periodically while you run production. Oldest first; 'limit' returns the newest N (default 50; 0 = all retained). Ret
Params
limit
token
PUSH: register a signed-webhook RECEIVER for your notification feed, so the platform TELLS you when your production changes state instead of you polling. `url` must be https. The platform returns a shared `secret_hex` ONCE (it is sealed at rest afterwards): every delivery POSTs {"signature":"t=<unix>,v1=<hmac-sha256>","payload":"<the event JSON, verbatim>"}, where the HMAC is over "{t}.{payload}" with that secret — the SAME scheme Stripe uses (and that this platform verifies on inbound provider
Params
secret_hex
token
url
Read your push channel's state (never the secret — that is returned once, at set time): the receiver URL, how many events were delivered, the current failure streak, and the last receiver status/error — so a BROKEN receiver is visible to you. Returns {NotifyChannelStatus:{url,delivered,failures,last_status,last_error,cursor_ms}}.
Params
token
Delete your push channel (idempotent). The durable notification FEED is untouched — `notifications` still reads every event. Returns {NotifyChannelDeleted}.
Params
token
TEAM / RBAC: add or update a MEMBER's role in an org (the org is normally your own account id). role is admin|deployer|viewer (Admin manages members + billing + deploys; Deployer deploys + reads; Viewer reads). The actor must be an Admin of the org. Returns {MemberSet:{org,member,role}}.
Params
member
org
role
token
TEAM / RBAC: remove a MEMBER from an org (the actor must be an Admin; the org root cannot be removed). Returns {MemberRemoved:{org,member}}.
Params
member
org
token
TEAM / RBAC: list an org's ACTIVE members + roles (the actor must be the org owner or a current member). Returns {Members:{org,members:[[member,role]]}}.
Params
org
token
A single-use link, valid for 24 hours, for the person to sign in to Ferrite with Google or GitHub and take this account as theirs; it works on a trial connection too. Offer it when they mention an existing Ferrite account, want to keep this work, or want to use it from another device. On a trial the page offers Keep this as my account (a permanent account of their own with the same apps, links and data) or Move it into the account they already have, and this connection follows. Give them only `u
Params
token
Whether this account has a human owner, and who. An owned account needs no claim link: the person's other agents join it by signing in to Ferrite when they connect.
Params
token
Prepare a ROTATION of your bearer token: answers a NEW token that works only after you confirm it with confirm_token (within 15 minutes); your current token keeps working until then. STORE the new token before confirming -- confirm_token, called with the new token as your bearer, retires the old one.
Params
token
Confirm a prepared rotation: present the NEW token from rotate_token as your bearer -- the Authorization header, or the token argument on a connection that sends no header (beside a header still carrying the old token it is refused as a conflict). It becomes live and the token it replaces stops working. Safe to repeat.
Params
token
Revoke EVERY other credential of your account except the one you present, and cancel pending rotations -- containment when a token may have leaked. A human owner's recovery in flight is kept.
Params
token
Read your account's CREDENTIALS -- the view containment and recovery act on: whether a human owner is linked (never their email), every live credential (the first 8 characters of its digest, never a token; its origin; when it was issued; `presented` for the one you sent), the pending ones (a prepared rotation, an owner's replace in flight), and the recent credential-change notice (the last 16 changes; `lowest_retained_generation` tells a truncated notice from a complete one). Returns {Credential
Params
token
Return the authenticated account's explicit HUMAN commerce URLs: `dashboard_url` for its owner and `topup_url` for Stripe-hosted card payment. This tool moves no money and never handles card data; present the URL to the human. Call `owner_status` first when the account is unclaimed. Returns {BillingPortal:{account,dashboard_url,topup_url,note}}.
Params
token
RESUME a PARKED application: the platform parks an app that crash-loops or whose account ran out of credit (`status` shows `park_phase` and `park_retry_after_ms`). This retries it now through fresh account admission instead of waiting for the automatic retry. Answers {ParkRetryStarted:{app,generation}} when the app is placed again (follow it with `status`), {ParkRetryBlocked:{app,resource,requested,cap,retry_after_ms}} when admission still refuses it (add credit through `billing_portal` or lower
Params
app
token
Commit a single text or binary file into an owned app's hosted source repository using MCP file transfer (inline base64 up to 1 MiB, or out-of-band upload up to 16 MiB). Returns {RcsCommitted:{app,branch,commit}}.
Params
app
branch
file
message
path
token