Public: anyone can read this; the crew can change it.
An agent can open a deal, add a date, add a party and reopen a date over MCP, like on the page #14
Check · Review · Land · Live done — Landed and live in production.
Over POST /mcp, an agent can now open a deal, add a date, add a party and reopen a date, the same as on the page. src/server.test.ts passes (21 tests). I ran only that file, not the whole suite, and I did not run bun x tsc --noEmit: the repo has no tsconfig.json, so tsc just printed its help.
shipped production is serving it deploy d2eada7
Over POST /mcp, an agent can now open a deal, add a date, add a party and reopen a date, the same as on the page. src/server.test.ts passes (21 tests). I ran only that file, not the whole suite, and I did not run bun x tsc --noEmit: the repo has no tsconfig.json, so tsc just printed its help. scripts/gate.ts and scripts/fast.ts don't exist, and I didn't run scripts/design-lint.ts because nothing in src/web/ changed.
What changed
open_dealtakes address, buyer, seller,contract_dateandclosing_date. It also takes optionalinspection,appraisal,financing,titleandwalkthroughlengths andbusiness_days. It callscreateDeal.add_datetakesdeal_id,label,due,owesand optionaldetails. It callsaddDeadline.add_partytakesdeal_id,role,nameand optionalcontact. It callsaddParty.- Reopening needed no new tool.
mark_donealready accepteddone: false, so the new test now covers that path too. - Errors: the tools hold no rules of their own. Every call goes through the action, so a refused or invalid call comes back as the action's named failure with
isError, and an anonymous call is refused as on the page. - Tests: a new test in
src/server.test.tscalls each tool as anon (refused), as a user with invalid input (refused with the action's message), and as a user with valid input. It reads each result back withget_deal, including closing and reopening a date. The tool-list assertion now names the three new tools. - README: the MCP tool list names the new tools and says
mark_donereopens a date withdone: false.
Not done: no reopen_date tool, since mark_done covers it, and no policy cell touched.
Rate limit: every POST counts against the caller's write bucket (20 burst), MCP reads included. The new test uses its own signed-in user so it doesn't drain alice's bucket and break the other tests.
To try it: claude mcp add --transport http deal-clock https://<app>/mcp, then call open_deal as a signed-in user.
🤖 Generated with Claude Code
Clean. The three new MCP tools delegate to createDeal, addDeadline and addParty, which ask permit and validate, so there is no hand-rolled role check and no cell in contract.json changes. The README names the tools. The test covers anon refusal, invalid input and the valid path, and reads each result back, including closing and reopening a date. The terminal already does all of this. Nit, not blocking: the open_deal argument mapping repeats newDeal in routes.ts.
Over
POST /mcp, an agent can now open a deal, add a date, add a party and reopen a date, the same as on the page.src/server.test.tspasses (21 tests). I ran only that file, not the whole suite, and I did not runbun x tsc --noEmit: the repo has notsconfig.json, so tsc just printed its help.scripts/gate.tsandscripts/fast.tsdon't exist, and I didn't runscripts/design-lint.tsbecause nothing insrc/web/changed.What changed
open_dealtakes address, buyer, seller,contract_dateandclosing_date. It also takes optionalinspection,appraisal,financing,titleandwalkthroughlengths andbusiness_days. It callscreateDeal.add_datetakesdeal_id,label,due,owesand optionaldetails. It callsaddDeadline.add_partytakesdeal_id,role,nameand optionalcontact. It callsaddParty.mark_donealready accepteddone: false, so the new test now covers that path too.isError, and an anonymous call is refused as on the page.src/server.test.tscalls each tool as anon (refused), as a user with invalid input (refused with the action's message), and as a user with valid input. It reads each result back withget_deal, including closing and reopening a date. The tool-list assertion now names the three new tools.mark_donereopens a date withdone: false.Not done: no
reopen_datetool, sincemark_donecovers it, and no policy cell touched.Rate limit: every POST counts against the caller's write bucket (20 burst), MCP reads included. The new test uses its own signed-in user so it doesn't drain alice's bucket and break the other tests.
To try it:
claude mcp add --transport http deal-clock https://<app>/mcp, then callopen_dealas a signed-in user.🤖 Generated with Claude Code
Closes #6