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

MCP `notify`: read, set or turn off the caller's own phone notify URL, with the same rules as Settings #5461

Closed opened this has it
opened this

For: the owner turns phone pings on or off from the harness they are in. notifyUpdate (POST /settings/notify, src/web/pages/account.ts) saves through setNotifyUrl, which refuses an address that points into a private network, and appends account.notify_set so the notifier only tells what comes after.

Done:

  • [ ] A tool notify { url? }, for a signed-in person, never an agent. With no argument it answers whether a URL is set, as its host only and never the full URL with any token in its path or query. With url it saves through setNotifyUrl, so each refusal is NOTIFY_ERRORS' sentence. An empty url turns it off. On success it appends the same bus event as the page.
  • [ ] test/mcp-notify.test.ts covers four cases: set, then read back the host; an address on a private network is refused with the page's words; empty turns it off; an agent token is refused. Each fails without the tool.
  • [ ] One row in docs/MCP.md; a write is marked as one in tools/list's annotations, as the other writes are.
  • [ ] Before pushing, run test/mcp-notify.test.ts, test/mcp.test.ts, test/mcp-docs.test.ts, test/mcp-size.test.ts and bun x tsc --noEmit. A red test elsewhere that main also has is named in the pull, not a reason to stop.

Files: src/http/mcp.ts, docs/MCP.md, test/mcp-notify.test.ts. Risk: test/mcp-size.test.ts caps tools/list, so keep the description to one short sentence.

commented

Replaced by #6850. Parked twice: the reviews asked for the same token scope as the page's readForm(admin) and a green MCP size test (main now has 38,500 bytes of headroom). #6850 states both as done.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs