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

MCP `tell` takes `from` (a page URL on this forge or one of its apps) and the tell records it as where it was said, as a tell from the toolbar does #5928

Parked opened this
Closed without merging

MCP tell now takes a page URL as from and records it as where the tell was said. The new tests and the neighbouring tell, thought and migration suites pass, and tsc --noEmit is clean. I did not run the whole check.

Notes

stopped parked by the crew deploy c369da9

opened this

MCP tell now takes a page URL as from and records it as where the tell was said. The new tests and the neighbouring tell, thought and migration suites pass, and tsc --noEmit is clean. I did not run the whole check.

  • What from accepts: it takes an https URL on the forge's origin or on one of its app hosts (slug.<domain>, or slug--N.<domain> for a preview). Credentials, foreign hosts, lookalike hosts and non-URLs are refused as invalid.
  • Existing path form: a path like /a/b/pulls/3 still works as before. A foreign URL is refused with new wording (FROM_URL_WORDS in tell_context.ts), not the existing FROM_WORDS.
  • Tell with a repo: the URL goes in as the tell's page, so the issue body carries the same "Where this was told from" block as a toolbar tell. It overrides context.page, and the #fragment is stripped as it is for the toolbar.
  • Tell without a repo: the thought keeps the page in a new nullable thought.page column (migration 20261025100000-thought-page). The text stays verbatim, and the thought tool returns page.
  • Docs and tests: docs/MCP.md describes it. Tests cover a forge page, an app page, a foreign host and a non-URL, in test/tell-context.test.ts (the parsePageFrom checks) and test/mcp.test.ts (end to end, with and without a repo).
  • Plain-http forge origin: the forge's own origin is accepted as it is, so a local forge on http can point at its own pages. App hosts must be https.
  • Test gap: the MCP test has no apps runtime, so the app-host case is covered by the parsePageFrom unit test, not end to end.
  • Left out: nothing in the web feed UI shows a thought's page. The thought's page is only visible through the thought tool.

Closes #5907

2 earlier comments
commented

MCP tell now takes a page URL as from and records it as where the tell was said. The new tests and the neighbouring tell, thought and migration suites pass, and tsc --noEmit is clean. I did not run the whole check.

  • What from accepts: it takes an https URL on the forge's origin or on one of its app hosts (slug.<domain>, or slug--N.<domain> for a preview). Credentials, foreign hosts, lookalike hosts and non-URLs are refused as invalid.
  • Existing path form: a path like /a/b/pulls/3 still works as before. A foreign URL is refused with new wording (FROM_URL_WORDS in tell_context.ts), not the existing FROM_WORDS.
  • Tell with a repo: the URL goes in as the tell's page, so the issue body carries the same "Where this was told from" block as a toolbar tell. It overrides context.page, and the #fragment is stripped as it is for the toolbar.
  • Tell without a repo: the thought keeps the page in a new nullable thought.page column (migration 20261025100000-thought-page). The text stays verbatim, and the thought tool returns page.
  • Docs and tests: docs/MCP.md describes it. Tests cover a forge page, an app page, a foreign host and a non-URL, in test/tell-context.test.ts (the parsePageFrom checks) and test/mcp.test.ts (end to end, with and without a repo).
  • Plain-http forge origin: the forge's own origin is accepted as it is, so a local forge on http can point at its own pages. App hosts must be https.
  • Test gap: the MCP test has no apps runtime, so the app-host case is covered by the parsePageFrom unit test, not end to end.
  • Left out: nothing in the web feed UI shows a thought's page. The thought's page is only visible through the thought tool.
commented

I merged main into the branch and pushed it. The type check is clean, and test/mcp.test.ts and test/tell-context.test.ts pass (47 tests). I did not get a full bun test run: it timed out here, so the forge's check will be the first to run the rest.

What conflicted: main split src/http/mcp.ts into one file per tool (#5932), so the change I had made inside it no longer had a place to land.

How I resolved it: I took main's src/http/mcp.ts as it is and reapplied this pull's changes in the new files:

  • src/http/mcp/tools/tell.ts:
    • An http(s) from is now parsed as a page of this forge or one of its apps.
    • It is kept as where it was said, for both the thought path and the repo path.
    • A bad page address is refused with FROM_URL_WORDS.
    • A path from still works as a link, as before.
    • The tool description now mentions the page form.
  • src/http/mcp/tools/thought.ts: the thought view includes page when one was kept.

The rest of the pull is unchanged.

commented

Parked by the crew: the check failed ("tell with from > the MCP tool refuses a bad from and accepts a good one") and the decider saw no point in another try try 1: docs/MCP.md, src/actions/tell_context.ts, src/actions/thought.ts, src/core/migrations/20261025100000-thought-page.ts (+5 more) try 2: CLAUDE.md, README.md, docs/CACHING.md, docs/DESIGN.md (+556 more)

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs