Public: anyone can read this; the crew can change it.
MCP `backups`: where snapshots go and the last ones taken, for a forge admin #5425
I added a read-only MCP tool backups that takes no arguments, is admin-only, and answers from the same functions the /settings/backups page uses. The four tests you named pass and the type check is clean. I didn't run the rest of the suite.
stopped parked by the crew deploy d49281c
I added a read-only MCP tool backups that takes no arguments, is admin-only, and answers from the same functions the /settings/backups page uses. The four tests you named pass and the type check is clean. I didn't run the rest of the suite.
What it returns
- Destination:
destinationis{ kind: sealed | dir | env, where }, and never a credential. With no destination it isnull, andsayscarries the page's sentence. I moved that sentence into an exportedNO_DESTINATIONinsrc/web/pages/backups.ts, so the page and the tool can't drift apart. - Snapshots: the newest fourteen from the store, each as
{ key, at, bytes }. If the store can't be listed,listingcarries the error rather than failing the call. - Mirror:
mirrorhasconfigured,where,reachable,syncedAt,newestandproblem, which is themirrorNeedsentence. - Non-admins: the tool isn't listed for them, and a direct call is refused with the page's 404 words.
Tests and docs
test/mcp-backups.test.tshas the three cases: no destination, a local destination with one snapshot, and a non-admin refused. The tool is also added to the expectedtools/listintest/mcp.test.ts.docs/MCP.mdhas one new row.
Size cap
- The tool itself fits, but
tools/listwas only 3 bytes under the 37,000 headroom intest/mcp-size.test.ts, so adding it put the list over. I shortened about a dozen other tool descriptions by a few words each, without changing what they say. I did not raise the ceiling. test/mcp.test.tsasserts on some description wording, so two phrases that test checks (the sign-up descriptions) are kept as they were.
Left out
- It doesn't report the last snapshot failure or the last restore drill, which the page shows. I kept to the destination, snapshots and mirror you listed.
To try it: as an admin, call the backups tool from any MCP client.
🤖 Generated with Claude Code
Parked by the crew: the check failed ("one list > an issue assigned to you is a row that says so, and every door counts it") and the decider saw no point in another try
I added a read-only MCP tool
backupsthat takes no arguments, is admin-only, and answers from the same functions the /settings/backups page uses. The four tests you named pass and the type check is clean. I didn't run the rest of the suite.What it returns
destinationis{ kind: sealed | dir | env, where }, and never a credential. With no destination it isnull, andsayscarries the page's sentence. I moved that sentence into an exportedNO_DESTINATIONinsrc/web/pages/backups.ts, so the page and the tool can't drift apart.{ key, at, bytes }. If the store can't be listed,listingcarries the error rather than failing the call.mirrorhasconfigured,where,reachable,syncedAt,newestandproblem, which is themirrorNeedsentence.Tests and docs
test/mcp-backups.test.tshas the three cases: no destination, a local destination with one snapshot, and a non-admin refused. The tool is also added to the expectedtools/listintest/mcp.test.ts.docs/MCP.mdhas one new row.Size cap
tools/listwas only 3 bytes under the 37,000 headroom intest/mcp-size.test.ts, so adding it put the list over. I shortened about a dozen other tool descriptions by a few words each, without changing what they say. I did not raise the ceiling.test/mcp.test.tsasserts on some description wording, so two phrases that test checks (the sign-up descriptions) are kept as they were.Left out
To try it: as an admin, call the
backupstool from any MCP client.🤖 Generated with Claude Code
Closes #5415