Skip to main content
Glama
snahrup

Microsoft Fabric MCP Server

by snahrup

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
NameRequiredDescriptionDefault
workspaceIdYesThe workspace ID
nameYesName of the notebook
contentYesNotebook content/definition

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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'),
    });
  • 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'],
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snahrup/microsoft-fabric-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server