Skip to main content
Glama

filter_rows

Keep only rows that meet a condition in Power Query M by appending a Table.SelectRows step. Specify conditions like [Amount] > 0 to filter your table.

Instructions

Power Query Filter Rows: keep only the rows matching a condition. Appends Table.SelectRows(prev, each ) to the table's M query. Provide the condition referencing the row as _, e.g. "[Amount] > 0 and [Region] = "NZ"" (the 'each' is added if you omit it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
sessionIdYes
mConditionYesthe row condition, e.g. [Amount] > 0
partitionNameNopartition name (optional; defaults to the first partition)
Behavior4/5

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

With no annotations, the description carries the burden of disclosure. It explicitly states that the tool 'Appends Table.SelectRows(prev, each <condition>)' to the table's M query, which reveals the mutation behavior. It also notes the auto-handling of 'each', providing useful implementation detail 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 two sentences plus an example. It front-loads the purpose and then adds concrete implementation guidance—every sentence earns its place without redundancy.

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?

The tool has no output schema, and the description covers the core behavior and the most important parameter (mCondition) thoroughly. It doesn't mention prerequisites like an open model, but in the broader tool ecosystem this is likely inferable, so it's adequately complete for invocation.

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 50%, and the description significantly expands the meaning of mCondition by showing syntax, the '_' placeholder, and the automatic 'each' keyword. It doesn't elaborate on table/sessionId/partitionName, but these are common context identifiers and partitionName already has a schema description.

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 function: 'keep only the rows matching a condition' for Power Query Filter Rows. It also specifies the exact M operation (Table.SelectRows), which distinguishes it from sibling row-manipulation tools like remove_alternate_rows or skip_rows.

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?

The description implies using this when you need to filter rows with a custom M condition, and gives a concrete example. It doesn't explicitly mention alternatives or when not to use it, but the scope is clear enough for an agent to select it over visual-filtering siblings.

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