gaia_adql_query

Pack: esa-gaia · Endpoint: https://gateway.pipeworx.io/esa-gaia/mcp

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/gaia_adql_query for the schema, then POST the same URL with its arguments for the data.

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.

Parameters

NameTypeRequiredDescription
querystringyesAn 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.
limitnumbernoRow cap applied on top of any TOP in the query (default 100, max 2000).

Example call

Arguments

{
  "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",
  "limit": 5
}

curl

curl -X POST https://gateway.pipeworx.io/esa-gaia/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"gaia_adql_query","arguments":{"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","limit":5}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('gaia_adql_query', {
  "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",
  "limit": 5
});

More examples

{
  "query": "SELECT TOP 3 source_id, ra, dec, phot_g_mean_mag FROM gaiadr3.gaia_source WHERE 1 = CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 56.75, 24.1167, 0.05))"
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "esa-gaia": {
      "url": "https://gateway.pipeworx.io/esa-gaia/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 18, 2026