create_notebook
Create a new notebook in Microsoft Fabric workspace to organize code, data analysis, and documentation for collaborative projects.
Instructions
Create a new notebook in Fabric workspace
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | The workspace ID | |
| name | Yes | Name of the notebook | |
| content | Yes | Notebook content/definition |
Implementation Reference
- src/index.ts:209-220 (handler)Handler in the MCP server that parses the arguments for 'create_notebook' and calls the fabricClient.
case 'create_notebook': { const { workspaceId, name, content } = CreateNotebookSchema.parse(args); const notebook = await fabricClient.createNotebook(workspaceId, name, content); return { content: [ { type: 'text', text: JSON.stringify(notebook, null, 2), }, ], }; } - src/index.ts:27-31 (schema)Zod schema definition for validating the 'create_notebook' tool input.
const CreateNotebookSchema = z.object({ workspaceId: z.string().describe('The workspace ID'), name: z.string().describe('Name of the notebook'), content: z.any().describe('Notebook content/definition'), }); - src/fabric-client.ts:51-62 (handler)The underlying API call implementation for creating a notebook in Microsoft Fabric.
async createNotebook(workspaceId: string, name: string, content: any): Promise<FabricNotebook> { try { const response = await this.apiClient.post(`/workspaces/${workspaceId}/notebooks`, { displayName: name, definition: content }); return response.data; } catch (error) { console.error('Error creating notebook:', error); throw error; } } - src/index.ts:105-124 (registration)Registration of the 'create_notebook' tool in the listTools response.
name: 'create_notebook', description: 'Create a new notebook in Fabric workspace', inputSchema: { type: 'object', properties: { workspaceId: { type: 'string', description: 'The workspace ID', }, name: { type: 'string', description: 'Name of the notebook', }, content: { type: 'object', description: 'Notebook content/definition', }, }, required: ['workspaceId', 'name', 'content'], },