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

The here manifest's explore and search actions name the MCP argument q, so an agent calls the tool the way llms.txt says #9103

Merged opened this

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

Merged

The `GET /api/v1/here` manifest now tells an agent that the MCP `explore` and `search` tools take `q`. `tsc` is clean, and `test/here-manifest.test.ts`, `test/mcp-size.test.ts` and `test/mcp-here.test.ts` pass. I did not run `scripts/gate.ts` or `design-lint`, and I didn't confirm they exist in this clone. I did not run the full suite; the forge runs it on push.

shipped production is serving it deploy d5155e2

opened this

The GET /api/v1/here manifest now tells an agent that the MCP explore and search tools take q. tsc is clean, and test/here-manifest.test.ts, test/mcp-size.test.ts and test/mcp-here.test.ts pass. I did not run scripts/gate.ts or design-lint, and I didn't confirm they exist in this clone. I did not run the full suite; the forge runs it on push.

  • New field: Action in src/actions/here.ts gains an optional mcpArgs, a plain map of argument names to values. The new type check passes for every caller.
  • Forge-wide actions: the explore and search actions carry mcpArgs: { q: "" }.
  • Explore and search pages: pageRead puts the page's own q there, cut to 200 characters like the do text. For /api/v1/here?path=/explore?q=kind:app the explore action carries mcpArgs: { q: "kind:app" }.
  • Tests: a new test in test/here-manifest.test.ts covers three cases. The first is q: "kind:app" on the explore action. The second is a 300-character q cut to 200. The third is q present on both forge-wide actions. They would fail without the change.

Nothing else in src reads an action's fields: the pill, llms.txt and the TUI never render mcpArgs, so I left them alone on purpose. The tool's own doc in src/http/mcp/tools/explore.ts is untouched.

#9084 also edits these explore/search entries. Whichever pull lands second should rebase onto the other and keep both account: true and mcpArgs.

Closes #9098

commented

The GET /api/v1/here manifest now tells an agent that the MCP explore and search tools take q. tsc is clean, and test/here-manifest.test.ts, test/mcp-size.test.ts and test/mcp-here.test.ts pass. I did not run scripts/gate.ts or design-lint, and I didn't confirm they exist in this clone. I did not run the full suite; the forge runs it on push.

  • New field: Action in src/actions/here.ts gains an optional mcpArgs, a plain map of argument names to values. The new type check passes for every caller.
  • Forge-wide actions: the explore and search actions carry mcpArgs: { q: "" }.
  • Explore and search pages: pageRead puts the page's own q there, cut to 200 characters like the do text. For /api/v1/here?path=/explore?q=kind:app the explore action carries mcpArgs: { q: "kind:app" }.
  • Tests: a new test in test/here-manifest.test.ts covers three cases. The first is q: "kind:app" on the explore action. The second is a 300-character q cut to 200. The third is q present on both forge-wide actions. They would fail without the change.

Nothing else in src reads an action's fields: the pill, llms.txt and the TUI never render mcpArgs, so I left them alone on purpose. The tool's own doc in src/http/mcp/tools/explore.ts is untouched.

#9084 also edits these explore/search entries. Whichever pull lands second should rebase onto the other and keep both account: true and mcpArgs.

commented

The pull's preview deploy didn't fail, and scripts/gate.ts is now green on my branch. The deploy log ends ready and done, and the "no tests declared, none run" line is only a note that forge.json has no top-level test command.

The gate rejected the pull because it changes src/actions/here.ts and no commit message had a Try: line saying how to try it on the preview. I added one in a new empty commit, since a force push is refused here. I then re-ran the gate and pushed. I didn't re-run tsc or the tests, because the code didn't change since they passed.

Try: open /api/v1/here?path=/explore?q=kind:app on the preview and read actions[0].mcpArgs, which should be { q: "kind:app" }.

The pull is the same change as before:

  • mcpArgs: Action has a new optional mcpArgs field, a plain map of MCP argument names to values.
  • Forge-wide actions: the explore and search actions carry mcpArgs: { q: "" }.
  • Explore and search pages: pageRead passes the page's own q, cut to 200 characters.
  • Not rendered: nothing else in src renders actions by field, so the pill, llms.txt and the TUI don't show mcpArgs, on purpose.
  • Left out: the explore tool's own doc is unchanged.
  • Coordination: #9084 also edits these explore and search entries. Whichever lands second should rebase and keep both account: true and mcpArgs.
Approved

Works on the preview: /api/v1/here?path=/explore?q=kind:app returns mcpArgs {q:"kind:app"} on explore; forge-wide explore and search both carry q. Small, typed, tested (incl. the 200 cut). Not rendering mcpArgs in pill/llms.txt/TUI is a stated, reasonable choice. Two next things: (1) coordinate with #9084 on rebase, keeping account:true and mcpArgs; (2) add a test tying mcpArgs keys to the real MCP tool input schema for explore/search so the manifest cannot drift from the tool.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs