Skip to main content
Glama
jgravelle
by jgravelle

join_datasets

Read-only

Join two indexed datasets on shared columns to combine data via SQL JOIN. Supports inner, left, right, and cross joins with column projection and row limits.

Instructions

Join two indexed datasets via SQL JOIN. Uses ATTACH DATABASE to combine two SQLite stores into one query. Supports inner, left, right, and cross joins. Use columns_a/columns_b to project — reduces tokens on wide tables. Row limit capped at 500. Prefer aggregate() on join results for summaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows returned (default 50, hard cap 500)
offsetNoPagination offset (default 0)
order_byNoColumn to sort results by
columns_aNoColumns to select from dataset_a (default: first 30)
columns_bNoColumns to select from dataset_b (default: first 30)
dataset_aYesFirst dataset identifier (left side of join)
dataset_bYesSecond dataset identifier (right side of join)
filters_aNoPre-filter dataset_a rows (same syntax as get_rows filters)
filters_bNoPre-filter dataset_b rows (same syntax as get_rows filters)
join_typeNoJoin type (default 'inner')inner
order_dirNoSort direction (default 'asc')asc
join_column_aYesColumn from dataset_a to join on
join_column_bYesColumn from dataset_b to join on
Behavior4/5

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

Given the readOnlyHint annotation, the description adds valuable behavioral context: it uses ATTACH DATABASE, caps row limit at 500, supports specific join types, and suggests projection to reduce tokens. It does not contradict the annotation and provides useful implementation details.

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 a short, front-loaded set of 5 sentences that each add value: purpose, mechanism, join types, projection guidance, and row limit. No filler or 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?

For a complex 13-parameter tool without an output schema, the description covers the core behavior, row limit, projection utility, and an alternative for summaries. It could mention prerequisites like the need for datasets to be indexed, but given full schema coverage, the description is sufficiently complete.

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 descriptions cover 100% of parameters, so baseline is 3. The description adds meaning beyond the schema by explaining that columns_a/columns_b are for projection and can reduce tokens on wide tables, which is not fully captured in the schema. It also reiterates the hard row cap.

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 two indexed datasets via SQL JOIN.' It distinguishes itself from siblings by specifying it combines two SQLite stores via ATTACH DATABASE and supports specific join types, setting it apart from tools like run_sql or get_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 provides context on when to use the tool (joining indexed datasets) and advises 'Prefer aggregate() on join results for summaries,' offering an alternative for summaries. It lacks explicit exclusions (e.g., 'not for single-dataset queries') but is otherwise clear.

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/jgravelle/jdatamunch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server