Skip to main content
Glama

merge_queries

Join two Power Query tables on matching key columns and optionally expand selected columns from the right table. Specify join kind and key pairs for merging.

Instructions

Power Query Merge: join another query into this table on matching key columns, then optionally expand chosen columns. Appends Table.NestedJoin (+ Table.ExpandTableColumn) to the table's M query. leftKeys/rightKeys are comma-separated and must be equal length. joinKind = Inner | LeftOuter | RightOuter | FullOuter | LeftAnti | RightAnti.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
joinKindNoInner | LeftOuter | RightOuter | FullOuter | LeftAnti | RightAnti (default Inner)Inner
leftKeysYesthis table's key columns, comma-separated
rightKeysYesthe right table's key columns, comma-separated (same count as leftKeys)
sessionIdYes
rightTableYesthe query/table to merge in (the right side)
expandColumnsNocolumns from the right table to expand, comma-separated (omit to leave the merge column nested)
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 provided, the description carries the full burden of disclosure. It states that the tool 'Appends Table.NestedJoin (+ Table.ExpandTableColumn) to the table's M query,' revealing the mutating side effect. It also details constraints like 'leftKeys/rightKeys are comma-separated and must be equal length' and enumerates joinKind options, providing valuable behavioral context beyond a mere 'merge' label.

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 three sentences with no filler. The first sentence states the purpose, the second reveals the implementation, and the third covers key constraints. It is well-structured and front-loaded, making it easy for an agent to quickly grasp the tool's behavior.

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?

Given the tool's complexity (8 params, no output schema), the description provides enough context to invoke it correctly: it explains the merge operation, the parameters' roles (via schema), and the side effect on the M query. It does not describe return values, but for an in-place table modification tool this is not essential. Minor gaps like clarifying that 'table' refers to a query name are acceptable given the schema.

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 75% (6 of 8 properties documented), so the baseline is 3. The description adds the equal-length constraint for leftKeys/rightKeys and lists valid joinKind values, but these are already present in the schema (rightKeys says 'same count as leftKeys', joinKind describes the enum). The description does not add significant new meaning beyond the schema, though it does clarify the overall merge and expansion flow.

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: 'join another query into this table on matching key columns, then optionally expand chosen columns.' This is a specific verb+resource description, distinguishing it from sibling tools like append_queries (which stacks rows) and merge_columns (which concatenates columns). It also names the underlying Power Query operations, making the purpose 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?

The description implies usage for exact-match table joins via key columns, but it does not explicitly contrast with alternatives such as fuzzy_merge or append_queries. It provides an implied use case but no explicit 'use this when...' or 'instead of...' guidance, so it meets the 'implied usage' level rather than giving clear exclusions.

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