Skip to main content
Glama

compute_process_kpis

Computes process KPIs deterministically from Excel/CSV files or Power BI datasets, returning KPI values, precision metadata, and warnings for reporting and analysis.

Instructions

Deterministically compute process KPIs from Excel/CSV or Power BI dataset.

Args: source_path: Optional Excel/CSV file path inside PBI_WORKSPACE_ROOT. sheet_name: Optional Excel sheet name. workspace_id: Optional Power BI / Fabric workspace GUID for DAX queries. dataset_id: Optional Power BI / Fabric dataset GUID. catalog_path: Optional YAML KPI catalog path (defaults to built-in preset). kpi_ids: Optional subset of KPI IDs to compute. as_of_date: Optional ISO date YYYY-MM-DD for overdue/cycle calculations. area_filter: Optional area filter (operaciones, proyectos, compras, hsec, etc.). dax_table_name: Fallback table name when executing DAX expressions. impersonated_user_name: Optional RLS effective username (requires write scope). fabric_client: Optional injected FabricClient for testing. auth_mode: Optional auth mode override. tenant_id: Optional Entra ID tenant. client_id: Optional Entra ID client ID.

Returns: Dict with deterministic KPI values, Decimal precision metadata, and warnings.

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": "compute_process_kpis"
  }
}

Input Schema

NameRequiredDescriptionDefault
kpi_idsNo
auth_modeNo
client_idNo
tenant_idNo
as_of_dateNo
dataset_idNo
sheet_nameNo
area_filterNo
source_pathNo
catalog_pathNo
workspace_idNo
fabric_clientNo
dax_table_nameNoControl
impersonated_user_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.25.1

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations at all, the description carries the full disclosure burden. It does add real context: deterministic output, Decimal precision metadata, warnings, a default KPI preset, and that impersonated_user_name requires write scope. It omits whether the operation reads or mutates data, error behavior for missing files or invalid GUIDs, and any precedence rules among sources.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is well front-loaded and the Args/Returns layout is scannable, but it is a raw docstring dump rather than agent-oriented prose. Internal-only parameters such as fabric_client 'for testing' consume space and add noise for an external caller.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the Returns section is redundant but harmless. For a 14-parameter tool with zero annotation coverage, the definition still leaves real questions open: source precedence, expected formats for as_of_date and GUIDs, and how kpi_ids relate to the KPI catalog tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are 14 parameters, so the description must compensate. It documents every parameter by name, which is genuinely useful, but many entries are tautological ('Optional auth mode override', 'Optional Entra ID client ID', 'Optional subset of KPI IDs') and give no valid values, formats, or pointer to where KPI IDs come from; only area_filter offers example values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and resource ('compute process KPIs') plus the accepted input modes (Excel/CSV files or a Power BI dataset), and adds a meaningful qualifier ('deterministically'). It does not name any sibling tool or say how it differs from e.g. execute_dax_query or define_kpi_catalog, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the presence of source_path/sheet_name versus workspace_id/dataset_id signals two alternative input modes, and catalog_path notes a built-in preset default. There is no explicit statement of when to choose this tool over alternatives, nor what happens if conflicting source parameters are supplied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.