Repository navigation
feat: tag cost-confirmation errors and report caller-input errors as ToolCallerError - #543
Conversation
Coverage Report for CI Build 43246675000Warning No base build found for commit Coverage: 98.069%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
Rodriguespn
left a comment
There was a problem hiding this comment.
Left some inline comments. Also, the mgmt-api spec validation CI job is failing. Could you have the bot to generate one to get this test to pass please?
One nit comment: the comment at graphql.ts:133 ("Schema load failures are server faults, so they stay unbranded") no longer holds. loadSchema sends the server-built { schema } query through #query, so a pathless error there is now a ToolCallerError. Moving the branding into query() (the path that takes caller queries) would keep server-built queries unbranded. It has no metric impact today. Post it as a reply on comment 1 if you want it on record.
Rodriguespn
left a comment
There was a problem hiding this comment.
Approved with a nit comment. Some things to consider on the equivalent platform PR: narrow the confirmation_required JSDoc like the docs (util.ts:218, util.ts:235); add unknown tools to invalid_request (util.ts:240) and mcp-utils arg-parse failures to validation (util.ts:229).
The platform PR looked good to me. After those land, I'll do a final review over the platform PR. Thx!
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-utils: 0.10.0</summary> ## [0.10.0](mcp-utils-v0.9.0...mcp-utils-v0.10.0) (2026-11-13) ### Features * tag cost-confirmation errors and report caller-input errors as ToolCallerError ([#543](#543)) ([ac366c4](ac366c4)) </details> <details><summary>mcp-server-supabase: 0.17.0</summary> ## [0.17.0](mcp-server-supabase-v0.16.1...mcp-server-supabase-v0.17.0) (2026-11-13) ### ⚠ BREAKING CHANGES * **elicitation:** split confirmation and secret collection TTLs ([#538](#538)) ### Features * agent feedback capabilities including docs ([#488](#488)) ([698ccd5](698ccd5)) * **elicitation:** split confirmation and secret collection TTLs ([#538](#538)) ([8a08e48](8a08e48)) * tag cost-confirmation errors and report caller-input errors as ToolCallerError ([#543](#543)) ([ac366c4](ac366c4)) ### Bug Fixes * **content api:** report GraphQL errors that have no locations ([#528](#528)) ([6b2fca9](6b2fca9)) * **mcp:** confirm UPDATEs without WHERE that have a leading comment, ONLY or an alias ([#524](#524)) ([7df9fb8](7df9fb8)) * **mcp:** don't read semicolons or EXECUTE inside data literals as destructive SQL ([#533](#533)) ([0dcdd2d](0dcdd2d)) * tell agents the log window, project readiness, docs query and SQL size rules up front ([#542](#542)) ([23f0df0](23f0df0)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
What kind of change does this PR introduce?
Feature + bug fix.
What is the current behavior?
ToolCallerErroras a client error and any otherErroras a server error, so client mistakes thrown as plainError(log-window checks, invalidsearch_docsqueries) count as server errors.onToolCallhook runs, so hosted MCP logs them asunclassified.What is the new behavior?
ToolCallerErrorgets an optionalkind(newToolCallerErrorKindtype). A mismatchedconfirm_cost_idincreate_projectandcreate_branch, or a missing one when inline cost confirmation is configured, setskind: 'confirmation_required'.query_logs/get_logswindow checks throwToolCallerError.search_docsGraphQL errors throwToolCallerError(client error) only when the error has nopathand either haslocationsor is one of the Content API's GET-operation validation messages. Everything else, including the Content API's own outage response, stays a server error.onToolCallas aToolCallerError(theZodErroris itscause). The MCP client's result doesn't change.ToolCallerErrormoves to@supabase/mcp-utilsso the mcp-utils server can throw it.@supabase/mcp-server-supabasestill exports it with the same brand, soisToolCallerErrorkeeps matching.