| 177 | } |
| 178 | |
| 179 | function getCreateNotebookPrompt(args: Record<string, string> | undefined): GetPromptResult { |
| 180 | const purpose = args?.purpose || 'data analysis' |
| 181 | const dataSource = args?.data_source || 'CSV file' |
| 182 | |
| 183 | return { |
| 184 | description: `Template for creating a ${purpose} notebook`, |
| 185 | messages: [ |
| 186 | { |
| 187 | role: 'user', |
| 188 | content: { |
| 189 | type: 'text', |
| 190 | text: `Create a Deepnote notebook for: ${purpose} |
| 191 | |
| 192 | Data source: ${dataSource} |
| 193 | |
| 194 | Use available notebook editing tools with these guidelines: |
| 195 | - Start with \`${TOOL_NAMES.create}\` to create the project/notebook shell |
| 196 | - Use \`${TOOL_NAMES.addBlock}\` to incrementally add analysis blocks |
| 197 | - Keep sections small and run often with \`${TOOL_NAMES.run}\` |
| 198 | |
| 199 | Example tool call: |
| 200 | { |
| 201 | "name": "${TOOL_NAMES.create}", |
| 202 | "arguments": { |
| 203 | "projectName": "${purpose}", |
| 204 | "outputPath": "notebook.deepnote", |
| 205 | "notebooks": [ |
| 206 | { |
| 207 | "name": "Notebook 1", |
| 208 | "blocks": [ |
| 209 | { "type": "text-cell-h1", "content": "${purpose}" }, |
| 210 | { "type": "markdown", "content": "Data source: ${dataSource}" } |
| 211 | ] |
| 212 | } |
| 213 | ] |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | After creating, continue with \`${TOOL_NAMES.addBlock}\` and \`${TOOL_NAMES.editBlock}\` to add: |
| 218 | - Interactive inputs for configurable parameters |
| 219 | - Better documentation between code sections`, |
| 220 | }, |
| 221 | }, |
| 222 | ], |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | function getConvertAndEnhancePrompt(args: Record<string, string> | undefined): GetPromptResult { |
| 227 | const sourcePath = args?.source_path || 'notebook.ipynb' |