You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Updated cursor_rules.md and README.md to explain cost vs. visibility trade-offs
- Removed statements in cursor_rules.md that guided to use bulk actions (preferring transparency and less waiting over cost)
- Updated README.md with a new section on Cursor Rules for AI Guidance, explaining how to modify if cost is a concern
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,6 +278,39 @@ The following examples can be used for `~/.cursor/mcp.json` (global) or `.cursor
278
278
```
279
279
*Note: For these `uv` examples, `/absolute/path/to/your/project/with/uv/venv` must be the correct absolute path to your project where `cursor-notebook-mcp` is installed within its `uv`-managed environment. The `--allow-root` path for notebooks should also be an absolute path for clarity and reliability. You can add other `cursor-notebook-mcp` arguments (like `--log-level DEBUG` or `--port 8889`) to the end of the `args` list for`cursor-notebook-mcp` or `python -m cursor_notebook_mcp.server` as needed.*
280
280
281
+
## Cursor Rules for AI Guidance
282
+
283
+
The package includes a `cursor_rules.md` file that helps calibrate the agent's behavior when working with Jupyter notebooks through the MCP server. These rules ensure consistent and clean notebook actions by providing guidelines for markdown formatting, tool usage, path resolution, and more.
284
+
285
+
### Default Behavior: Visibility and Feedback
286
+
287
+
By default, the rules are optimized for visibility into the AI's actions as it constructs or modifies notebooks. The AI will tend to use individual tool calls foroperations like adding cells, which means you can see the notebook being built cell by cell. This provides good feedback and allows you to intervene quickly if needed. However, this approach resultsin more tool calls, which can impact costs when using paid AI services.
288
+
289
+
### Configuring Rules in Cursor
290
+
291
+
To use the cursor rules:
292
+
293
+
1. Open Cursor
294
+
2. Go to Cursor > Settings > Cursor Settings
295
+
3. Click on "Rules"in the sidebar
296
+
4. You can either:
297
+
* Click "Add new rule" under "Project Rules" to apply the rules only to the current project
298
+
* Add to "User Rules" to apply them globally
299
+
300
+
### Optional: Cost-Efficient Mode
301
+
302
+
If you're more concerned about cost-effectiveness and don't mind waiting to see results, you can add the following section to the rules:
303
+
304
+
```markdown
305
+
8. **Efficiency Mode (Cost Optimization):**
306
+
* Minimize tool calls as they incur API costs.
307
+
* Use `notebook_bulk_add_cells` instead of multiple `notebook_add_cell` calls when adding multiple cells.
308
+
* Use `notebook_read` to get the full notebook state instead of reading individual cells.
309
+
* Only use `notebook_read_cell` when you need to verify a specific cell's content.
310
+
* Batch related changes together when possible.
311
+
* Skip verification reads if the operation is simple and unlikely to fail.
312
+
```
313
+
281
314
## Editing Remote Notebooks via SFTP/SSH
282
315
283
316
This server supports accessing and editing Jupyter notebooks stored on remote servers via SFTP (SSH File Transfer Protocol). This allows you to work on notebooks as if they were local, provided you have SSH access to the remote machine and SFTP is enabled on it.
Copy file name to clipboardExpand all lines: cursor_rules.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
2.**Tool Usage:**
10
10
* Always use `notebook_mcp` tools for `.ipynb` files, never `edit_file`.
11
-
* Verify changes after making them with `notebook_read_cell` or `notebook_read` (be efficient with tool calls).
11
+
* Verify changes after making them with `notebook_read_cell` or `notebook_read`.
12
12
13
13
3.**Path Resolution for Notebooks:**
14
14
***Initial Step:** At the beginning of notebook operations, or if path ambiguity exists, call `notebook_get_server_path_context` (providing the current `project_directory`).
@@ -31,7 +31,7 @@
31
31
***Path & Server Context**: `notebook_get_server_path_context`
***Cell Operations**: `notebook_read_cell`, `notebook_add_cell`, `notebook_edit_cell`, `notebook_delete_cell`, `notebook_bulk_add_cells` (use bulk add when you need to add multiple cells at once)
0 commit comments