Adding a service¶
- Probe it first. Record what the live service actually does (parameters, error shapes,
empty results, what it does with bad input, sizes) in
RESEARCH.mdwith[seen]/[doc]labels. Several NASA services ignore bad filters or answer errors with HTTP 200. - Catalogue entry. Add a
Servicetoproviders/catalog.pyand its id toproviders/base.PROVIDER_IDS:hosts(the HTTP allow-list; include asset hosts that redirects reach),key_hostsonly if it must go through api.nasa.gov,docs_url, thecitationtext the service asks for,result_notesfor caveats every result must carry, a politeness policy (rps,concurrency) and a tinyping_url. Prefer the service's own host over the api.nasa.gov gateway when it works without a key. - Tool module. Create
tools/<service>.pywith a docstring that names the upstream and its quirks (pointing toRESEARCH.md), pydantic input models withextra="forbid", enums for anything the upstream would silently ignore, and output models that subclassToolResultBase. Name toolsnasa_<service>_<action>; descriptions at most 600 characters ending withNext:. Choose a cache class (default,static,archiveor none). Return URLs, never media bytes. Import the module intools/__init__.py. - Tests. Add the tool to
tests/helpers.EVERY_TOOL_CALL, record fixtures withscripts/record_fixtures.py record(they must passcheck), write a hermetic test intests/tools/covering the quirk paths, and a live test intests/live/test_live.py(markernetwork, plusapikeyif it spends api.nasa.gov quota). - Docs. Add
docs/providers/<service>.md(endpoint, key use, tools, quirks, citation) with frontmatter andstale_after, link it fromdocs/providers/index.mdand thezensical.tomlnav, updatesrc/nasa_mcp/resources_static/overview.md, the server instructions and the README table, add adocs/log.mdentry, then regenerate the tool reference and llms files.
Candidate for a later version: NASA CMR / Earthdata search (DESIGN.md O3).