Skip to main content
Glama

refactor_to_calculation_groups

Detect similar measures (e.g., X YTD/QTD/MTD) and consolidate them into a calculation group. Optionally apply the change with auto_apply.

Instructions

Detect measures that share structure (e.g. X YTD/QTD/MTD) and consolidate into a calculation group.

Returns the plan + (optionally) writes the calc group if auto_apply=True.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes
inspectorNo
auto_applyNo
measure_writerNo
min_candidatesNo
preserve_originalsNo
reconcile_strategyNostrict

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It mentions that it returns a plan and optionally writes the calc group if auto_apply=True, but it omits critical behaviors like whether original measures are preserved (preserve_originals), how reconcile_strategy affects the outcome, and any side effects beyond the write. This is minimal disclosure for a mutation-capable tool.

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

Conciseness4/5

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

The description is two sentences with no fluff, front-loading the purpose and an example before the outcome. It is concise and readable, though it sacrifices detail for brevity.

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

Completeness2/5

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

For a tool with 7 parameters, no schema descriptions, and no annotations, the description is severely incomplete. It does not explain the role of most parameters, the nature of the returned plan, or the side effects beyond an optional write. Even with an output schema present, an agent cannot reliably invoke this tool based on the description alone.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must explain the parameters. It only touches auto_apply implicitly (via the 'if auto_apply=True' clause) and ignores target, inspector, measure_writer, min_candidates, preserve_originals, and reconcile_strategy. This provides virtually no help for an agent selecting correct arguments.

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 description clearly states the action (detect and consolidate) and the resource (measures into a calculation group), with a concrete example of shared structure (X YTD/QTD/MTD). It is distinct from siblings like plan_change or apply_plan, but does not explicitly name an alternative, 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?

The description implies usage when measures share structural patterns, giving context but no explicit guidance on when not to use or which alternative to pick. It does not reference sibling tools or prerequisites, so the guidance is only implied.

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