KosmoKrator

data

NASA CLI for AI Agents

Use the NASA CLI from KosmoKrator to call NASA tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

6 functions 6 read 0 write API key auth

NASA CLI Setup

NASA can be configured headlessly with `kosmokrator integrations:configure nasa`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure nasa --enable --read allow --write ask --json
kosmokrator integrations:doctor nasa --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key NASA_API_KEY Secret secret no API Key
url NASA_URL URL url no Base URL

Call NASA Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call nasa.nasa_get_apod '{
  "date": "example_date",
  "start_date": "example_start_date",
  "end_date": "example_end_date"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:nasa nasa_get_apod '{
  "date": "example_date",
  "start_date": "example_start_date",
  "end_date": "example_end_date"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs nasa --json
kosmo integrations:docs nasa.nasa_get_apod --json
kosmo integrations:schema nasa.nasa_get_apod --json
kosmo integrations:search "NASA" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to NASA.

nasa.nasa_get_apod

Read read

Get the NASA Astronomy Picture of the Day (APOD). Returns the daily astronomical image or photo along with an explanation written by a professional astronomer. You can request a specific date or a range of dates.

Parameters
date, start_date, end_date

Generic CLI call

kosmo integrations:call nasa.nasa_get_apod '{"date":"example_date","start_date":"example_start_date","end_date":"example_end_date"}' --json

Provider shortcut

kosmo integrations:nasa nasa_get_apod '{"date":"example_date","start_date":"example_start_date","end_date":"example_end_date"}' --json

nasa.nasa_get_asteroid

Read read

Get detailed information about a specific Near Earth Object (asteroid) by its NASA ID. Returns orbital data, estimated diameter, close approach history, and hazard assessment.

Parameters
id

Generic CLI call

kosmo integrations:call nasa.nasa_get_asteroid '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:nasa nasa_get_asteroid '{"id":"example_id"}' --json

nasa.nasa_get_asteroids

Read read

Get Near Earth Objects (asteroids) for a date range from NASA. Returns a list of asteroids with their estimated diameter, velocity, distance from Earth, and whether they are potentially hazardous.

Parameters
start_date, end_date

Generic CLI call

kosmo integrations:call nasa.nasa_get_asteroids '{"start_date":"example_start_date","end_date":"example_end_date"}' --json

Provider shortcut

kosmo integrations:nasa nasa_get_asteroids '{"start_date":"example_start_date","end_date":"example_end_date"}' --json

nasa.nasa_get_current_user

Read read

Get information about the current NASA API configuration. The NASA API is public and does not require user authentication — this tool returns the API key status and available endpoints.

Parameters
none

Generic CLI call

kosmo integrations:call nasa.nasa_get_current_user '{}' --json

Provider shortcut

kosmo integrations:nasa nasa_get_current_user '{}' --json

nasa.nasa_get_mars_rover_photos

Read read

Get photos from NASA Mars rovers (Curiosity, Opportunity, Spirit, Perseverance). Query by sol (Martian day) or Earth date, and optionally filter by camera. Returns photo URLs and metadata.

Parameters
rover, sol, earth_date, camera, page

Generic CLI call

kosmo integrations:call nasa.nasa_get_mars_rover_photos '{"rover":"example_rover","sol":1,"earth_date":"example_earth_date","camera":"example_camera","page":1}' --json

Provider shortcut

kosmo integrations:nasa nasa_get_mars_rover_photos '{"rover":"example_rover","sol":1,"earth_date":"example_earth_date","camera":"example_camera","page":1}' --json

nasa.nasa_search_images

Read read

Search the NASA Image and Video Library for space, astronomy, and mission imagery. Returns image URLs, titles, descriptions, and metadata from NASA's vast collection.

Parameters
q, media_type, page

Generic CLI call

kosmo integrations:call nasa.nasa_search_images '{"q":"example_q","media_type":"example_media_type","page":1}' --json

Provider shortcut

kosmo integrations:nasa nasa_search_images '{"q":"example_q","media_type":"example_media_type","page":1}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

nasa.nasa_get_apod

Get the NASA Astronomy Picture of the Day (APOD). Returns the daily astronomical image or photo along with an explanation written by a professional astronomer. You can request a specific date or a range of dates.

Operation
Read read
Schema command
kosmo integrations:schema nasa.nasa_get_apod --json
ParameterTypeRequiredDescription
date string no A specific date in YYYY-MM-DD format (defaults to today).
start_date string no Start date for a date range in YYYY-MM-DD format. Use with end_date to get multiple APOD entries.
end_date string no End date for a date range in YYYY-MM-DD format. Must be used together with start_date.

nasa.nasa_get_asteroid

Get detailed information about a specific Near Earth Object (asteroid) by its NASA ID. Returns orbital data, estimated diameter, close approach history, and hazard assessment.

Operation
Read read
Schema command
kosmo integrations:schema nasa.nasa_get_asteroid --json
ParameterTypeRequiredDescription
id string yes The asteroid's unique NASA ID (e.g., "2534304"). You can find IDs using the nasa_get_asteroids tool.

nasa.nasa_get_asteroids

Get Near Earth Objects (asteroids) for a date range from NASA. Returns a list of asteroids with their estimated diameter, velocity, distance from Earth, and whether they are potentially hazardous.

Operation
Read read
Schema command
kosmo integrations:schema nasa.nasa_get_asteroids --json
ParameterTypeRequiredDescription
start_date string no Start date in YYYY-MM-DD format (defaults to today).
end_date string no End date in YYYY-MM-DD format (max 7 days after start_date).

nasa.nasa_get_current_user

Get information about the current NASA API configuration. The NASA API is public and does not require user authentication — this tool returns the API key status and available endpoints.

Operation
Read read
Schema command
kosmo integrations:schema nasa.nasa_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

nasa.nasa_get_mars_rover_photos

Get photos from NASA Mars rovers (Curiosity, Opportunity, Spirit, Perseverance). Query by sol (Martian day) or Earth date, and optionally filter by camera. Returns photo URLs and metadata.

Operation
Read read
Schema command
kosmo integrations:schema nasa.nasa_get_mars_rover_photos --json
ParameterTypeRequiredDescription
rover string yes Rover name: "curiosity", "opportunity", "spirit", or "perseverance".
sol integer no The sol (Martian day) number. Use this OR earth_date, not both.
earth_date string no Earth date in YYYY-MM-DD format. Use this OR sol, not both.
camera string no Camera abbreviation: FHAZ, RHAZ, MAST, CHEMCAM, MAHLI, MARDI, NAVCAM, PANCAM, MINITES, etc.
page integer no Page number for pagination (default 1, 25 photos per page).

nasa.nasa_search_images

Search the NASA Image and Video Library for space, astronomy, and mission imagery. Returns image URLs, titles, descriptions, and metadata from NASA's vast collection.

Operation
Read read
Schema command
kosmo integrations:schema nasa.nasa_search_images --json
ParameterTypeRequiredDescription
q string yes The search query (e.g., "moon landing", "Mars", "black hole", "Saturn rings").
media_type string no Filter by media type: "image", "video", or "audio". Defaults to all types.
page integer no Page number for pagination (default 1).

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.