Skip to content

CLI: review builds without MCP (sc-8782) - #13

Merged
ndbroadbent merged 1 commit into
mainfrom
cli-review
Dec 2, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
cli-review

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

sc-8782. Agents without VisualCI's MCP server connected (a CI job, a session started before the server was added, a harness without MCP) can now review a build from the CLI.

  • visualci build list [--waiting] [--branch B] [--limit N]
  • visualci build show <build> [--all] [--offset N] [--limit N]
  • visualci build snapshot <build> <name> [--crop changed] [--images all|diff|head|base|none] [--pages 1,2] [--against previous] [--save-images DIR]
  • visualci build review <build> approve|reject [--only added|changed] [--snapshot NAME]... [--comment TEXT]

How: each command calls the MCP server's tool of the same job (list_builds, get_build, get_snapshot, review) with the CLI's token (VISUALCI_TOKEN, --token or visualci login's), one stateless tools/call POST. The output is what an agent reads over MCP, and the server needs no new endpoints. The MCP URL comes from the API URL (api. becomes mcp., other hosts use their own /mcp), or from $VISUALCI_MCP_URL. A personal token sends the project (--project, $VISUALCI_PROJECT or visualci.yml). The output is text with JSON indented, or the whole result with --json. --save-images writes each image as 02-page-2-changed-diff.png. A refused call exits 1.

These live under build because visualci snapshot already adds a file to a build. The story's visualci builds and visualci review became build list and build review.

Verified: on docspring-dev against the seeded dev server, with a personal token:

  • build list --waiting lists the demo build;
  • build show 3 gives get_build's answer;
  • build snapshot 3 receipt.pdf --crop changed --save-images saved 4 cropped PNGs;
  • build review 999 approve prints "no build 999 in this project" and exits 1.

Unit tests cover the MCP URL, image names and saving, and the JSON indenting.

CLI 0.2.9. Once it's released, a follow-up PR pins the docs to 0.2.9 and documents the commands (CLI reference, plus "over MCP if it's connected, otherwise these commands" on the agents page and in install.md).

Review: no screenshots change.

…mages) and build review call the MCP server's list_builds, get_build, get_snapshot and review with the CLI's token, for agents without MCP
@visualci-com

visualci-com Bot commented Dec 2, 2026

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #95 · 290 unchanged · no changes

This PR vs base: nothing since #93, across 1 build

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent merged commit e72fef5 into main Dec 2, 2026
10 checks passed
@ndbroadbent
ndbroadbent deleted the cli-review branch December 2, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant