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
| Name | Required | Description | Default |
|---|---|---|---|
| datasetId | Yes | The ID of the dataset to refresh |
Implementation Reference
- src/powerbi-client.ts:83-90 (handler)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; } } - src/index.ts:185-196 (handler)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`, }, ], }; } - src/index.ts:23-25 (schema)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'], }, },