Skip to main content
Glama
S-CurveLabs

letin

Official
by S-CurveLabs

apply_transform

Add a standard Power Query step to a query with predefined action and parameters, optionally after a named step.

Instructions

Add a standard Power Query step without hand-writing M. action and params come from list_transforms, e.g. action='unpivot_other_columns', params={'keep_columns': ['Region']}; or action='group_by', params={'group_columns': ['Region'], 'aggregations': [{'name': 'Total', 'operation': 'sum', 'column': 'Amount'}]}. The step is appended to the end unless after_step names an earlier step (the next step is rewired, as the editor does).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
actionYes
paramsYes
sourceYes
dry_runNo
step_nameNo
after_stepNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden. It discloses that the step is appended to the end unless after_step names an earlier step, and that the next step is rewired, which is useful behavioral context. However, it does not mention the effect on the query, whether the operation is reversible, or what dry_run does, leaving gaps in transparency.

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 concise (two sentences) and front-loaded with the purpose. The examples are structured and aid comprehension. It avoids fluff and gets to the point efficiently, though the second sentence could be split for readability.

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 output schema, and no annotations, the description is incomplete. It covers the core logic (action, params, after_step) but omits source, query, dry_run, and step_name entirely. It also does not describe the return value or any error behavior. Given the complexity, this is a significant gap in contextual completeness.

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%, so the description must compensate. It richly explains action and params with examples, and clarifies after_step. However, it does not explain source, query, dry_run, or step_name, which are part of the 7 parameters. While the key complex parameters are covered, the incomplete coverage of the full parameter set prevents a higher score.

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 tool adds a standard Power Query step without hand-writing M, and gives concrete examples. It distinguishes itself from hand-writing M but does not explicitly differentiate from sibling step-modification tools like rename_step or remove_step. The purpose is specific and unambiguous.

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?

It references list_transforms as the source for action and params, implying the user should consult that tool first. It also explains the after_step behavior, which is a key usage nuance. However, it does not explicitly state when to use this tool versus alternatives or when not to use it, leaving some inference required.

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