Repository navigation
fix: hint agents to re-copy malformed project refs - #522
Conversation
The Management API rejects refs that are not exactly 20 letters with a 400 `ref: ...` validation error. Agents that truncate or mistype a ref (AI-1425) got only that message. Append a hint to copy the ID verbatim from list_projects. Co-Authored-By: Claude <[email protected]>
Coverage Report for CI Build 42033282586Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.2%) to 97.865%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
1a1067a to
6245836
Compare
commit: |
barryroodt
left a comment
There was a problem hiding this comment.
Looks good! Agree that loosening the validation wouldn't help, since refs are always 20 chars.
Optional nit: branch refs come from list_branches / create_branch (project_ref), so an agent working on a branch gets pointed at the wrong tool. Could we say list_projects or list_branches instead? If we change it, supabase/platform#41332 has the same wording too.
Branch refs come from list_branches/create_branch as project_ref, so the hint should not send agents working on a branch to list_projects only. Co-Authored-By: Claude <[email protected]>
|
Done in 5a1f5cf. The hint now reads: "Copy the ref exactly as returned by list_projects (id) or list_branches (project_ref); do not retype or shorten it." Will do the same change in supabase/platform#41332. |
Co-Authored-By: Claude <[email protected]>
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-server-supabase: 0.16.0</summary> ## [0.16.0](mcp-server-supabase-v0.15.0...mcp-server-supabase-v0.16.0) (2026-11-05) ### Features * bound run_notebook cost ([#511](#511)) ([e90d110](e90d110)) * **mcp-server-supabase:** run selected notebook cells ([#514](#514)) ([8d04248](8d04248)) * **notebooks:** add delete_notebook tool with elicitation confirmation ([#510](#510)) ([f36f74a](f36f74a)) * **notebooks:** enable create_notebook and run_notebook tools ([#509](#509)) ([addc4e5](addc4e5)) ### Bug Fixes * **feedback:** accept null project_id and surface the feedback length limit ([#521](#521)) ([994f56c](994f56c)) * hint agents to re-copy malformed project refs ([#522](#522)) ([0c650bf](0c650bf)) * **notebooks:** return caller errors for client-caused notebook refusals ([#512](#512)) ([5f0d393](5f0d393)) * **pg-meta:** report partition FKs once and add partition_of to list_tables ([#508](#508)) ([2c7fa82](2c7fa82)) * **pg-meta:** return complete check expressions for NOT VALID and NO INHERIT constraints ([#517](#517)) ([c54bb40](c54bb40)) * **sql:** skip destructive confirmation for planner-only EXPLAIN ([#519](#519)) ([95745e5](95745e5)) * tolerate non-URL edge function paths in api platform ([#438](#438)) ([00d07a4](00d07a4)) </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>
Fixes an unhelpful error when an agent passes a malformed project ref:
apply_migration,execute_sqlandget_projectfailed withref: ref must be exactly 20 characters longafter the agent used a 19-character ref. A 19-character ref can't exist. The Management API'szProjectRefrequires exactly 20 letters, refs are generated with 20 characters, andlist_projectspasses refs through unchanged. So the agent most likely truncated the ref, and loosening validation wouldn't help. Now, when the API rejects a ref with a 400 error, the message also tells the agent to copy the ref exactly aslist_projects(id) orlist_branches(project_ref) returned it, depending on whether it's working with the main project or a branch.Refs AI-1425