Repository navigation
feat(mcp-server-supabase): observe notebook runs - #478
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Logs notebooks are a primary observability use case, so run_notebook is now offered when either the database or debugging feature can run cells. Database cells return a per-cell error without the database feature, as log cells already do without debugging. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Reject negative or fractional row limits, blank names and SQL, and unknown chart or time range keys; trim saved names and SQL. - Build the tool input schema in notebook-tools with project_id first, keeping the platform options schema free of model-facing descriptions. - Show the creation confirmation as a readable per-cell list instead of raw JSON, and explain why creation confirms at all. - Configure notebook confirmations through one option with enabledTools, matching the database tools. - Note in the description that run_notebook can only run log cells whose range is 24 hours or less. - Cover the full confirmation message, non-elicitation responses, declines after changes, and which field each invalid input fails on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
run_notebook buffers every cell's rows until the run ends, which a hosted server can't afford. Cap a run at about 1 MB of rows across all cells: each database cell gets the budget earlier cells left as max_result_bytes, so platforms can stop reading early, and a cell whose rows don't fit returns an error without stopping later cells. execute_sql is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # CONTRIBUTING.md # packages/mcp-server-supabase/test/server-harness.ts
…re/create-notebook-tool # Conflicts: # CONTRIBUTING.md # packages/mcp-server-supabase/src/server.test.ts
… feat/notebook-tools-observation
4 tasks
mattrossman
approved these changes
Oct 21, 2026
mattrossman
left a comment
Collaborator
There was a problem hiding this comment.
I tested adding a temporary observer to the local dev server and saw the facts coming in during notebook elicitations in Claude.
Collaborator
|
Side note, wonder if we should include such an |
…re/create-notebook-tool # Conflicts: # packages/mcp-server-supabase/src/server.test.ts
… feat/notebook-tools-observation
…-tool # Conflicts: # CONTRIBUTING.md # packages/mcp-server-supabase/src/server.notebooks.test.ts # packages/mcp-server-supabase/src/server.test.ts # packages/mcp-server-supabase/src/tools/notebook-tools.ts # packages/mcp-server-supabase/src/transports/local-http-entry.test.ts
… feat/notebook-tools-observation
Merged
barryroodt
pushed a commit
that referenced
this pull request
Oct 29, 2026
## What kind of change does this PR introduce? Release gate (chore) ## What is the current behavior? With `features=notebooks`, `tools/list` offers `create_notebook` and `run_notebook`, and release PR #477 would ship them in 0.15.0. ## What is the new behavior? The server no longer registers `create_notebook` or `run_notebook`. With `notebooks` requested, `tools/list` shows only `list_notebooks` and `get_notebook`, and a call to either hidden tool returns `tool not found`. The static tool registry (`supabaseMcpToolSchemas` / `createToolSchemas`) still lists both tools, so it no longer matches what the server registers for notebooks. An `@internal` server option, `unreleasedNotebookTools`, turns them back on. It defaults to `false` and has no CLI flag or query param. Tests that cover the hidden tools set it, including the local HTTP suite through `startEntry`. `@internal` is only a doc comment, so the option still ships as `unreleasedNotebookTools?: boolean` on the exported `SupabaseMcpServerOptions`, and hosts using `createSupabaseMcpHandler` can set it. The commit type is `chore`, so this PR adds nothing to the changelog. The notebook entries from #445, #446 and #478 come out of #477 through `BEGIN_COMMIT_OVERRIDE` blocks on those PRs. Closes [AI-1377](https://linear.app/supabase/issue/AI-1377)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #446.
Adds the observation facts introduced in 0.14.0 to
run_notebookelicitation events. They're emitted under a newnotebookfeature, since its prompt also fires for mutating SQL that isn't destructive. Notebooks with nothing to confirm get a newnot_mutatingbypass reason.An accepted or bypassed run emits one started/returned pair for the whole notebook. The cell queries don't add facts of their own, and a cell error the run catches still counts as returned because the run keeps going.
BEGIN_COMMIT_OVERRIDE
chore(mcp-server-supabase): observe notebook runs
END_COMMIT_OVERRIDE