Skip to main content
Glama

Gaia Adql Query

gaia_adql_query
Read-onlyIdempotent

Run a read-only ADQL (SQL-like) query against the ESA Gaia archive, the full DR3 catalogue plus its cross-match and variability tables, for questions a cone search cannot express: colour-magnitude cuts, proper-motion selections, cluster membership, cross-matches to 2MASS/SDSS/Hipparcos. Only SELECT is permitted and results are capped at 2,000 rows. Main table: gaiadr3.gaia_source.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "limit": 5,
      "query": "SELECT source_id, ra, dec, parallax, phot_g_mean_mag FROM gaiadr3.gaia_source WHERE parallax > 200 ORDER BY phot_g_mean_mag ASC"
    },
    "name": "gaia_adql_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRow cap applied on top of any TOP in the query (default 100, max 2000).
queryYesAn ADQL SELECT statement, e.g. "SELECT TOP 10 source_id, ra, dec, phot_g_mean_mag FROM gaiadr3.gaia_source WHERE parallax > 100 ORDER BY phot_g_mean_mag ASC". Geometry uses CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', ra0, dec0, radius_deg)) = 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so safety is covered. The description adds substantive behavior beyond that: SELECT-only enforcement and a 2,000-row result cap, plus the archive's table composition. It stops short of describing error behavior or response shape, but no output schema exists to carry that either.

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 sentences, front-loaded with the verb and resource, then the disambiguating use cases, then the guardrails. Every clause carries information an agent would otherwise have to guess.

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 a two-parameter free-form query tool with full schema coverage and no output schema, nothing essential is missing: the substrate table, permitted statement type, row cap, and sibling boundary are all stated.

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 100%, so both parameters are already documented, establishing a baseline of 3. The description earns one more by naming the main table (gaiadr3.gaia_source), which directly guides how to author the free-form query parameter rather than repeating schema text.

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 ("Run a read-only ADQL query against the ESA Gaia archive") and scopes it to the DR3 catalogue plus cross-match and variability tables. It explicitly differentiates from the sibling gaia_cone_search by naming the query classes a cone search cannot express.

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?

Names the alternative (cone search) and the condition that selects this tool: colour-magnitude cuts, proper-motion selections, cluster membership, cross-matches to 2MASS/SDSS/Hipparcos. It also states the hard constraint (SELECT only) so an agent knows when this tool will refuse a request.

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.