API Reference¶
FastMCP server factory, run registry, event models, and configuration types used by the MCP tools and resources.
Server¶
Registry¶
-
class rampa.mcp.registry.RunRecord¶class rampa.mcp.registry.RunRecord¶
Bases:
objectPer-run state in the registry.
Examples
>>> r = RunRecord(run_id="abc", script_path="test.py", started_at=0.0) >>> r.is_complete False
-
class rampa.mcp.registry.RuntimeRun¶class rampa.mcp.registry.RuntimeRun¶
Bases:
objectNon-serializable async state for an active run.
Held only while the run is in flight; the registry drops it on completion so the metric engine threads and client sessions behind it are released.
Examples
>>> import rampa.mcp.registry
Events¶
The tools and resources hand back rampa’s own event types, which the
library API Reference documents: a finished run arrives as a
RunResult carrying a
RunStatus, and a live run streams
PhaseEvent,
SnapshotEvent, and
ThresholdEvent.
Configuration¶
You describe a run with the same Config the CLI
loads, built from ScenarioConfig entries and
their Stage ramps.
Metrics¶
Metric and threshold queries answer with a
MetricSnapshot, a
ThresholdResult per threshold, and the
ThresholdExpression each one was parsed
from.