get_powerbi_datasets
Retrieve all Power BI datasets from a Microsoft Fabric workspace to access and manage data models for analysis and reporting.
Instructions
Get all Power BI datasets in the workspace
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_powerbi_datasets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/powerbi-client.ts:41-55 (handler)The actual implementation of fetching datasets from Power BI.
async getDatasets(): Promise<Dataset[]> { try { // Use workspace-specific endpoint if workspace ID is available const workspaceId = process.env.POWERBI_WORKSPACE_ID; const endpoint = workspaceId ? `/groups/${workspaceId}/datasets` : '/datasets'; const response = await this.apiClient.get(endpoint); return response.data.value; } catch (error) { console.error('Error fetching datasets:', error); throw error; } } - src/index.ts:58-64 (registration)Tool registration for get_powerbi_datasets.
name: 'get_powerbi_datasets', description: 'Get all Power BI datasets in the workspace', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:161-171 (handler)The handler in index.ts that maps the MCP request to the powerBIClient implementation.
case 'get_powerbi_datasets': { const datasets = await powerBIClient.getDatasets(); return { content: [ { type: 'text', text: JSON.stringify(datasets, null, 2), }, ], }; }