You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Charge the server actions the same budget the tools pay (#11)
Rate limiting only ever wrapped MCP tool calls. Every one of those tools has a
browser twin that calls the same service function and paid nothing, so the form
was the cheap way in: thirty POSTs to `draftSiteAction` is thirty page fetches,
thirty LLM calls and thirty VerifiedDR lookups against a monthly quota, where
`submit_site` stops at twenty an hour. `markLinkPlacedAction` is worse in kind
than in cost, since it crawls a URL the caller chose and an uncapped surface
that fetches on demand is a request proxy with our user agent on it.
The five actions now spend the budget of the tool they twin, under that tool's
name and keyed on `member:<id>`, which is the key `callerKey` already builds for
a signed-in caller. One allowance per member across both interfaces rather than
one each. A submit costs two either way: the tool path passes through `guard`
twice, once to draft and once to confirm.
`lib/mcp/limits.ts` moves to `lib/limits.ts`, since it now serves both
interfaces and the ESLint layering rule is about what MCP code may import, not
about who may import it. No budget changed.
0 commit comments