chadtmiller.com/monolith
An atproto PDS
pds xrpc makes any call; MCP tools' titles and hints say what they do
MergedThis adds pds xrpc, gives every MCP tool a title, and sets readOnlyHint and destructiveHint by what each method does. getServiceAuth and getDelegationToken are no longer read-only. I read all 17 files. Spec, code, harness and guides agree. The additive list in pds-lexicon matches the one in spec/COMMANDS.md, and the harness reads its expectations from the spec section, so the two can't drift apart unnoticed. The pds xrpc parser follows the spec. I did not run anything. The checks are the ones you named.
Two things are worth fixing, neither blocking:
activateAccount. The spec lists it as only adding, but the same section calls any procedure that changes an account's "status" destructive. It contradicts itself; I'd move it to destructive.confirmEmailis arguable for the same reason.- Harness string bodies. A body string that starts with
=becomes a==query parameter, so the harness would send the wrong request and report a false diff.
The spec also calls a header name or value HTTP can't carry a usage error. Only the Rust unit test covers that, and the harness's usage-error list doesn't. Adding one case there would make the check match the spec.
harness/lib/via.mjsline 521
} | |
for (const [k, v] of entries) { | |
if (inFile.some(([f]) => f === k)) continue | |
props.push(typeof v === 'string' && !v.includes('\0') && chance(0.7) ? `${k}=${v}` : `${k}:=${JSON.stringify(v)}`) |
${k}=${v} with a v that starts with = gives k==…, which pds xrpc reads as a query parameter, not a string property. Send such a value as k:=json (or in the file) so the check can't report a false diff.
spec/COMMANDS.mdline 199
it only adds: `com.atproto.server.createAccount`, `createSession`, | |
`createAppPassword`, `createInviteCode`, `createInviteCodes`, | |
`requestEmailConfirmation`, `confirmEmail`, `requestEmailUpdate`, | |
`requestPasswordReset`, `requestAccountDelete`, `activateAccount`; |
activateAccount is listed as only adding, but the next lines make any procedure that changes an account's status destructive. Pick one; moving it to destructive fits that rule. The same goes for ADDITIVE in pds-lexicon.
The only change since my approval at 1e50243 is a rewording in spec/STORE.md, in the "first request to a cold account" bullet. It used to promise the 1-second bound however many accounts' first requests came at once. It now keeps that bound for one account's first request and the 6 MiB read bound. For many accounts at once it says only that they share the server's processors and take what that work costs. This doesn't touch the pds xrpc, titles or hints work I approved. I did not check whether the wording came in with a merge of the base. If it is the pull's own, it belongs in a separate change. My earlier notes on activateAccount and harness string bodies still stand. Neither was blocking, and I'm not asking for them again.
pds xrpcmakes any call by name, with goat's arguments. Every MCP tool now has atitle, and its read-only and destructive hints come from what the method does, sogetServiceAuth, which signs a token, is no longer marked read-only.Claude Opus 5.5 · high
What changes
The spec. In
spec/COMMANDS.md:pds xrpc <query|procedure> <name> [args]. It takesgoat xrpc's HTTPie-style arguments (k==v,k=v,k:=json,Name:value,-,@path), callsPDS_URLwith the CLI's usual auth, fills nothing in, and checks nothing against a lexicon. Its usage errors exit 2, and its answers are the same as other commands'.title: the method's name in words, then its group, asCreate record (repo). It also reserves the groupxrpc.readOnlyHintanddestructiveHintby what each method does:getServiceAuthandspace.getDelegationToken) are not read-only.deleteRecord,putRecordandapplyWriteswere marked destructive, and every query was marked read-only.docs/guide/calling.mdshows both changes.The harness. With
--commands, some requests now go throughpds xrpc, sending their arguments in each form the request allows.tools/listis held to every tool's title and hints, in all three MCP versions.pds xrpcon the server's own routes and on a forwarded method must answer as XRPC does, and each usage error must exit 2 without a request reaching the server.The server. The
xrpccommand is inpds-cli. Titles and hints come frompds-lexiconand are listed by NSID.Why
We compared the designs that large schema-described APIs use for their CLIs and MCP servers:
gh,goat,stripe,az,kubectl,oci) keeps its typed commands and adds a generic call next to them. We keep the generated commands and add the generic call.getServiceAuth, a query, was marked read-only.How it was checked
Run here:
--commands --steps 400 --seed 31passed. 18 of its requests went throughpds xrpc, along with the routes, forwarding, bodies and usage-error checks.Two planted bugs, each caught at step 0 of a
--commandsrun and then removed:getServiceAuthtaken off the list of token-signing queries madetools/listfail, becausereadOnlyHintwastrue.-allowed on a query made the usage-error check fail, because the command exited 0 and sent a request.just quickpassed here. The gates are thegatesworkflow's, on this pull.The spaces pages (
SPACES-CREDENTIALS.md,SPACES-SYNC.md) said their tools were not destructive. They now defer to "Hints", sonotifyCredentialRevokedandunregisterNotifyare destructive.Shortcomings
pds xrpcchecks nothing before sending, as goat's command doesn't, so a bad argument costs one round trip.openWorldHintandidempotentHintare still not set.Review
Start with "Hints" in
spec/COMMANDS.md; the list of additive procedures is a judgment call.