Skip to main content
Glama
ducnguyen221

powerbi-agent

by ducnguyen221

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CLIENT_IDNoAzure client ID for Power BI Service
TENANT_IDNoAzure tenant ID for Power BI Service
CLIENT_SECRETNoAzure client secret for Power BI Service
POWERBI_AGGREGATE_ONLYNoSet to '1' to enable aggregate-only policy (blocks raw EVALUATE)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_local_reportsA

Liệt kê các báo cáo Power BI Desktop đang mở trên máy tính kèm thông tin cổng kết nối.

list_tablesA

Liệt kê các bảng trong model đang mở (đã lọc bảng hệ thống LocalDateTable/DateTableTemplate).

  • port / model_id: lấy từ list_local_reports.

describe_tableA

Mô tả 1 bảng: danh sách cột (tên + kiểu dữ liệu) và các measure đặt trong bảng đó.

  • port / model_id: lấy từ list_local_reports.

  • table_name: tên bảng (lấy từ list_tables).

execute_dax_localA

Thực thi một truy vấn DAX trực tiếp lên báo cáo Power BI Desktop đang mở.

  • port: Cổng kết nối (ví dụ: '51234')

  • model_id: Tên catalog/model ID lấy từ công cụ list_local_reports

  • dax_query: Câu lệnh DAX (ví dụ: 'EVALUATE SUMMARIZECOLUMNS(...)')

  • max_rows: Số dòng tối đa trả về (mặc định 1000; kết quả có cột dimension bị siết còn 200 khi policy aggregate-only bật). Đặt 0 để bỏ giới hạn mềm. LƯU Ý POLICY: mặc định chặn dump bảng thô (EVALUATE 'Bảng' / ALL()) và cột trong PII blocklist.

execute_dax_serviceA

Truy vấn dữ liệu từ Dataset đã xuất bản trên Cloud Power BI Service thông qua REST API.

  • dataset_id: Mã GUID của dataset cần truy vấn.

  • dax_query: Câu lệnh DAX (ví dụ: 'EVALUATE SUMMARIZECOLUMNS(...)')

  • max_rows: Số dòng tối đa trả về (mặc định 1000; siết 200 khi kết quả có cột dimension). LƯU Ý POLICY: như execute_dax_local.

add_measure_localA

Tạo mới hoặc cập nhật một Measure DAX trực tiếp vào mô hình Power BI Desktop đang mở (TOM). Với thao tác modeling hàng loạt/phức tạp, ưu tiên MCP powerbi-modeling (Microsoft) nếu có.

  • port / model_id: lấy từ list_local_reports.

  • table_name: bảng chứa Measure (ví dụ: 'Sales').

  • measure_name: tên Measure (ví dụ: 'Total Sales').

  • expression: công thức DAX (ví dụ: 'SUM(Sales[Amount])').

  • format_string: định dạng hiển thị (ví dụ: '#,0' hoặc '0.0%').

  • description: mô tả ghi chú.

add_relationship_localA

Tạo mối quan hệ Many-to-One giữa hai bảng trong mô hình Power BI Desktop đang mở (TOM). Với thao tác modeling hàng loạt/phức tạp, ưu tiên MCP powerbi-modeling (Microsoft) nếu có.

  • from_table/from_column: phía NHIỀU (Many) — thường là bảng Fact.

  • to_table/to_column: phía MỘT (One) — thường là bảng Dim.

  • is_active: True = quan hệ active (mặc định).

distill_model_schemaA

Trích xuất cấu trúc mô hình dữ liệu (bảng, cột, quan hệ, measure) của báo cáo Power BI Desktop đang mở thành tài liệu Markdown blueprint (kèm sơ đồ Mermaid ERD) để Agent tham chiếu khi viết DAX / thiết kế báo cáo.

  • port / model_id: để trống sẽ tự dò (nếu chỉ có 1 báo cáo đang mở).

  • output_filename: tên file .md (mặc định 'distilled_model_.md').

  • output_dir: thư mục ghi; mặc định env POWERBI_DISTILL_DIR hoặc <thư mục dự án>/distilled/. LƯU Ý: schema model có thể nhạy cảm (tên bảng/cột/công thức nghiệp vụ) — đừng ghi vào repo public.

list_templatesA

Liệt kê các template kit báo cáo có sẵn (repo report-templates/ + env POWERBI_TEMPLATES_DIR). Mỗi kit gồm: blocks (visual.json verbatim theo loại), blueprint, page settings, design tokens.

distill_templateA

