Skip to main content
Glama
snahrup

Microsoft Fabric MCP Server

by snahrup

refresh_dataset

Refresh Power BI datasets to update data and maintain accuracy for reporting and analysis.

Instructions

Refresh a Power BI dataset

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetIdYesThe ID of the dataset to refresh

Implementation Reference

  • The implementation of the refresh logic that calls the Power BI API.
    async refreshDataset(datasetId: string): Promise<void> {
      try {
        await this.apiClient.post(`/datasets/${datasetId}/refreshes`);
      } catch (error) {
        console.error('Error refreshing dataset:', error);
        throw error;
      }
    }
  • The MCP tool handler for 'refresh_dataset' that invokes the powerBIClient.
    case 'refresh_dataset': {
      const { datasetId } = RefreshDatasetSchema.parse(args);
      await powerBIClient.refreshDataset(datasetId);
      return {
        content: [
          {
            type: 'text',
            text: `Dataset ${datasetId} refresh initiated successfully`,
          },
        ],
      };
    }
  • Zod schema definition for the 'refresh_dataset' tool input.
    const RefreshDatasetSchema = z.object({
      datasetId: z.string().describe('The ID of the dataset to refresh'),
    });
  • src/index.ts:83-95 (registration)
    Registration of the 'refresh_dataset' tool in the MCP server tool list.
      name: 'refresh_dataset',
      description: 'Refresh a Power BI dataset',
      inputSchema: {
        type: 'object',
        properties: {
          datasetId: {
            type: 'string',
            description: 'The ID of the dataset to refresh',
          },
        },
        required: ['datasetId'],
      },
    },

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