Skip to main content
Glama

add_calculation_group

Convert a single-column table into a calculation group to build reusable selectors like Time Intelligence (Current/YTD/PY/YoY) for any measure. Supports live sessions or offline PBIP folders.

Instructions

Turn a (single-column) table into a calculation group - the engine for reusable selectors like Time Intelligence (Current/YTD/PY/YoY) applied to ANY measure. After this, add items with add_calculation_item. Lower precedence is applied first when groups are nested. target=pbip: pass pbipFolder instead of sessionId to apply the edit OFFLINE to a PBIP semantic model's TMDL (no engine; a missing table is created whole and DiscourageImplicitMeasures is switched on).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNothe table to convert into a calculation group
sessionIdNosessionId from connect_model (live engine; pass exactly one of sessionId / pbipFolder)
pbipFolderNotarget=pbip: a PBIP <name>.SemanticModel / TMDL definition folder to edit OFFLINE (engine-free)
precedenceNoprecedence when multiple groups exist (higher applies last; optional)
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses important behaviors: precedence ordering, offline mode behavior for pbip (missing table created whole, DiscourageImplicitMeasures switched on), and the engine-for-selectors concept. It could be more explicit about side effects like modifying existing tables, but the information provided goes well beyond the schema.

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

Conciseness5/5

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

The description is compact and front-loaded, with three sentences each providing essential information: purpose, next step, precedence, and offline mode. No wasted words; every clause earns its place.

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

Completeness4/5

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

For a tool with 4 parameters, no output schema, and no annotations, the description covers the core functionality, sequencing, precedence, offline mode, and key behaviors. Missing details like return values are not critical given the lack of an output schema, but some side-effect information could be added. Overall, it is reasonably complete for a moderate-complexity tool.

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

Parameters4/5

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

Schema coverage is 100%, and the description still adds value by clarifying that the table must be single-column, explaining the precedence parameter ('Lower precedence is applied first when groups are nested'), and distinguishing sessionId vs pbipFolder for offline edits. This supplements the schema's field descriptions meaningfully.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Turn a (single-column) table into a calculation group' and explains its role as 'the engine for reusable selectors like Time Intelligence (Current/YTD/PY/YoY) applied to ANY measure.' This verb+resource+concept is specific and distinguishes it from sibling tools like add_calculation_item by noting the sequencing ('After this, add items...').

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

Usage Guidelines4/5

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

Provides clear context: it shows the workflow ('After this, add items with add_calculation_item'), explains precedence behavior ('Lower precedence is applied first when groups are nested'), and details the pbip offline alternative. However, it does not explicitly exclude alternatives such as add_time_intelligence_calc_group, so it lacks full when-not-to-use guidance.

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

Install Server

Other Tools

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/cyphonica/powerbi-pbix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server