Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Through the hosted MCP server the agent can:
- Create and delete projects, notebooks, and blocks; rename or duplicate notebooks; and update or reorder blocks
- Create, attach, and detach integrations, inspect cached table structure, and map integration usage
- Read and write small text files in a project, copy files between projects, delete files, and generate canonical project or notebook URLs
- Start notebook runs, optionally with input values or on a chosen machine type, and read run history, status, errors, and snapshot output
- Start notebook runs, optionally with input values or on a chosen machine type; read run history, status, errors, and snapshot output; and page through DataFrames that notebooks stored by name
- List, add, update, and remove recurring notebook schedules with their own timing, names, and input values
- Choose a project's environment (Docker image), check whether its machine is running and how big it is, start, stop, or restart it, and change its machine type or idle shutdown
- Read Deepnote docs
Expand Down
2 changes: 1 addition & 1 deletion plugins/deepnote/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "deepnote",
"displayName": "Deepnote",
"version": "0.10.0",
"version": "0.11.0",
"description": "Search Deepnote workspaces, inspect and edit projects and notebooks, manage integrations and project machines, build data apps and Streamlit apps, generate links, read docs, run notebooks, and manage notebook schedules from Claude.",
"author": {
"name": "Deepnote",
Expand Down
2 changes: 1 addition & 1 deletion plugins/deepnote/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deepnote",
"version": "0.10.0",
"version": "0.11.0",
"description": "Search Deepnote workspaces, inspect and edit projects and notebooks, manage integrations and project machines, build data apps and Streamlit apps, generate links, read docs, run notebooks, and manage notebook schedules from ChatGPT and Codex.",
"author": {
"name": "Deepnote",
Expand Down
7 changes: 4 additions & 3 deletions plugins/deepnote/skills/deepnote-mcp/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: deepnote-mcp
description: Use when a task mentions Deepnote, the Deepnote MCP server, Deepnote docs, projects, workspaces, notebooks, blocks, integrations, API keys, files, apps, notebook runs, or schedules. Shared rules for all Deepnote skills.
description: Use when a task mentions Deepnote, the Deepnote MCP server, Deepnote docs, projects, workspaces, notebooks, blocks, integrations, API keys, files, apps, notebook runs, stored DataFrames, or schedules. Shared rules for all Deepnote skills.
---

# Deepnote MCP

## When To Use Deepnote

Use the Deepnote MCP server as the primary interface for hosted Deepnote state. Prefer it over browser automation, screenshots, ad hoc HTTP calls, or local filesystem guesses whenever the user asks about Deepnote projects, notebooks, blocks, integrations, files, apps, search, notebook runs, or schedules. The one exception is previewing a data app page locally with the script in `deepnote-data-apps`.
Use the Deepnote MCP server as the primary interface for hosted Deepnote state. Prefer it over browser automation, screenshots, ad hoc HTTP calls, or local filesystem guesses whenever the user asks about Deepnote projects, notebooks, blocks, integrations, files, apps, search, notebook runs, stored DataFrames, or schedules. The one exception is previewing a data app page locally with the script in `deepnote-data-apps`.

Local `.deepnote` files are a separate surface. These MCP tools only see projects in Deepnote Cloud; they do not read or write `.deepnote` files in the user's repository. For those, use the open-source `deepnote` CLI (`npm install -g @deepnote/cli`). `deepnote install-skills` installs a skill with the `.deepnote` format and the CLI reference. Use `deepnote sync` to pull Cloud projects into local files and push local edits back, and `deepnote open` to upload a local file to Deepnote Cloud. Source and docs: https://github.com/deepnote/deepnote.

Expand Down Expand Up @@ -59,6 +59,7 @@ This is the authoritative summary of tool arguments. Workflow skills add only th
- `create_run`: start a notebook run by `notebookId`. It accepts optional `inputs` keyed by notebook input name, `detached` (default `true`), `detachedRunStorageMode` (`read_write` or `readonly`, detached runs only), `machineType` (an `id` from `list_machine_types`, detached runs only; defaults to the project's machine type), a non-empty unique `blockIds` list (live runs only), and `runDependentBlocks` (requires `blockIds`). For targeted execution, set `detached: false` and pass `blockIds`; omit `blockIds` to run the full notebook.
- `list_notebook_runs`: list historical notebook runs newest first, with `pageSize` (default 20) and `pageToken` pagination. Rows carry `runId`, `notebookId`, `status`, `createdAt`, and `completedAt`.
- `get_run`: fetch run `status`, `error`, `createdAt`, `completedAt`, and run snapshots. Optional `snapshotDelivery` is `"downloadUrl"` (the default when omitted), `"inline"`, or `"blocks"`. With `"blocks"`, outputs longer than 16,384 characters as JSON are replaced by a notice, with `outputHead` and `outputTail` showing how they start and end; `fullOutputs: true` returns them whole.
- `get_project_dataframe`: read one page of a DataFrame that notebook code stored by name with `store_dataframe(df, name)`, without starting a run. Requires `projectId` and `name`; accepts zero-based `pageIndex` and `pageSize` (default 10, at most 1000). A page over 64 KiB of JSON returns an error that suggests a smaller `pageSize`. View access is enough; not found can also mean the project is wrong or private to another user.
- `list_schedules`: list a notebook's schedules by `notebookId`, oldest first, in one unpaginated `schedules` array. Each schedule has `id`, `notebookId`, `cron`, `timezone`, `name`, `inputs`, `nextRunAt`, `isPaused`, `pauseReason`, `updatesNotebook`, `createdAt`, and `updatedAt`. The `id` is a string used as `scheduleId` for changes and deletion. `nextRunAt` can be `null`; `pauseReason` is `access-revoked`, `consecutive-failures`, or `null`. View access is enough.
- `create_schedule`: add a schedule next to a notebook's existing schedules. Requires `notebookId` and `cron`; accepts optional `timezone` (an IANA timezone, default `UTC`), `name` (1–100 characters after collapsing whitespace and trimming, or `null`), and `inputs` keyed by the input `name` from `get_notebook`. Inputs not listed use the notebook's saved values. The new schedule does not update the notebook with its results. Workspaces without multiple schedules reject a second schedule or non-empty input overrides.
- `update_schedule`: change a schedule by `scheduleId`. Requires at least one of `cron`, `timezone`, `name`, or `inputs`; omitted fields stay unchanged. Set `name: null` to remove the name. `inputs` replaces the entire override map; `null` or `{}` clears it. Setting non-empty overrides disables notebook output syncing; clearing them does not restore it. Any successful update resumes a paused schedule and makes the caller its owner, even when a value is unchanged.
Expand Down Expand Up @@ -91,7 +92,7 @@ Before telling a user that a Deepnote action is impossible, check the tools the
- Delete only what the user named, and say what can be undone: `delete_notebook` can be restored from version history and `delete_project` from the trash for 30 days, but a deleted project's schedules are gone. `delete_schedule` and `delete_file` cannot be undone, nor can the old content `write_file` replaces with `overwrite: true`.
- A running machine uses machine time. Start, stop, or restart it, or change its type or the project's environment, only when the user asked; a live run the user asked for may start it. Stopping or restarting it, changing its type or sandbox environment with `restart: true`, and changing the project's environment clear kernel state for everyone working in the project, so say that kernel state will be lost.
- If a tool returns `isError`, surface the user-facing error message concisely.
- Capability boundary: the hosted server can create folders, integrations, and Streamlit apps; create and delete projects, notebooks, and blocks; rename and duplicate notebooks; update and reorder blocks; list, create, update, and delete notebook schedules; read and write small text-based project files, copy files between projects, and delete files; attach and detach integrations; publish and unpublish data apps; mint short-lived viewer tokens to preview a data app page locally; move a project to another folder and change its environment; and start, stop, restart, or resize the project machine. It cannot make a data app public, read or upload large files or big binary blobs, delete folders or integrations, delete a Streamlit app other than by deleting its entrypoint file, move notebooks between projects, create custom environments, directly pause schedules or set schedule notifications or output syncing, or change whether a data app lets everyone with access see results without running it, permissions, package versions, credentials, or secrets. Check the advertised tools before relying on this boundary.
- Capability boundary: the hosted server can create folders, integrations, and Streamlit apps; create and delete projects, notebooks, and blocks; rename and duplicate notebooks; update and reorder blocks; list, create, update, and delete notebook schedules; read and write small text-based project files, copy files between projects, and delete files; read DataFrames that notebook code stored by name, page by page; attach and detach integrations; publish and unpublish data apps; mint short-lived viewer tokens to preview a data app page locally; move a project to another folder and change its environment; and start, stop, restart, or resize the project machine. It cannot make a data app public, read or upload large files or big binary blobs, delete folders or integrations, delete a Streamlit app other than by deleting its entrypoint file, move notebooks between projects, create custom environments, directly pause schedules or set schedule notifications or output syncing, or change whether a data app lets everyone with access see results without running it, permissions, package versions, credentials, or secrets. Check the advertised tools before relying on this boundary.

## Response Style

Expand Down
12 changes: 11 additions & 1 deletion plugins/deepnote/skills/deepnote-runs/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: deepnote-runs
description: Use when running a Deepnote notebook, passing run input values, checking run status, listing or auditing run history, debugging a failed or stuck run, reading run snapshot outputs, or listing, creating, updating, or deleting recurring notebook schedules through the Deepnote MCP server.
description: Use when running a Deepnote notebook, passing run input values, checking run status, listing or auditing run history, debugging a failed or stuck run, reading run snapshot outputs, reading DataFrames that notebook code stored by name, or listing, creating, updating, or deleting recurring notebook schedules through the Deepnote MCP server.
---

# Deepnote Runs And Schedules
Expand Down Expand Up @@ -62,6 +62,16 @@ This is the single definition of how to handle `get_run` snapshots.
- If the current tool schema does not expose `snapshotDelivery`, use the fields `get_run` returns as they are and do not invent `snapshotContent` or `snapshotDownloadUrl`.
- `get_block` with `includeOutputs: true` returns a block's outputs as the live editor shows them, which live runs update and detached runs never do. Read a detached run's outputs from its snapshot, not from `get_block`.

## Stored DataFrames

Notebook code can store a pandas or polars DataFrame under a name with `store_dataframe(df, '<name>')` from `deepnote_toolkit.artifacts`, so data apps, Streamlit apps, and API callers can page through it without running the notebook. Each store replaces the frame stored before under that name.
Comment thread
tkislan marked this conversation as resolved.
Resolved

- Find the name in the notebook code with `get_notebook` or `get_block`, then read the frame with `get_project_dataframe`. Use it to check that a run stored the frame, or to see the columns and values that code reading it receives, such as a data app page.
- Only runs that can write to the project store a frame: in a run with `detachedRunStorageMode: "readonly"`, `store_dataframe` stores nothing and returns `None`. A block that ends with `store_dataframe(...)` shows the stored frame's reference ID as its result in `get_run` with `snapshotDelivery: "blocks"`. When it matches the `referenceId` that `get_project_dataframe` returns, that run stored the current frame.
- To answer a question about a large frame, such as a total, a count, or the top rows by a value, offer to compute the answer in notebook code and run it with `create_run` and `detachedRunStorageMode: "readonly"` rather than paging through its rows. That run recomputes the frame from current data, so the answer can differ from the stored frame, and `readonly` keeps it from replacing that frame. Otherwise read only the pages the user needs and summarize them, following Sensitive Outputs.
- To read the whole frame, request `pageIndex` 0 to `pageCount - 1` with the same `pageSize`. When `referenceId` changes between pages, or a page below an earlier `pageCount` is out of range, a new frame replaced the stored one: start again at page 0.
- An error can ask for a smaller `pageSize`, for a page over 64 KiB of JSON or one the server can't serve. When reading the whole frame, start again at page 0 with it, since pages of another size start at other rows. When the error says no `pageSize` fits, offer to compute a smaller result in notebook code instead, as above.

## Sensitive Outputs

When snapshot content, download URLs, or errors include sensitive, proprietary, personal, or production-like data, minimize exposure. Summarize the result, shape, quality issues, aggregates, or failure mode instead of dumping raw records, presigned URLs, or long logs.
Expand Down