Skip to main content
Glama

add_calculation_item

Add a calculation item to a calculation group, using DAX to wrap SELECTEDMEASURE() for time calculations like YTD. Set display order and dynamic format strings.

Instructions

Add a calculation item to a calculation group. The DAX usually wraps SELECTEDMEASURE(), e.g. "CALCULATE(SELECTEDMEASURE(), DATESYTD('Calendar'[Date]))" for a YTD item. ordinal sets display order; formatStringExpression sets a dynamic format for that item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesitem name, e.g. YTD
tableYesthe calculation-group table
ordinalNodisplay order (optional)
sessionIdYes
daxExpressionYesDAX expression, usually over SELECTEDMEASURE()
formatStringExpressionNoDAX dynamic format-string expression for this item (optional)
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states 'Add' (mutation) and describes parameters, but does not mention side effects, reversibility, permissions, errors, or return behavior, leaving significant gaps for a state-changing tool.

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 two sentences, front-loaded with the primary purpose, and every phrase adds value. No filler or redundancy.

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?

The tool has no output schema and no annotations, and while the description covers the core purpose and optional parameters, it omits behavioral context (e.g., what happens if the calculation group doesn't exist, whether changes are reversible). It is adequate but not thorough for a mutating 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 coverage is high (83%), so the schema already describes most parameters. The description adds a helpful DAX example and clarifies the purpose of ordinal and formatStringExpression, but these largely mirror the schema descriptions.

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 action ('Add a calculation item') and the target resource ('to a calculation group'), with a concrete DAX example that distinguishes it from siblings like add_calculation_group or update_calculation_item.

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?

The description implies the tool is for creating new calculation items and provides a DAX example, but it does not explicitly contrast with alternatives like set_calc_item_ordinal or update_calculation_item, nor does it mention prerequisites (e.g., an existing calculation group).

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