Skip to main content
Glama

Join BigQuery tables

bigquery_join
Read-only

Combine several BigQuery tables into one queryable join, on the fly.

BigQuery-only. Pass the signed tables refs from list_accounts (2–5 tables of the SAME BigQuery connection) plus how to join them, and get back a single account_ref you use in query_data exactly like a normal account — the tap runs the JOIN inside BigQuery.

This does NOT create a new account: the ref is ephemeral (it only encodes the join order) and is discarded after the query. Result field names stay prefixed per source table (bigquery_<dataset>__<table>__<column>) so columns from different tables never collide.

joins is a list of clauses {"left": <table index>, "right": <table index>, "type": "INNER"|"LEFT"|"RIGHT"|"FULL", "on": [["left_col", "right_col"], …]} — one clause per extra table; the on pairs are ANDed. date_table/date_column choose which table's date column the query_data date range filters on. Returns {account_ref, name, tables}. If a join key is missing or the paired columns' types don't match, query_data will say so.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tables": "<tables>",
      "joins": "<joins>"
    },
    "name": "bigquery_join"
  }
}

Input Schema

NameRequiredDescriptionDefault
joinsYes
tablesYes
date_tableNo
date_columnNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description goes well beyond them by disclosing that the returned ref is ephemeral and encodes only join order, that the JOIN executes inside BigQuery, and that result columns are prefixed bigquery_<dataset>__<table>__<column> to prevent collisions. It also pre-empts a likely agent misconception ("does this persist an account?") which the annotations alone could not resolve.

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?

Front-loaded with the purpose, then scoping, then the persistence caveat, then the joins format — a logical order with no filler sentences. It is dense and relies on inline code/markup heavily, but nearly all of that density is load-bearing for a non-obvious nested structure; a short bulleted layout would read faster than the prose run-ons.

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?

Even though an output schema exists, the description still names the return shape {account_ref, name, tables} and explains what the ref is good for. Combined with the ephemerality note, prefixing rule, and error behavior, an agent has everything needed to build a valid join and consume the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must carry all parameter meaning and it does: joins is fully specified as a list of {left, right, type, on} clauses with valid type enums, an indexing scheme (table index), the rule that on pairs are ANDed, and a cardinality rule (one clause per extra table). date_table/date_column are explained as selecting which table's date column query_data filters on.

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?

States a specific verb and resource ("combine several BigQuery tables into one queryable join, on the fly") and scopes it hard: "BigQuery-only". It explicitly distinguishes itself from the sibling that creates persistent objects — "This does NOT create a new account" — so an agent can separate it from connect_account-like tools without inspecting schemas.

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?

Gives the full precondition chain: pass signed refs from list_accounts, 2-5 tables from the SAME connection, then use the returned account_ref in query_data. Names both the upstream and downstream sibling tools, and states the typed failure mode (query_data reports missing join keys or mismatched types).

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.

Resources