Skip to content

fix(mcp): clarify cost and deploy tool descriptions for OpenAI scanner - #467

Merged
barryroodt merged 3 commits into
mainfrom
barryroodt/ai-1303-tool-descriptions-for-openai-scanner
Oct 12, 2026
Merged

barryroodt merged 3 commits into
mainfrom
barryroodt/ai-1303-tool-descriptions-for-openai-scanner

Conversation

@barryroodt

@barryroodt barryroodt commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix, but it only changes tool descriptions.

What is the current behavior?

OpenAI's reworked plugin dashboard runs a new automatic scanner. It flagged 4 of our tools with "This tool update needs further review before it can go live" and gave no reason (thread).

The held update breaks Codex users, who can't create projects through the plugin. Codex validates against the old live schema, which requires confirm_cost_id, but our server leaves that field out for form-capable clients and rejects it (AI-1303, #466). Once OpenAI approves the held update, Codex's schema matches ours again.

The scanner gives no reason, so this is our read. The held change looks like a weaker cost safeguard explained in protocol jargon, and neither create tool says it makes a billed resource. confirm_cost says "Ask the user to confirm" but only hashes its input, which goes against OpenAI's descriptions-that-match-behavior guideline. deploy_edge_function never said a redeploy replaces the live function, and its verify_jwt text used SHOULD ALWAYS/ONLY instructions.

What is the new behavior?

This PR only changes descriptions. The schemas, required fields and annotations stay the same.

  • The create_project / create_branch descriptions now say the resource is billed and the user has to agree to the cost first.
  • confirm_cost_id uses one shared description from tools/confirmation.ts, without the elicitation jargon. It carries the get_cost → confirm_cost steps, so only clients that receive the field see them. Form-capable clients never get the field, and the create_* descriptions no longer mention the hidden cost tools.
  • confirm_cost now says it returns a confirmation ID for the quoted cost, and that it should only be called after the user explicitly agrees.
  • deploy_edge_function now says a deploy replaces the live function and serves it publicly right away. I rewrote verify_jwt as plain guidance and left openWorldHint: false on purpose.

How to Review

  1. Cost confirmation
    • packages/mcp-server-supabase/src/tools/confirmation.ts, account-tools.ts, branching-tools.ts
    • Check that the create tool and confirm_cost descriptions match what the code does.
  2. Edge functions
    • packages/mcp-server-supabase/src/tools/edge-function-tools.ts

Review questions

  • Is openWorldHint: false still right for deploy_edge_function?

Verification

I dumped tools/list before and after for three client shapes: no elicitation, elicitation configured with a client that doesn't support forms (what the scanner sees), and a form-capable client. With the description keys removed, the before and after JSON is identical for all three. Typecheck, Biome and the unit suite pass. No tests check this wording.

Additional context

After release I'll hit Rescan in the OpenAI dashboard, and only Appeal if the tools are still flagged, since an appeal pauses scans. If they're still flagged, we'll also ask #partner-openai-supabase for more detail.

Refs #466, AI-1303

@barryroodt barryroodt self-assigned this Oct 12, 2026
@coveralls

coveralls commented Oct 12, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38254924416

Coverage remained the same at 96.995%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 12 of 12 lines across 4 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4474
Covered Lines: 4362
Line Coverage: 97.5%
Relevant Branches: 717
Covered Branches: 673
Branch Coverage: 93.86%
Branches in Coverage %: Yes
Coverage Strength: 88.65 hits per line

💛 - Coveralls

@barryroodt
barryroodt marked this pull request as ready for review October 12, 2026 12:53
@barryroodt
barryroodt requested a review from a team as a code owner October 12, 2026 12:53

@raulb raulb left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine if we leave openWorldHint for now on deploying edge functions. Let's start with the updated description first.

@barryroodt
barryroodt merged commit 1f9da03 into main Oct 12, 2026
5 checks passed
@supabase-releaser supabase-releaser Bot mentioned this pull request Oct 12, 2026
barryroodt added a commit that referenced this pull request Oct 13, 2026
…branch (#468)

## What kind of change does this PR introduce?

This fixes a double cost confirmation on `create_project` and
`create_branch`, a follow-up to #467. Refs #466, AI-1303.

## What is the current behavior?

Since #467, the tool descriptions tell the model the user must agree to
the cost first. So form-capable clients like Claude Code ask in chat,
then show the server's cost form, and the user confirms *twice*.

## What is the new behavior?

Every client gets the same description: call the tool without
`confirm_cost_id` (unless required) and don't ask about cost in chat.
The server then shows its cost form, or returns the steps to get a
confirmation ID. It has to be one description because Codex reads
OpenAI's cached tool snapshot, which a scanner without forms took, but
Codex supports forms at runtime.

A missing ID now returns those steps (`get_cost` -> `confirm_cost` ->
retry with its `confirmation_id` as `confirm_cost_id`) where it used to
return the opaque hash-mismatch error. `create_project` also mentions
that a $0 project skips the form. No schema changes.

## How to Review

Paths are under `packages/mcp-server-supabase/src/`.

1. **Shared description and missing-ID message:**
`tools/confirmation.ts`
2. **Tool descriptions and missing-ID guard:** `tools/account-tools.ts`,
`tools/branching-tools.ts`
3. **Tests:** `server.account.test.ts`, `server.branching.test.ts`

## Verification

I tested on supabase.green with a local HTTP server from this branch and
Claude Code. Creating a project and a branch each showed a single cost
form, and the server log shows no `get_cost`/`confirm_cost` calls.

## Additional context

The scanner-facing text changes, so OpenAI will likely re-review it.
barryroodt pushed a commit that referenced this pull request Oct 14, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>mcp-utils: 0.9.0</summary>

##
[0.9.0](mcp-utils-v0.8.0...mcp-utils-v0.9.0)
(2026-10-14)


### Features

* **mcp-utils:** add bounded request lifecycle observations
([#427](#427))
([b11d62b](b11d62b))
</details>

<details><summary>mcp-server-supabase: 0.14.0</summary>

##
[0.14.0](mcp-server-supabase-v0.13.0...mcp-server-supabase-v0.14.0)
(2026-10-14)


### Features

* **advisors:** add health advisor support
([#420](#420))
([8a26508](8a26508))
* **mcp-server-supabase:** add bounded cost lifecycle observations
([#428](#428))
([657d1f3](657d1f3))
* **mcp-server-supabase:** add destructive SQL observations
([#455](#455))
([4595698](4595698))


### Bug Fixes

* **mcp:** clarify cost and deploy tool descriptions for OpenAI scanner
([#467](#467))
([1f9da03](1f9da03))
* **mcp:** stop double cost confirmation on create_project and
create_branch ([#468](#468))
([3c3b1fc](3c3b1fc))
</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants