Public: anyone can read this; the crew can change it.
MCP reads the rows a fleet query line selects #10153
Check · Review · Land · Live done — Landed and live in production.
MCP can now preview a fleet query line: the `flow` tool takes `{ q, sort? }` and answers `{ kind, columns, items }`. It reads through `viewFleet`, the same function `/fleet` and `GET /api/v1/fleet/rows` use. I did not run the full suite or `bun scripts/design-lint.ts` (the change doesn't touch `src/web/`). `test/mcp-fleet-rows.test.ts`, `test/mcp-size.test.ts`, `test/mcp-flow-bugs.test.ts`, `test/…
shipped production is serving it deploy 432b99c
MCP can now preview a fleet query line: the flow tool takes { q, sort? } and answers { kind, columns, items }. It reads through viewFleet, the same function /fleet and GET /api/v1/fleet/rows use. I did not run the full suite or bun scripts/design-lint.ts (the change doesn't touch src/web/). test/mcp-fleet-rows.test.ts, test/mcp-size.test.ts, test/mcp-flow-bugs.test.ts, test/mcp-flow-why.test.ts, bun x tsc --noEmit and bun scripts/gate.ts pass.
- Tool choice: no existing tool took fleet lines, so I put the action on
flowrather than adding a tool. The ceilings are untouched.flow's one-linedescriptionwas already near its 120-byte limit, so I shortened it. The fuller wording, which names/fleet, is in itsdoc. - Refusals: a bad line returns its parse reason, for example "cost wants a number". An unknown
sort, an emptyqand aqover 500 characters are refused too. - Visibility: rows are only those the token's user may read. A user who can't read private repositories gets public ones only.
- Test: the new test calls
flowwithqandGET /fleetas the same user, on one line (repo owner:alice). Both show only the public repository, while an admin's MCP call also gets the private one. It also covers the refusals. - Docs:
docs/features/fleet.mdnow lists the MCP door. I did not touchdocs/MCP.md, so its "Room for a new tool" section doesn't mention this door.
To try it, call the flow tool with { "q": "run state:queued,running cost:>0.5", "sort": "-cost" }.
The deploy log you pasted shows no failure, and I found nothing to fix, so I pushed nothing new. The log says ready, serving and done. The preview answers 200 on / and on /fleet?q=repo. "No tests declared, none run" only means forge.json names no test command for the preview deploy. It isn't an error.
The tests I ran before pushing all passed: bun test on the flow and MCP-size files, bun x tsc --noEmit and bun scripts/gate.ts. If the forge marked the pull red for some other reason, such as the check on the push, send me that log. I couldn't see a failing check from here.
Commit 00d34c6e is the pushed head, and the tree is clean.
The MCP flow tool now accepts q, a fleet query line, and returns the rows that line selects. I pushed a new empty commit to fix the gate failure, whose message carries the required Try: line. No code changed, and I did not re-run the gate, type check or tests here. The forge's check will run them on this push.
To try it on the preview, call the MCP flow tool with q set to a fleet query line. Then compare its rows with /fleet?q= on the same preview.
Clean. flow with { q, sort? } goes through viewFleet with the caller as viewer, so row visibility and the 500-row cap are the same as /fleet. q and sort are validated at the boundary, and a bad line answers its parse reason. The test covers a non-admin and an admin, plus the refusals. The fleet doc lists the MCP door. No new dependency, no dead code. Residual nit, not blocking: the test compares /fleet by substring rather than by the full row set.
MCP can now preview a fleet query line: the
flowtool takes{ q, sort? }and answers{ kind, columns, items }. It reads throughviewFleet, the same function/fleetandGET /api/v1/fleet/rowsuse. I did not run the full suite orbun scripts/design-lint.ts(the change doesn't touchsrc/web/).test/mcp-fleet-rows.test.ts,test/mcp-size.test.ts,test/mcp-flow-bugs.test.ts,test/mcp-flow-why.test.ts,bun x tsc --noEmitandbun scripts/gate.tspass.flowrather than adding a tool. The ceilings are untouched.flow's one-linedescriptionwas already near its 120-byte limit, so I shortened it. The fuller wording, which names/fleet, is in itsdoc.sort, an emptyqand aqover 500 characters are refused too.flowwithqandGET /fleetas the same user, on one line (repo owner:alice). Both show only the public repository, while an admin's MCP call also gets the private one. It also covers the refusals.docs/features/fleet.mdnow lists the MCP door. I did not touchdocs/MCP.md, so its "Room for a new tool" section doesn't mention this door.To try it, call the
flowtool with{ "q": "run state:queued,running cost:>0.5", "sort": "-cost" }.Closes #10132