Skip to main content
Glama

Dataset Join & Merge

join_rows

Joins two lists of JSON rows on a shared key, like a SQL join or a spreadsheet VLOOKUP, and returns the combined rows plus a summary: how many rows matched on each side, match rates, and warnings for duplicate keys, rows missing the key and key fields that exist on no row. Use it to enrich a list with fields from a lookup table (left join), keep only the overlap (inner), combine two sources into one table (full), find rows in one list that are missing from the other (leftAnti or rightAnti), or stack two same-shape lists (union). Keys match case-insensitively with whitespace trimmed by default, and the key can have a different name on each side (email on the left, contact_email on the right). Input and output rows are capped per call; a many-to-many join that would exceed the output cap is refused with the predicted row count, never truncated. Call list_capabilities for the exact limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
joinTypeNoWhich rows to keep. left (default): every left row, enriched where a match exists. inner: matched rows only. right: every right row. full: everything from both sides. leftAnti: left rows with no match on the right. rightAnti: right rows with no match on the left. union: stack both lists, no key needed.
leftRowsYesThe LEFT table: the main rows you want to keep or enrich. Each row is a JSON object; keys may differ between rows.
rightRowsYesThe RIGHT table: the lookup rows to pull matching fields from. Each row is a JSON object.
keyMatchingNonormalized (default): case-insensitive, trimmed, repeated spaces collapsed, 123 matches "123". exact: values must be identical.
rightFieldsNoOnly copy these fields from the matching right row, like choosing VLOOKUP return columns. Leave out to copy every right field.
leftKeyFieldsNoThe field name(s) on the left rows to match on, for example ["email"], or ["firstName","lastName"] for a composite key. Required for every joinType except union.
rightKeyFieldsNoThe matching field name(s) on the right rows, in the same order as leftKeyFields, for example ["contact_email"]. Leave out when the right rows use the same names as the left.
includeJoinInfoNoOn by default: every row gets _joinStatus ("matched", "left_only", "right_only") and _matchCount. Set false for rows with only your own fields.
multipleMatchesNoWhen one key matches several right rows. all (default): one output row per matching pair, like SQL. first: only the first matching right row, like VLOOKUP, so each left row appears once.
onFieldConflictNoWhen a right field has the same name as a left field. prefixRight (default): keep both, the right one renamed with rightFieldPrefix. keepLeft: ignore the right value. keepRight: overwrite the left value.
rightFieldPrefixNoPrefix for conflicting right fields when onFieldConflict is prefixRight. Default "right_", so price becomes right_price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and meets it: default normalized matching semantics (case-insensitive, trimmed, space-collapsed, numeric coercion), duplicate/missing-key warnings, a returned match-rate summary, and a hard cap behavior where oversized many-to-many joins are refused with a predicted row count rather than truncated. These are non-obvious failure and return characteristics an agent cannot infer from 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?

Two dense paragraphs: purpose first, then usage scenarios, then matching semantics, caps, and a pointer to list_capabilities. No filler sentences; every clause carries operational information.

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

Completeness5/5

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

For an 11-parameter, no-annotation, no-output-schema tool, the definition covers the return shape (combined rows plus match counts, rates, and warnings) and the cap/refusal behavior. Nothing critical for correct invocation is missing.

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 100% and each parameter (including four enums) is already fully documented in the schema, so the baseline is 3. The description adds some context — that keys may have different names per side and that keys can be composite — but largely restates matching behavior already covered by keyMatching and the key-field 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 states a specific verb and resource ('Joins two lists of JSON rows on a shared key') and grounds it with familiar analogues (SQL join, VLOOKUP). It also names the only sibling tool, list_capabilities, for limits, so the agent can route between the two without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It enumerates concrete scenarios mapping to each join mode: enrich from a lookup table (left), keep only overlap (inner), combine sources (full), find missing rows (leftAnti/rightAnti), and stack same-shape lists (union). Explicit when-to-use guidance with named alternatives, which is exactly what the dimension asks for.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.