Direct tool calls (Python) — no agents¶
Every tool is a plain function. Useful for scripting, testing, or driving from another MCP client:
from cosmotron_mcp.server import bootstrap_session
from cosmotron_mcp.tools import ingest_to_session, compute_cls_from_session
# 1. pin a session (resolves pipeline params; `survey=` applies a profile)
s = bootstrap_session("/data/my_catalogue", "power spectrum nside=512")
session_dir = s["session_dir"]
# 2. standardise the catalogue → manifest.json
ingest_to_session(session_dir, z_edges=[0.1, 0.5, 0.9]) # tomographic
# 3. compute Cℓ for a bin (reads authoritative params from the session)
cls = compute_cls_from_session(session_dir, bin_index=0)
survey= matches a catalogue-type profile by name/alias (e.g. survey="glass"
applies the built-in profile for the maintainer's synthetic log-normal mock
catalogues, used in this repo's own tests — not a real telescope survey; see
Catalogue-type profiles).
There's no agent in this path — you're responsible for calling tools in the
right order and handling any needs_input/error payload yourself. See the
API reference for every tool's signature and the
Session model for what each JSON file means.