Skip to main content
Glama
snahrup

Microsoft Fabric MCP Server

by snahrup

get_workspaces

Retrieve all Microsoft Fabric and Power BI workspaces to view available data environments for analysis and management.

Instructions

Get all Fabric/Power BI workspaces

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for 'get_workspaces' tool in the MCP server, which calls powerBIClient.getWorkspaces().
    case 'get_workspaces': {
      const workspaces = await powerBIClient.getWorkspaces();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(workspaces, null, 2),
          },
        ],
      };
    }
  • The actual implementation of fetching workspaces from the Power BI API.
    async getWorkspaces(): Promise<any[]> {
      try {
        const response = await this.apiClient.get('/groups');
        return response.data.value;
      } catch (error) {
        console.error('Error fetching workspaces:', error);
        throw error;
      }
    }
  • src/index.ts:96-103 (registration)
    Tool registration for 'get_workspaces'.
    {
      name: 'get_workspaces',
      description: 'Get all Fabric/Power BI workspaces',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },

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