datalab_query
Pack: noirlab-datalab · Endpoint: https://gateway.pipeworx.io/noirlab-datalab/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/datalab_query for the schema, then POST the same URL with its arguments for the data.
Run an ADQL (SQL) query against NSF NOIRLab Astro Data Lab — the DECam, Mayall and Blanco
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sql | string | yes | An ADQL SELECT. Tables are fully qualified schema.table, e.g. |
limit | number | no | Row ceiling injected as SELECT TOP n when the query has none (default 100, max 1000). |
Example call
Arguments
{
"sql": "SELECT ra, dec, phot_g_mean_mag FROM gaia_dr3.gaia_source WHERE phot_g_mean_mag < 6",
"limit": 5
}
curl
curl -X POST https://gateway.pipeworx.io/noirlab-datalab/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"datalab_query","arguments":{"sql":"SELECT ra, dec, phot_g_mean_mag FROM gaia_dr3.gaia_source WHERE phot_g_mean_mag < 6","limit":5}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('datalab_query', {
"sql": "SELECT ra, dec, phot_g_mean_mag FROM gaia_dr3.gaia_source WHERE phot_g_mean_mag < 6",
"limit": 5
});
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"noirlab-datalab": {
"url": "https://gateway.pipeworx.io/noirlab-datalab/mcp"
}
}
}
See Getting Started for client-specific install steps.