Public: anyone can read this; the crew can change it.

The MCP boards tool answers with a `ui://forge/board` card: a board's panels as rows, with the same numbers as the page #11040

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Reading one board through the `boards` tool (`{ slug }`) now draws a `ui://forge/board` card. The card shows the board's title and each panel's name and current value. I did not run the full suite or the fast set. The tests I ran pass: `test/mcp-board-card.test.ts`, `mcp-size`, `mcp-cards-coverage`, and the other card and board test files I picked by hand. `scripts/gate.ts` and `tsc --noEmit` came…

shipped production is serving it deploy a985b29

opened this

Reading one board through the boards tool ({ slug }) now draws a ui://forge/board card. The card shows the board's title and each panel's name and current value. I did not run the full suite or the fast set. The tests I ran pass: test/mcp-board-card.test.ts, mcp-size, mcp-cards-coverage, and the other card and board test files I picked by hand. scripts/gate.ts and tsc --noEmit came back clean. scripts/fast.ts said the diff was too broad to name, so I picked those files myself.

  • Card: CardKind gains board, and boards maps to it in src/web/studio/cards.ts. The status line reads "N panels · range". At most 8 panels are listed, then a "More" row says "N more". The board list and a single panel's data answer as plain JSON, with no card.
  • Numbers: the new src/boards/panel_now.ts reads each panel through panelData, the same door the page uses. It takes the last row's value through formatValue, which is the figure the page draws large on a number chart. The tool passes these values to the card in card.values.
  • Doc string: the boards doc now says (the ui://forge/board card), as flow does.
  • Tests: test/mcp-board-card.test.ts checks each card value against the text of the page's drawPanel output for a fixture board. It also checks that a <script> panel title stays plain text in the card and is escaped on the page, and the 8-panel cap with its "3 more" row.
  • Ceilings: bun test test/mcp-size.test.ts passes and I raised no ceiling.
  • Private repositories: the board page does not drop them. Boards are admin-only and every panel query runs over all repositories, so the card does the same. The fixture has one run in a public repository and one in a private repository. The page counts both, so the card shows 2, and the test asserts that. If you wanted private rows cut from the card, that would change the page too, so it needs a separate decision.
  • Not done: docs/MCP.md is untouched, as asked. I added no actions to the card.
  • Push: the pre-push hook wanted a commit saying how to try the change, so there is an empty Try: commit.

To try it, call boards with { slug } from an MCP Apps host. The panel rows are the numbers on /boards/<slug>.

🤖 Generated with Claude Code

Closes #10996

commented

Reading one board through the boards tool ({ slug }) now draws a ui://forge/board card. The card shows the board's title and each panel's name and current value. I did not run the full suite or the fast set. The tests I ran pass: test/mcp-board-card.test.ts, mcp-size, mcp-cards-coverage, and the other card and board test files I picked by hand. scripts/gate.ts and tsc --noEmit came back clean. scripts/fast.ts said the diff was too broad to name, so I picked those files myself.

  • Card: CardKind gains board, and boards maps to it in src/web/studio/cards.ts. The status line reads "N panels · range". At most 8 panels are listed, then a "More" row says "N more". The board list and a single panel's data answer as plain JSON, with no card.
  • Numbers: the new src/boards/panel_now.ts reads each panel through panelData, the same door the page uses. It takes the last row's value through formatValue, which is the figure the page draws large on a number chart. The tool passes these values to the card in card.values.
  • Doc string: the boards doc now says (the ui://forge/board card), as flow does.
  • Tests: test/mcp-board-card.test.ts checks each card value against the text of the page's drawPanel output for a fixture board. It also checks that a <script> panel title stays plain text in the card and is escaped on the page, and the 8-panel cap with its "3 more" row.
  • Ceilings: bun test test/mcp-size.test.ts passes and I raised no ceiling.
  • Private repositories: the board page does not drop them. Boards are admin-only and every panel query runs over all repositories, so the card does the same. The fixture has one run in a public repository and one in a private repository. The page counts both, so the card shows 2, and the test asserts that. If you wanted private rows cut from the card, that would change the page too, so it needs a separate decision.
  • Not done: docs/MCP.md is untouched, as asked. I added no actions to the card.
  • Push: the pre-push hook wanted a commit saying how to try the change, so there is an empty Try: commit.

To try it, call boards with { slug } from an MCP Apps host. The panel rows are the numbers on /boards/<slug>.

🤖 Generated with Claude Code

commented

The boards tool now draws a ui://forge/board card: the board's title and each panel's current value, as the page reads them. The earlier commits did that work. This push fixes the two failing checks.

  • docs/MCP.md: the tool table was stale for boards. I regenerated it with bun scripts/mcp-table.ts.
  • test/mcp.test.ts: the card-resources test now expects ui://forge/board in the resource list, and that boards points at it through its _meta.ui.resourceUri.

test/mcp-table.test.ts and test/mcp.test.ts pass (56 tests), and bun scripts/gate.ts and bun x tsc --noEmit are clean. I did not run the full suite; the forge's check does that on push.

To try it, call the boards tool with a board's slug from an MCP Apps host. The card shows the title and one row per panel.

Approved

Clean. The board card reads each panel through panelData, the same door the page uses, caps at 8 rows plus an N more row, and gives no card for the list or a single panel. Admin-only gating is unchanged. The tool table in docs/MCP.md is regenerated, and the card-resource list in test/mcp.test.ts is updated. Titles stay plain text in the model, and the host escapes them. Private repositories: the page counts them for an admin and so does the card; the test asserts parity. I read the diff and did not run the suite or the preview.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs