Skip to content
Merged
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
8 changes: 4 additions & 4 deletions plugins/deepnote/skills/deepnote-data-apps/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A data app project has two parts: the page, a responsive HTML page in `_deepnote
- Queries, heavy computation, credentials, and authenticated calls stay in the notebook. The page only filters, sorts, and charts.
- The app's controls are the notebook's input blocks. Reuse them by name and add only the missing ones.
- For AI-written text, such as a summary of the data, keep an agent block as the last block and ask for that text in its prompt. The page reads it as `agentBlockSummary`.
- The page shows each viewer's own newest successful detached run, or, in a public app without private outputs, the editors' newest one until the viewer runs it, so running blocks in the editor changes nothing. After changing the notebook, start a run with `create_run` and `detachedRunStorageMode: "readonly"`, wait until `get_run` with `snapshotDelivery: "blocks"` reports success, and check the JSON output's keys, types, and first rows before wiring the page to it. Changes to the page alone need no new run.
- The page shows each viewer's own newest successful detached run, or, when the app lets everyone with access see results without running it, the editors' newest one until the viewer runs it, so running blocks in the editor changes nothing. That setting is always on for public and scheduled apps and never with private outputs. After changing the notebook, start a run with `create_run` and `detachedRunStorageMode: "readonly"`, wait until `get_run` with `snapshotDelivery: "blocks"` reports success, and check the JSON output's keys, types, and first rows before wiring the page to it. Changes to the page alone need no new run.

## The Page

Expand Down Expand Up @@ -66,7 +66,7 @@ A data app project has two parts: the page, a responsive HTML page in `_deepnote

- By default, make it calm and compact like Deepnote without copying Deepnote's UI: neutral surfaces with one blue accent, 1px borders, `rounded-lg` controls and `rounded-xl` cards, sentence case, solid backgrounds without gradients, no emoji or decorative icons, shadows only on floating elements, and at most one primary button per view. When the user asks for another look or their brand, change the theme and classes freely.
- Connect with `const notebook = Deepnote.connect().notebook('<notebook ID>')`, using the notebook ID from `get_project`.
- On load, render `const {appData, agentBlockSummary, runCreatedAt} = await notebook.appData()` and show `runCreatedAt` as the time of the last update. In a public app without private outputs, a viewer with no run of their own gets the latest results of the app's editors. It throws when the viewer has no run yet, their results expired, or the run has no JSON output: show the message in an empty state with a button that runs the notebook with `{}`.
- On load, render `const {appData, agentBlockSummary, runCreatedAt} = await notebook.appData()` and show `runCreatedAt` as the time of the last update. When the app lets everyone with access see results without running it, a viewer with no run of their own gets the latest results of the app's editors. It throws when the viewer has no run yet, their results expired, or the run has no JSON output: show the message in an empty state with a button that runs the notebook with `{}`.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- `const {run} = await notebook.run(values, {onProgress})` runs the whole notebook for this viewer. When `run.status === 'success'`, render `await notebook.appData()` again. Run it on submission, or with `{}` from a refresh button when the app has no inputs. Public visitors with **View** access can't run the app, so the call rejects: show its message.
- Build the form from `await notebook.inputs()`, which returns each input's label, value, min, max, step, and options, so input changes in the notebook reach the app. Never overwrite input variables with hardcoded values. Values are keyed by input name and are strings (sliders too), booleans, or string arrays.
- Show loading, empty, and error states, prevent duplicate submissions, and handle rejected calls, missing results, and `run.error`. When a failed run has no error text, show its status and point to run history.
Expand All @@ -76,7 +76,7 @@ A data app project has two parts: the page, a responsive HTML page in `_deepnote

## Testing

Test a changed-input submission with `create_run`, its `inputs`, and `detachedRunStorageMode: "readonly"`, then read it with `get_run` and `snapshotDelivery: "blocks"`. When it fails, inspect its status and output and fix the cause; when it is still pending after several checks, point to run history without claiming the flow works. Finish with a run using `{}` and check that it succeeds, since in a public app the latest editor run is what visitors see. Delete scratch blocks when done.
Test a changed-input submission with `create_run`, its `inputs`, and `detachedRunStorageMode: "readonly"`, then read it with `get_run` and `snapshotDelivery: "blocks"`. When it fails, inspect its status and output and fix the cause; when it is still pending after several checks, point to run history without claiming the flow works. Finish with a run using `{}` and check that it succeeds, since, when the app lets everyone with access see results without running it, they see the latest editor run until they run it themselves. Delete scratch blocks when done.

Preview the page locally before pushing it, against the same API and data it gets in Deepnote:

Expand All @@ -90,7 +90,7 @@ A client that cannot run local commands, such as ChatGPT or claude.ai, cannot lo

## Publishing

Published and public are different settings. Published lets people with access to the project open the app; public lets anyone with its link open it, without a Deepnote account. A new data app is unpublished, so only the project's editors can open it. Publish it only when the user asks, with `update_project` and `dataApp.published: true`; `false` makes it editor-only again and ends public access for good: publishing it again doesn't bring it back. MCP and the API can't make an app public or see whether it is: when the user asks for that, tell them a project admin can turn on **Anyone with a link to this app** in the Share menu in Deepnote, with View to show results or Execute to also let visitors run it. People are invited from the Share menu too, not through MCP.
Published and public are different settings. Published lets people with access to the project open the app; public lets anyone with its link open it, without a Deepnote account. A new data app is unpublished, so only the project's editors can open it. Publish it only when the user asks, with `update_project` and `dataApp.published: true`; `false` makes it editor-only again and ends public access for good: publishing it again doesn't bring it back. MCP and the API can't make an app public or see whether it is: when the user asks for that, tell them a project admin can turn on **Anyone with a link to this app** in the Share menu in Deepnote, with View to show results or Execute to also let visitors run it. People are invited from the Share menu too, not through MCP. MCP also can't see or change **Let everyone with access see results without running the app**, which editors find under **General** in the project's settings sidebar.

## Reporting

Expand Down
2 changes: 1 addition & 1 deletion plugins/deepnote/skills/deepnote-mcp/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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_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; 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, or change schedules, 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; 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, or change schedules, 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
Loading