MCPcopy Create free account
hub / github.com/deepnote/deepnote / getBestPracticesPrompt

Function getBestPracticesPrompt

packages/mcp/src/prompts.ts:367–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365}
366
367function getBestPracticesPrompt(): GetPromptResult {
368 return {
369 description: 'Best practices for Deepnote notebooks',
370 messages: [
371 {
372 role: 'user',
373 content: {
374 type: 'text',
375 text: `# Deepnote Notebook Best Practices
376
377## Structure
378- Start with a title (text-cell-h1) and introduction (markdown)
379- Organize into sections with headers (text-cell-h2)
380- Add markdown explanations before complex code blocks
381- End with conclusions or next steps
382
383## Interactivity
384- Convert hardcoded values to input blocks:
385 - File paths → input-text
386 - Thresholds/parameters → input-slider
387 - Categories → input-select
388 - Toggles → input-checkbox
389- Use meaningful variable names and labels
390
391## Code Quality
392- Keep code blocks focused on one task
393- Use df.head() or display() to show dataframes
394- Add error handling for file loading
395- Import all dependencies at the start
396
397## Documentation
398- Explain the "why" not just the "what"
399- Document expected input formats
400- Note any external dependencies
401- Add callouts for important warnings
402
403## Tools Workflow
404
405**For new notebooks:**
4061. ${TOOL_NAMES.create} → Creates project and initial notebook
4072. ${TOOL_NAMES.addBlock} → Adds content and interactivity incrementally
4083. ${TOOL_NAMES.run} → Validates the notebook end-to-end
409
410**For existing notebooks:**
4111. ${TOOL_NAMES.read} include=["lint","dag"] → Find issues
4122. ${TOOL_NAMES.cat} + ${TOOL_NAMES.editBlock} → Inspect and fix blocks
4133. ${TOOL_NAMES.run} + ${TOOL_NAMES.snapshotLoad} → Verify behavior
414
415**For analysis:**
4161. ${TOOL_NAMES.read} include=["structure","stats"] → See structure
4172. ${TOOL_NAMES.read} include=["dag"] → View dependencies
4183. ${TOOL_NAMES.snapshotLoad} → Inspect outputs from previous runs`,
419 },
420 },
421 ],
422 }
423}

Callers 1

getPromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected