Skip to content

MCP Tools

github-actions[bot] edited this page Sep 28, 2026 · 1 revision

The server registers 7 MCP tools. The astroquery_* tools are generic: they can discover and call any archive function listed under Archives. The ads_* tools are optimized shortcuts for literature search.

Tool Summary
astroquery_list_modules List all available astroquery modules/services.
astroquery_list_functions List available functions for a module.
astroquery_get_function_info Get detailed information about a specific function.
astroquery_check_auth Check authentication status for all services.
astroquery_execute Execute any astroquery function.
ads_query_compact Search NASA ADS and return a compact list of papers.
ads_get_paper Get details for a specific paper by bibcode.

astroquery_list_modules

List all available astroquery modules/services.

Returns a list of modules like simbad, mast, ads, vizier, etc. with availability status.

Parameters

No parameters.

Returns

Dict with module_count and list of modules with name, class_path, available.

astroquery_list_functions

List available functions for a module.

Parameters

Parameter Type Default Description
module_name string or null null Module to list functions for (e.g., 'simbad'). If None, lists all functions from all modules.

Returns

Dict with function_count and list of functions with name, description, parameters.

astroquery_get_function_info

Get detailed information about a specific function.

Parameters

Parameter Type Default Description
module_name (required) string Module name (e.g., 'simbad')
function_name (required) string Function name (e.g., 'query_object')

Returns

Detailed function info including all parameters with types and descriptions.

astroquery_check_auth

Check authentication status for all services.

Returns diagnostic information about which services are authenticated, which environment variables are set, and any issues detected.

Parameters

No parameters.

Returns

Dict with authentication status for each service.

astroquery_execute

Execute any astroquery function.

Parameters

Parameter Type Default Description
module_name (required) string Module name (e.g., 'simbad', 'mast', 'ads', 'vizier')
function_name (required) string Function name (e.g., 'query_object', 'query_region')
params object or null null Parameters to pass to the function. Special handling:
- Coordinates: Pass as {"ra": 10.68, "dec": 41.27} or object name string
- Radius: Pass as {"value": 5, "unit": "arcmin"} or just a number (arcmin)
max_rows integer 20 Maximum rows returned for MAST query_region results (default: 20). The response reports total_rows and truncated so callers can tell.

Returns

Dict with success status and serialized result (tables converted to dicts).

Examples

# SIMBAD object query
astroquery_execute("simbad", "query_object", {"object_name": "M31"})

# SIMBAD region query
astroquery_execute("simbad", "query_region", {
    "coordinates": {"ra": 10.68, "dec": 41.27},
    "radius": {"value": 5, "unit": "arcmin"}
})

# MAST observations query
astroquery_execute("mast", "query_region", {
    "coordinates": "M31",
    "radius": 0.1
})

# Vizier catalog query
astroquery_execute("vizier", "query_object", {
    "object_name": "M31",
    "catalog": "II/246"
})

ads_query_compact

Search NASA ADS and return a compact list of papers.

Returns only the chosen set of fields for each paper, so results stay short and easy to scan. Use this instead of astroquery_execute for most ADS queries.

Parameters

Parameter Type Default Description
query_string (required) string ADS query string (e.g., "black hole X-ray", "author:Smith")
fields "minimal" | "standard" | "extended" | "full" "standard" Which fields to return for each paper:
- "minimal": bibcode, title, first_author, year, citation_count. Best for browsing many results.
- "standard" (default): minimal + author, pubdate, doi, pub (journal), abstract. Good for most queries.
- "extended": standard + volume, page, keyword.
- "full": every field ADS returns. Rarely needed. All presets list at most 10 authors and shorten abstracts to 200 characters.
max_results integer 10 Maximum number of papers to return (default: 10)
sort string "citation_count desc" Sort order (default: "citation_count desc")

Returns

Dict with success status, count, results list, and metadata.

Examples

# Browse many papers quickly
ads_query_compact("NGC 3783", fields="minimal", max_results=20)

# Authors, journal and short abstracts
ads_query_compact("black hole X-ray variability", fields="standard")

# Add keywords and publication details
ads_query_compact("AGN feedback", fields="extended", max_results=5)

ads_get_paper

Get details for a specific paper by bibcode.

Use this after ads_query_compact to get full details about a specific paper of interest. Returns all metadata including full author list.

Parameters

Parameter Type Default Description
bibcode (required) string ADS bibcode (e.g., "2023ApJ...123..456S")
include_abstract boolean true Include the full abstract (default: True)

Returns

Dict with success status and full paper details, including all authors.

Examples

# 1. Find papers with compact query
results = ads_query_compact("NGC 3783", fields="minimal", max_results=10)

# 2. Get bibcode of interesting paper
bibcode = results["results"][0]["bibcode"]

# 3. Get full details
paper = ads_get_paper(bibcode, include_abstract=True)

Server instructions

This text is sent to the AI client when it connects, to explain how to use the tools.

MCP server for astronomical data queries via astroquery.

## Coordinates (COMMONLY USED)
Astronomical coordinate operations via SkyCoord:
- Resolve names: astroquery_execute("coordinates", "from_name", {"name": "M31"})
- Get constellation: astroquery_execute("coordinates", "get_constellation", ...)
- Search nearby: astroquery_execute("coordinates", "search_around_sky", ...)

Returns rich coordinate data: RA/Dec (deg + HMS/DMS), Galactic, multiple frames

## ADS Queries (RECOMMENDED)
Literature search tools that return only the fields you need:
- `ads_query_compact()` - Search ADS and get a short list of papers
- `ads_get_paper()` - Get full details for a specific bibcode

Example ADS workflow:
1. ads_query_compact("NGC 3783", fields="minimal", max_results=10)
2. Pick interesting paper from results
3. ads_get_paper(bibcode, include_abstract=True)

## Generic Queries
Use these for other services or advanced queries:
- `astroquery_list_modules()` - See available services (SIMBAD, ADS, MAST, etc.)
- `astroquery_list_functions()` - See what functions a module provides
- `astroquery_get_function_info()` - Get detailed parameter info for a function
- `astroquery_execute()` - Call any astroquery function (returns ALL fields)

Example generic workflow:
1. astroquery_list_modules() -> see available modules
2. astroquery_list_functions("simbad") -> see SIMBAD functions
3. astroquery_get_function_info("simbad", "query_object") -> see parameters
4. astroquery_execute("simbad", "query_object", {"object_name": "M31"}) -> run query

Note: Generic astroquery_execute() for ADS returns every field ADS has for each paper.
Use ads_query_compact() instead for shorter results.

Clone this wiki locally