Chưng cất 1 trang báo cáo PBIR thành template kit tái dùng (blueprint.md + blocks/*.json verbatim mỗi loại visual + _page.json + kit.json).

  • report_path: file .pbip, folder *.Report, hoặc folder definition.

  • page: GUID trang hoặc displayName chính xác.

  • out_dir: thư mục ghi kit — mặc định nên là templates/ trong THƯ MỤC DỰ ÁN (ngoài repo).

  • sanitize: MẶC ĐỊNH True — thay tên bảng/cột/nhãn thật bằng placeholder TEMPLATE_*. Đặt False chỉ khi user nói RÕ kit này dùng nội bộ và chấp nhận giữ tên nghiệp vụ thật. Mặc định phải an toàn: kit từng lọt tên measure thật của khách ra bản public vì an toàn phụ thuộc vào việc người gọi nhớ bật cờ. CHỈ ĐỌC — không sửa báo cáo nguồn.

apply_templateA

Dựng TRANG MỚI vào báo cáo PBIR từ template kit (clone-and-rebind — không dựng layout từ đầu). ⚠️ File .pbip phải ĐANG ĐÓNG trong Power BI Desktop (mở + Ctrl+S sẽ đè mất trang mới).

  • report_path: file .pbip, folder *.Report, hoặc folder definition (SẼ GHI vào đây).

  • kit_dir: thư mục kit (tạo bởi distill_template, hoặc report-templates/ có sẵn — xem list_templates).

  • page_spec: JSON string: {"displayName": "Tên trang", "visuals": [ {"block": "cardVisual", "x": 30, "y": 100, "z": 1000, "width": 280, "height": 110, "visualType": "(tùy chọn — đổi loại chart, phải chỉnh roles khớp)", "title": "(tùy chọn — ghi đè text title, giữ style)", "fields": {"Data": [{"type": "Measure", "entity": "Công thức", "property": "Tổng TB"}]}} ]} Role theo loại: card/slicer=Values · cardVisual=Data · line/area/combo=Category/Y/Series · pivotTable=Rows/Columns/Values. Field type: Measure | Column. Trả về: đường trang mới + việc cần làm tay (mở lại Power BI để nghiệm thu).

distill_report_designA

Quét TOÀN BỘ báo cáo PBIR (mọi trang + theme + report settings) thành bộ hồ sơ thiết kế: REPORT_CATALOG.md (Report→Page→Visual) + DESIGN.md (theme/palette/canvas/nền/kiểm kê)

  • theme/*.json (import lại được). CHỈ ĐỌC báo cáo nguồn.

  • report_path: file .pbip, folder *.Report, hoặc folder definition.

  • project: tên dự án trong Knowledge Dir → ghi vào projects//design/ (mặc định).

  • out_dir: ghi đè đích ra folder tùy ý (bỏ qua Knowledge Dir). Kết hợp distill_model_schema (model) = trọn bộ hồ sơ 1 project. LƯU Ý: hồ sơ chứa binding nghiệp vụ thật — mặc định lưu Knowledge Dir riêng tư, KHÔNG commit repo.

knowledge_statusA

Kiểm tra Knowledge Dir (workspace basic hoặc trạm ngoài) đã thiết lập chưa + tóm tắt hiện trạng. GỌI TOOL NÀY ĐẦU TIÊN trước mọi quy trình tri thức (/pbi-new, /pbi-scan, /pbi-done, /pbi-pack, /pbi-recall).

setup_knowledgeA

Thiết lập thư mục dự án tại path; mặc định là workspace/ trong checkout. Nếu chọn nơi khác, phải là thư mục ngoài vùng source của repo.

Con trỏ ghi thành 1 dòng POWERBI_PROJECT_DIR trong station/config.env (có backup). Dựng skeleton: projects/ · knowledge/ 4 trục · templates/ · INDEX.md · TIMELINE.md. Idempotent.

init_projectA

Tạo folder dự án mới projects/<slug>/ trong Knowledge Dir (+ artifacts/ + design/), đăng ký INDEX + TIMELINE. MỌI file agent tạo trong dự án (tài liệu, artifact, distill) mặc định lưu vào folder này. Trả về đường dẫn để dùng cho các bước sau.

log_timelineA

Ghi 1 dòng vào TIMELINE.md (append-only): dự án + sự kiện + bài học/sản phẩm + link. Dùng khi: đóng dự án, sinh kit mới, rút bài học, mốc quan trọng.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 16 tools

Disambiguation4/5

Most tools target clearly distinct resources or actions: local vs service DAX, list vs describe, and template list vs distill vs apply are well separated. The main ambiguity is among the three distill_* tools and the knowledge/project meta-tools, though their descriptions do differentiate them.

Naming Consistency4/5

Tool names use snake_case consistently, and almost all follow a verb_noun pattern (list_tables, execute_dax_local, add_measure_local). Minor deviations exist, such as knowledge_status (noun_status) and the near-synonyms setup_knowledge / init_project.

Tool Count3/5

At 16 tools, the set sits at the start of the heavy/borderline range beyond the typical 3-15 sweet spot. Each tool appears purposeful, but several niche knowledge/project and distill tools make the surface feel somewhat large for the core Power BI agent scope.

Completeness3/5

Core local DAX, modeling creation, template, and knowledge workflows are covered, but notable gaps remain. There is no discovery for cloud workspaces/datasets even though execute_dax_service requires a dataset GUID, and no delete/update operations for relationships or report pages.

Maintenance

ActivityMaintained
ResponsivenessNo issues