{"at":"2026-11-23T04:13:00.063Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T04:13:01.174Z","dir":"received","era":"server_discover","message":{"error":{"code":-32602,"data":"","message":"Invalid request parameters"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T04:13:01.325Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T04:13:02.491Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"experimental":{},"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"RoastPilot MCP server with a mock-safe session runtime. This tool surface supports one in-process roast session and driver-backed roast controls before log writers land.","protocolVersion":"2025-11-25","serverInfo":{"name":"RoastPilot","version":"1.30.0"}}}}
{"at":"2026-11-23T04:13:02.491Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T04:13:02.491Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T04:13:02.494Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Return structured metadata about the running MCP server.","inputSchema":{"properties":{},"title":"get_server_infoArguments","type":"object"},"name":"get_server_info","outputSchema":{"properties":{"available_bootstrap_tools":{"items":{"type":"string"},"title":"Available Bootstrap Tools","type":"array"},"bootstrap_safe":{"title":"Bootstrap Safe","type":"boolean"},"current_phase":{"title":"Current Phase","type":"string"},"first_crack_mode":{"title":"First Crack Mode","type":"string"},"package_name":{"title":"Package Name","type":"string"},"product_name":{"title":"Product Name","type":"string"},"roaster_driver":{"title":"Roaster Driver","type":"string"},"session_presence":{"enum":["none","starting","active","stopped"],"title":"Session Presence","type":"string"},"started_at_utc":{"title":"Started At Utc","type":"string"},"transport":{"title":"Transport","type":"string"},"version":{"title":"Version","type":"string"}},"required":["product_name","package_name","version","transport","current_phase","roaster_driver","first_crack_mode","bootstrap_safe","session_presence","available_bootstrap_tools","started_at_utc"],"title":"ServerInfo","type":"object"}},{"description":"Return a bootstrap-safe summary of the active RoastPilot config.","inputSchema":{"properties":{},"title":"get_runtime_configArguments","type":"object"},"name":"get_runtime_config","outputSchema":{"properties":{"allow_manual_override":{"title":"Allow Manual Override","type":"boolean"},"auto_t0_detection_enabled":{"title":"Auto T0 Detection Enabled","type":"boolean"},"auto_t0_drop_threshold_c":{"title":"Auto T0 Drop Threshold C","type":"number"},"command_interval_seconds":{"title":"Command Interval Seconds","type":"number"},"config_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config Source"},"first_crack_mode":{"title":"First Crack Mode","type":"string"},"log_dir":{"title":"Log Dir","type":"string"},"model_precision":{"title":"Model Precision","type":"string"},"model_repo_id":{"title":"Model Repo Id","type":"string"},"roaster_baudrate":{"title":"Roaster Baudrate","type":"integer"},"roaster_driver":{"title":"Roaster Driver","type":"string"},"roaster_port":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roaster Port"},"sample_interval_seconds":{"title":"Sample Interval Seconds","type":"number"},"temperature_unit":{"title":"Temperature Unit","type":"string"}},"required":["config_source","roaster_driver","roaster_port","roaster_baudrate","temperature_unit","command_interval_seconds","first_crack_mode","model_repo_id","model_precision","allow_manual_override","log_dir","sample_interval_seconds","auto_t0_detection_enabled","auto_t0_drop_threshold_c"],"title":"RuntimeConfigSnapshot","type":"object"}},{"description":"Start one new authoritative roast session and prepare the driver.","inputSchema":{"properties":{"purpose":{"default":"roast","enum":["roast","cold_characterisation"],"title":"Purpose","type":"string"}},"title":"start_roast_sessionArguments","type":"object"},"name":"start_roast_session","outputSchema":{"$defs":{"AmbientStatus":{"description":"Serializable ambient sensor status for the roast record (#185).\n\nRead-only corpus metadata: no roaster-write or control-loop involvement.\nFail-soft by design — an absent, unplugged, or erroring probe always\nreports `unavailable` with null readings rather than raising or blocking\nthe roast.\n\nAttributes:\n    mode: Configured ambient sensor mode.\n    status: Current ambient runtime status.\n    reason: Human-readable reason when status needs extra context.\n    ambient_running: Whether the session-owned ambient runtime is prepared\n        to poll readings.\n    temperature_c: Last-known ambient temperature in Celsius, or `None`.\n    humidity_percent: Last-known relative humidity percentage, or `None`.\n    pressure_hpa: Last-known barometric pressure in hectopascals, or `None`.\n    last_reading_monotonic_seconds: Monotonic timestamp of the last\n        successful reading, or `None` if none has ever succeeded.","properties":{"ambient_running":{"default":false,"title":"Ambient Running","type":"boolean"},"humidity_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Humidity Percent"},"last_reading_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Last Reading Monotonic Seconds"},"mode":{"enum":["disabled","yoctopuce"],"title":"Mode","type":"string"},"pressure_hpa":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Pressure Hpa"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","unavailable","ok"],"title":"Status","type":"string"},"temperature_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Temperature C"}},"required":["mode","status"],"title":"AmbientStatus","type":"object"},"ColdCharacterisationObservation":{"description":"Read-only commanded roast-fan observation for a cold-characterisation session.\n\nValues are the driver's commanded state, not physical sensing.","properties":{"outcome":{"enum":["observed","not_eligible","unsupported","unreadable","malformed"],"title":"Outcome","type":"string"},"roast_fan_level_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Roast Fan Level Percent"}},"required":["outcome","roast_fan_level_percent"],"title":"ColdCharacterisationObservation","type":"object"},"ColdTemperatureProjection":{"description":"Typed cold-only temperature facts derived from one driver snapshot.\n\nAttributes:\n    projection_version: Projection grammar version, always 1.\n    outcome: Closed projection outcome.\n    configured_temperature_unit: Driver-configured raw unit mechanism.\n    reported_temperature_unit: Unit resolved for the latest counted packet.\n    last_packet_valid: Whether the driver resolved a unit for the latest\n        counted packet. Not a quality, accuracy, or freshness claim.\n    last_packet_bean_temp_c: Latest raw bean value in Celsius, only when the\n        latest packet resolved to Celsius.\n    last_packet_env_temp_c: Latest raw environment value in Celsius, only\n        when the latest packet resolved to Celsius.\n    retained_bean_temp_c: Driver-retained last-good bean temperature in Celsius.\n    retained_env_temp_c: Driver-retained last-good environment temperature\n        in Celsius.\n    value_agreement: Typed raw-versus-retained agreement only.\n    status_packet_count: Counted status packets.\n    ignored_temperature_packet_count: Counted packets with unresolved temperatures.\n    status_read_error_count: Counted status read errors.\n    command_loop_error_count: Counted command-loop errors.","properties":{"command_loop_error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Command Loop Error Count"},"configured_temperature_unit":{"anyOf":[{"enum":["celsius","fahrenheit","auto"],"type":"string"},{"type":"null"}],"default":null,"title":"Configured Temperature Unit"},"ignored_temperature_packet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Ignored Temperature Packet Count"},"last_packet_bean_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Last Packet Bean Temp C"},"last_packet_env_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Last Packet Env Temp C"},"last_packet_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Last Packet Valid"},"outcome":{"enum":["observed","awaiting_first_packet","not_eligible","unsupported","malformed"],"title":"Outcome","type":"string"},"projection_version":{"const":1,"title":"Projection Version","type":"integer"},"reported_temperature_unit":{"anyOf":[{"enum":["celsius","fahrenheit","unknown"],"type":"string"},{"type":"null"}],"default":null,"title":"Reported Temperature Unit"},"retained_bean_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Retained Bean Temp C"},"retained_env_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Retained Env Temp C"},"status_packet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Status Packet Count"},"status_read_error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Status Read Error Count"},"value_agreement":{"anyOf":[{"enum":["agree","disagree","indeterminate"],"type":"string"},{"type":"null"}],"default":null,"title":"Value Agreement"}},"required":["projection_version","outcome"],"title":"ColdTemperatureProjection","type":"object"},"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"},"FirstCrackStatus":{"description":"Serializable first-crack status for operator decisions.\n\nAttributes:\n    mode: Configured first-crack mode.\n    status: Current first-crack runtime status.\n    detected_at_utc: Authoritative detection timestamp when first crack exists.\n    detected_monotonic_seconds: Authoritative monotonic detection timestamp.\n    allow_manual_override: Whether the explicit override tool is enabled.\n    reason: Human-readable reason when status needs extra context.\n    audio_running: Whether the session-owned audio runtime is running.\n    queued_window_count: Detector windows waiting to be processed.\n    emitted_window_count: Windows emitted by the audio runtime.\n    dropped_window_count: Windows dropped by the audio runtime.\n    processed_window_count: Windows processed by the detector runtime.\n    mic_peak_dbfs: Live rolling peak mic level in dBFS while audio capture\n        runs (#178), or ``None`` when no capture is running. ``-inf`` for\n        silence — surfaces a mis-gained / dead mic under real conditions.\n    mic_rms_dbfs: Live rolling RMS mic level in dBFS while audio capture runs\n        (#178), or ``None`` when no capture is running.\n    overflow_count_last_minute: Microphone input-overflow events (#190) in\n        the trailing 60 seconds, so sustained capture degradation is\n        operator-visible here instead of stderr-only warning logs.\n    estimated_lost_audio_ms_last_minute: Estimated milliseconds of audio at\n        risk from overflow events in the trailing 60 seconds, derived\n        from the actual inter-read gap — see\n        :class:`~coffee_roaster_mcp.audio.OverflowSnapshot`.\n    total_overflow_count: Lifetime overflow event count for the current\n        capture run.\n    max_consecutive_overflow_count: Largest consecutive-overflow streak\n        observed by any active input during the current capture run.\n    last_inference_duration_ms: Elapsed duration of the latest inference\n        attempt in milliseconds.\n    max_inference_duration_ms: Largest inference-attempt duration during\n        the current session in milliseconds.\n    inference_overrun_count: Inference attempts at or beyond the effective\n        configured audio hop during the current session.","properties":{"allow_manual_override":{"title":"Allow Manual Override","type":"boolean"},"audio_running":{"default":false,"title":"Audio Running","type":"boolean"},"detected_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected At Utc"},"detected_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Detected Monotonic Seconds"},"dropped_window_count":{"default":0,"title":"Dropped Window Count","type":"integer"},"emitted_window_count":{"default":0,"title":"Emitted Window Count","type":"integer"},"estimated_lost_audio_ms_last_minute":{"default":0.0,"title":"Estimated Lost Audio Ms Last Minute","type":"number"},"inference_overrun_count":{"default":0,"title":"Inference Overrun Count","type":"integer"},"last_inference_duration_ms":{"default":0.0,"title":"Last Inference Duration Ms","type":"number"},"max_consecutive_overflow_count":{"default":0,"title":"Max Consecutive Overflow Count","type":"integer"},"max_inference_duration_ms":{"default":0.0,"title":"Max Inference Duration Ms","type":"number"},"mic_peak_dbfs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Mic Peak Dbfs"},"mic_rms_dbfs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Mic Rms Dbfs"},"mode":{"enum":["disabled","audio","manual"],"title":"Mode","type":"string"},"overflow_count_last_minute":{"default":0,"title":"Overflow Count Last Minute","type":"integer"},"processed_window_count":{"default":0,"title":"Processed Window Count","type":"integer"},"queued_window_count":{"default":0,"title":"Queued Window Count","type":"integer"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","manual","pending","detected","faulted","unavailable"],"title":"Status","type":"string"},"total_overflow_count":{"default":0,"title":"Total Overflow Count","type":"integer"}},"required":["mode","status","detected_at_utc","detected_monotonic_seconds","allow_manual_override"],"title":"FirstCrackStatus","type":"object"},"RoastSessionState":{"description":"Serializable roast session state returned by MCP tools.","properties":{"active":{"title":"Active","type":"boolean"},"ambient_status":{"$ref":"#/$defs/AmbientStatus"},"bean_ror_c_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bean Ror C Per Min"},"bean_temp_delta_60s_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bean Temp Delta 60S C"},"beans_added_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beans Added At Utc"},"beans_added_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beans Added Monotonic Seconds"},"beans_dropped_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beans Dropped At Utc"},"beans_dropped_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beans Dropped Monotonic Seconds"},"cold_characterisation_observation":{"anyOf":[{"$ref":"#/$defs/ColdCharacterisationObservation"},{"type":"null"}],"default":null},"cold_temperature_projection":{"anyOf":[{"$ref":"#/$defs/ColdTemperatureProjection"},{"type":"null"}],"default":null},"cooling_on":{"title":"Cooling On","type":"boolean"},"cooling_started_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooling Started At Utc"},"cooling_started_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cooling Started Monotonic Seconds"},"cooling_stopped_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooling Stopped At Utc"},"cooling_stopped_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cooling Stopped Monotonic Seconds"},"created_at_utc":{"title":"Created At Utc","type":"string"},"development_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Percent"},"development_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Time Seconds"},"device_state":{"anyOf":[{"$ref":"#/$defs/RoasterDeviceState"},{"type":"null"}]},"elapsed_monotonic_seconds":{"title":"Elapsed Monotonic Seconds","type":"number"},"env_ror_c_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Env Ror C Per Min"},"env_temp_delta_60s_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Env Temp Delta 60S C"},"events":{"items":{"$ref":"#/$defs/EventSnapshot"},"title":"Events","type":"array"},"fan_level_percent":{"title":"Fan Level Percent","type":"integer"},"faulted_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Faulted At Utc"},"faulted_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Faulted Monotonic Seconds"},"first_crack_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Crack At Utc"},"first_crack_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"First Crack Monotonic Seconds"},"first_crack_status":{"$ref":"#/$defs/FirstCrackStatus"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"log_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Log Dir"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"roast_elapsed_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roast Elapsed Seconds"},"session_id":{"title":"Session Id","type":"string"},"session_purpose":{"default":"roast","enum":["roast","cold_characterisation"],"title":"Session Purpose","type":"string"},"stopped_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At Utc"},"t0_status":{"$ref":"#/$defs/T0Status"}},"required":["session_id","active","phase","created_at_utc","stopped_at_utc","elapsed_monotonic_seconds","heat_level_percent","fan_level_percent","cooling_on","beans_added_at_utc","first_crack_at_utc","beans_dropped_at_utc","cooling_started_at_utc","cooling_stopped_at_utc","faulted_at_utc","beans_added_monotonic_seconds","first_crack_monotonic_seconds","beans_dropped_monotonic_seconds","cooling_started_monotonic_seconds","cooling_stopped_monotonic_seconds","faulted_monotonic_seconds","roast_elapsed_seconds","development_time_seconds","development_percent","bean_temp_delta_60s_c","env_temp_delta_60s_c","bean_ror_c_per_min","env_ror_c_per_min","device_state","t0_status","first_crack_status","ambient_status","events","log_dir"],"title":"RoastSessionState","type":"object"},"RoasterDeviceState":{"description":"Serializable configured-device state returned by MCP tools.\n\nAttributes:\n    driver: Stable driver identifier returned by the configured driver.\n    connected: Whether the driver reports an open roaster connection.\n    bean_temp_c: Current bean temperature in Celsius when available.\n    env_temp_c: Current environment temperature in Celsius when available.\n    heat_level_percent: Current heat control level.\n    fan_level_percent: Current fan control level.\n    cooling_on: Whether cooling is currently active.\n    raw_vendor_data: Flat safe diagnostic fields from the driver boundary.","properties":{"bean_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bean Temp C"},"connected":{"title":"Connected","type":"boolean"},"cooling_on":{"title":"Cooling On","type":"boolean"},"driver":{"title":"Driver","type":"string"},"env_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Env Temp C"},"fan_level_percent":{"title":"Fan Level Percent","type":"integer"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"raw_vendor_data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Raw Vendor Data","type":"object"}},"required":["driver","connected","bean_temp_c","env_temp_c","heat_level_percent","fan_level_percent","cooling_on","raw_vendor_data"],"title":"RoasterDeviceState","type":"object"},"T0Status":{"description":"Serializable automatic T0 status for operator decisions.\n\nAttributes:\n    auto_detection_enabled: Whether automatic T0 detection is enabled.\n    status: Current automatic T0 detection status.\n    charge_temperature_c: Max preheat/charge bean temperature seen before T0.\n    current_drop_c: Current drop from charge temperature when available.\n    drop_threshold_c: Configured bean-temperature drop threshold.\n    detected_bean_temperature_c: Bean temperature at the detected T0 reading.\n    reason: Human-readable reason when status needs extra context.","properties":{"auto_detection_enabled":{"title":"Auto Detection Enabled","type":"boolean"},"charge_temperature_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Temperature C"},"current_drop_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Drop C"},"detected_bean_temperature_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Detected Bean Temperature C"},"drop_threshold_c":{"title":"Drop Threshold C","type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","pending","detected","unavailable"],"title":"Status","type":"string"}},"required":["auto_detection_enabled","status","charge_temperature_c","current_drop_c","drop_threshold_c","detected_bean_temperature_c"],"title":"T0Status","type":"object"}},"properties":{"session":{"$ref":"#/$defs/RoastSessionState"}},"required":["session"],"title":"StartRoastSessionResult","type":"object"}},{"description":"Finalise one eligible cold-characterisation session without actuation.","inputSchema":{"properties":{"session_id":{"title":"Session Id","type":"string"}},"required":["session_id"],"title":"finalise_cold_characterisation_sessionArguments","type":"object"},"name":"finalise_cold_characterisation_session","outputSchema":{"$defs":{"DisconnectEvidence":{"description":"Append-only disconnect-attempt and confirmation evidence.","properties":{"attempt_count":{"default":0,"title":"Attempt Count","type":"integer"},"command_loop_stopped":{"default":"not_confirmed","enum":["confirmed","not_applicable","not_confirmed"],"title":"Command Loop Stopped","type":"string"},"connected_false_confirmed":{"default":false,"title":"Connected False Confirmed","type":"boolean"},"first_attempted_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Attempted At Utc"},"last_attempted_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Last Attempted At Utc"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Last Error"},"last_returned_without_error":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Last Returned Without Error"},"serial_closed":{"default":"not_confirmed","enum":["confirmed","not_applicable","not_confirmed"],"title":"Serial Closed","type":"string"}},"title":"DisconnectEvidence","type":"object"},"DriverCommandStateEvidence":{"description":"Validated, read-only driver lifecycle evidence with safe-zero summary.","properties":{"command_loop_error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Command Loop Error Count"},"command_loop_running":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Command Loop Running"},"command_send_attempts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Command Send Attempts"},"command_streaming_required":{"title":"Command Streaming Required","type":"boolean"},"command_write_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Command Write Count"},"connected":{"title":"Connected","type":"boolean"},"cooling_motor_on":{"title":"Cooling Motor On","type":"boolean"},"driver":{"title":"Driver","type":"string"},"drum_motor_on":{"title":"Drum Motor On","type":"boolean"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"last_command_write_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Command Write Size"},"main_fan_level_percent":{"title":"Main Fan Level Percent","type":"integer"},"non_zero_dimensions":{"items":{"type":"string"},"title":"Non Zero Dimensions","type":"array"},"roast_fan_level_percent":{"title":"Roast Fan Level Percent","type":"integer"},"safe_zero":{"title":"Safe Zero","type":"boolean"},"serial_open":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Serial Open"},"solenoid_open":{"title":"Solenoid Open","type":"boolean"},"status_packet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Packet Count"},"status_read_error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Read Error Count"}},"required":["driver","connected","command_streaming_required","command_loop_running","serial_open","heat_level_percent","roast_fan_level_percent","main_fan_level_percent","drum_motor_on","cooling_motor_on","solenoid_open","safe_zero","non_zero_dimensions","command_send_attempts","command_write_count","last_command_write_size","command_loop_error_count","status_packet_count","status_read_error_count"],"title":"DriverCommandStateEvidence","type":"object"},"DriverEvidenceRead":{"description":"One non-actuating lifecycle evidence read outcome.","properties":{"captured_at_utc":{"title":"Captured At Utc","type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"evidence":{"anyOf":[{"$ref":"#/$defs/DriverCommandStateEvidence"},{"type":"null"}]},"outcome":{"enum":["read","unsupported","unreadable","malformed"],"title":"Outcome","type":"string"}},"required":["captured_at_utc","outcome","error","evidence"],"title":"DriverEvidenceRead","type":"object"},"FinalisationFailure":{"description":"One append-only failure observed while finalising a session.","properties":{"attempt_number":{"title":"Attempt Number","type":"integer"},"code":{"title":"Code","type":"string"},"message":{"title":"Message","type":"string"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"},"stage":{"anyOf":[{"enum":["telemetry_sampler","first_crack_runtime","recording","driver_disconnect"],"type":"string"},{"const":"revalidation","type":"string"}],"title":"Stage"}},"required":["stage","code","message","attempt_number","recorded_at_utc"],"title":"FinalisationFailure","type":"object"},"FinalisationStageResult":{"description":"Outcome of one ordered finalisation stage.","properties":{"completed_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Completed At Utc"},"completed_in_attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Completed In Attempt"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Detail"},"stage":{"enum":["telemetry_sampler","first_crack_runtime","recording","driver_disconnect"],"title":"Stage","type":"string"},"status":{"default":"pending","enum":["pending","completed","incomplete","failed","not_applicable","skipped"],"title":"Status","type":"string"}},"required":["stage"],"title":"FinalisationStageResult","type":"object"},"FirstCrackRuntimeFinalisationEvidence":{"description":"First-crack capture stop evidence.","properties":{"capture_running_after_stop":{"title":"Capture Running After Stop","type":"boolean"},"final_status":{"$ref":"#/$defs/FirstCrackStatus"},"outcome":{"enum":["not_active","stopped","capture_still_running","stop_failed"],"title":"Outcome","type":"string"},"stop_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Error"}},"required":["outcome","stop_error","capture_running_after_stop","final_status"],"title":"FirstCrackRuntimeFinalisationEvidence","type":"object"},"FirstCrackStatus":{"description":"Serializable first-crack status for operator decisions.\n\nAttributes:\n    mode: Configured first-crack mode.\n    status: Current first-crack runtime status.\n    detected_at_utc: Authoritative detection timestamp when first crack exists.\n    detected_monotonic_seconds: Authoritative monotonic detection timestamp.\n    allow_manual_override: Whether the explicit override tool is enabled.\n    reason: Human-readable reason when status needs extra context.\n    audio_running: Whether the session-owned audio runtime is running.\n    queued_window_count: Detector windows waiting to be processed.\n    emitted_window_count: Windows emitted by the audio runtime.\n    dropped_window_count: Windows dropped by the audio runtime.\n    processed_window_count: Windows processed by the detector runtime.\n    mic_peak_dbfs: Live rolling peak mic level in dBFS while audio capture\n        runs (#178), or ``None`` when no capture is running. ``-inf`` for\n        silence — surfaces a mis-gained / dead mic under real conditions.\n    mic_rms_dbfs: Live rolling RMS mic level in dBFS while audio capture runs\n        (#178), or ``None`` when no capture is running.\n    overflow_count_last_minute: Microphone input-overflow events (#190) in\n        the trailing 60 seconds, so sustained capture degradation is\n        operator-visible here instead of stderr-only warning logs.\n    estimated_lost_audio_ms_last_minute: Estimated milliseconds of audio at\n        risk from overflow events in the trailing 60 seconds, derived\n        from the actual inter-read gap — see\n        :class:`~coffee_roaster_mcp.audio.OverflowSnapshot`.\n    total_overflow_count: Lifetime overflow event count for the current\n        capture run.\n    max_consecutive_overflow_count: Largest consecutive-overflow streak\n        observed by any active input during the current capture run.\n    last_inference_duration_ms: Elapsed duration of the latest inference\n        attempt in milliseconds.\n    max_inference_duration_ms: Largest inference-attempt duration during\n        the current session in milliseconds.\n    inference_overrun_count: Inference attempts at or beyond the effective\n        configured audio hop during the current session.","properties":{"allow_manual_override":{"title":"Allow Manual Override","type":"boolean"},"audio_running":{"default":false,"title":"Audio Running","type":"boolean"},"detected_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected At Utc"},"detected_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Detected Monotonic Seconds"},"dropped_window_count":{"default":0,"title":"Dropped Window Count","type":"integer"},"emitted_window_count":{"default":0,"title":"Emitted Window Count","type":"integer"},"estimated_lost_audio_ms_last_minute":{"default":0.0,"title":"Estimated Lost Audio Ms Last Minute","type":"number"},"inference_overrun_count":{"default":0,"title":"Inference Overrun Count","type":"integer"},"last_inference_duration_ms":{"default":0.0,"title":"Last Inference Duration Ms","type":"number"},"max_consecutive_overflow_count":{"default":0,"title":"Max Consecutive Overflow Count","type":"integer"},"max_inference_duration_ms":{"default":0.0,"title":"Max Inference Duration Ms","type":"number"},"mic_peak_dbfs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Mic Peak Dbfs"},"mic_rms_dbfs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Mic Rms Dbfs"},"mode":{"enum":["disabled","audio","manual"],"title":"Mode","type":"string"},"overflow_count_last_minute":{"default":0,"title":"Overflow Count Last Minute","type":"integer"},"processed_window_count":{"default":0,"title":"Processed Window Count","type":"integer"},"queued_window_count":{"default":0,"title":"Queued Window Count","type":"integer"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","manual","pending","detected","faulted","unavailable"],"title":"Status","type":"string"},"total_overflow_count":{"default":0,"title":"Total Overflow Count","type":"integer"}},"required":["mode","status","detected_at_utc","detected_monotonic_seconds","allow_manual_override"],"title":"FirstCrackStatus","type":"object"},"RecordingArtifact":{"description":"Identity and stat-only observation of one recording artifact.","properties":{"exists":{"title":"Exists","type":"boolean"},"filename":{"title":"Filename","type":"string"},"path":{"title":"Path","type":"string"},"role":{"enum":["primary_wav","recording_sidecar","annotation_session_sidecar","additional_wav"],"title":"Role","type":"string"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"required":["role","filename","path","exists","size_bytes"],"title":"RecordingArtifact","type":"object"},"RecordingFinalisationEvidence":{"description":"Recording teardown and artifact evidence.","properties":{"artifacts":{"items":{"$ref":"#/$defs/RecordingArtifact"},"title":"Artifacts","type":"array"},"expected":{"title":"Expected","type":"boolean"},"outcome":{"enum":["not_configured","finalised","not_started","failed"],"title":"Outcome","type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"required":["expected","outcome","reason","artifacts"],"title":"RecordingFinalisationEvidence","type":"object"},"SamplerFinalisationEvidence":{"description":"Bounded telemetry sampler stop evidence.","properties":{"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"owned_by_session_before_stop":{"title":"Owned By Session Before Stop","type":"boolean"},"thread_alive_after_join":{"title":"Thread Alive After Join","type":"boolean"}},"required":["owned_by_session_before_stop","thread_alive_after_join","last_error"],"title":"SamplerFinalisationEvidence","type":"object"}},"properties":{"abort_reason":{"anyOf":[{"enum":["emergency_stop","session_or_reservation_changed"],"type":"string"},{"type":"null"}],"title":"Abort Reason"},"admission_driver_evidence":{"anyOf":[{"$ref":"#/$defs/DriverEvidenceRead"},{"type":"null"}]},"attempt_number":{"title":"Attempt Number","type":"integer"},"clean":{"title":"Clean","type":"boolean"},"disconnect":{"$ref":"#/$defs/DisconnectEvidence"},"emergency_stop_ordering":{"enum":["not_reached","finalisation_committed_first","emergency_stop_before_disconnect_commit","emergency_stop_after_disconnect_attempt"],"title":"Emergency Stop Ordering","type":"string"},"failures":{"items":{"$ref":"#/$defs/FinalisationFailure"},"title":"Failures","type":"array"},"final_driver_evidence":{"anyOf":[{"$ref":"#/$defs/DriverEvidenceRead"},{"type":"null"}]},"first_crack_runtime":{"anyOf":[{"$ref":"#/$defs/FirstCrackRuntimeFinalisationEvidence"},{"type":"null"}]},"first_started_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Started At Utc"},"first_started_session_elapsed_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"First Started Session Elapsed Seconds"},"last_ended_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Ended At Utc"},"last_ended_session_elapsed_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Ended Session Elapsed Seconds"},"pre_disconnect_driver_evidence":{"anyOf":[{"$ref":"#/$defs/DriverEvidenceRead"},{"type":"null"}]},"pre_finalisation_first_crack_status":{"anyOf":[{"$ref":"#/$defs/FirstCrackStatus"},{"type":"null"}]},"recording":{"anyOf":[{"$ref":"#/$defs/RecordingFinalisationEvidence"},{"type":"null"}]},"recovered_after_failure":{"title":"Recovered After Failure","type":"boolean"},"rejection_reason":{"anyOf":[{"enum":["unknown_session","not_latest_session","session_not_active","session_purpose_not_eligible","session_faulted","command_in_progress","finalisation_in_progress","driver_lifecycle_evidence_unsupported","driver_state_unreadable","driver_state_malformed","driver_not_connected","driver_state_not_safe_zero"],"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"reservation_generation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reservation Generation"},"retained":{"title":"Retained","type":"boolean"},"sampler":{"anyOf":[{"$ref":"#/$defs/SamplerFinalisationEvidence"},{"type":"null"}]},"session_active_after":{"title":"Session Active After","type":"boolean"},"session_id":{"title":"Session Id","type":"string"},"session_phase_after":{"anyOf":[{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"type":"string"},{"type":"null"}],"title":"Session Phase After"},"session_purpose":{"anyOf":[{"enum":["roast","cold_characterisation"],"type":"string"},{"type":"null"}],"title":"Session Purpose"},"stages":{"maxItems":4,"minItems":4,"prefixItems":[{"$ref":"#/$defs/FinalisationStageResult"},{"$ref":"#/$defs/FinalisationStageResult"},{"$ref":"#/$defs/FinalisationStageResult"},{"$ref":"#/$defs/FinalisationStageResult"}],"title":"Stages","type":"array"},"status":{"enum":["rejected","clean","completed_not_clean","partial","disconnect_indeterminate","aborted"],"title":"Status","type":"string"}},"required":["session_id","session_purpose","status","clean","rejection_reason","abort_reason","retained","reservation_generation","attempt_number","recovered_after_failure","first_started_at_utc","first_started_session_elapsed_seconds","last_ended_at_utc","last_ended_session_elapsed_seconds","emergency_stop_ordering","stages","failures","admission_driver_evidence","pre_disconnect_driver_evidence","final_driver_evidence","sampler","pre_finalisation_first_crack_status","first_crack_runtime","recording","disconnect","session_active_after","session_phase_after"],"title":"SessionFinalisationResult","type":"object"}},{"description":"Return the current authoritative roast session state.","inputSchema":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Session Id"}},"title":"get_roast_stateArguments","type":"object"},"name":"get_roast_state","outputSchema":{"$defs":{"AmbientStatus":{"description":"Serializable ambient sensor status for the roast record (#185).\n\nRead-only corpus metadata: no roaster-write or control-loop involvement.\nFail-soft by design — an absent, unplugged, or erroring probe always\nreports `unavailable` with null readings rather than raising or blocking\nthe roast.\n\nAttributes:\n    mode: Configured ambient sensor mode.\n    status: Current ambient runtime status.\n    reason: Human-readable reason when status needs extra context.\n    ambient_running: Whether the session-owned ambient runtime is prepared\n        to poll readings.\n    temperature_c: Last-known ambient temperature in Celsius, or `None`.\n    humidity_percent: Last-known relative humidity percentage, or `None`.\n    pressure_hpa: Last-known barometric pressure in hectopascals, or `None`.\n    last_reading_monotonic_seconds: Monotonic timestamp of the last\n        successful reading, or `None` if none has ever succeeded.","properties":{"ambient_running":{"default":false,"title":"Ambient Running","type":"boolean"},"humidity_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Humidity Percent"},"last_reading_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Last Reading Monotonic Seconds"},"mode":{"enum":["disabled","yoctopuce"],"title":"Mode","type":"string"},"pressure_hpa":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Pressure Hpa"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","unavailable","ok"],"title":"Status","type":"string"},"temperature_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Temperature C"}},"required":["mode","status"],"title":"AmbientStatus","type":"object"},"ColdCharacterisationObservation":{"description":"Read-only commanded roast-fan observation for a cold-characterisation session.\n\nValues are the driver's commanded state, not physical sensing.","properties":{"outcome":{"enum":["observed","not_eligible","unsupported","unreadable","malformed"],"title":"Outcome","type":"string"},"roast_fan_level_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Roast Fan Level Percent"}},"required":["outcome","roast_fan_level_percent"],"title":"ColdCharacterisationObservation","type":"object"},"ColdTemperatureProjection":{"description":"Typed cold-only temperature facts derived from one driver snapshot.\n\nAttributes:\n    projection_version: Projection grammar version, always 1.\n    outcome: Closed projection outcome.\n    configured_temperature_unit: Driver-configured raw unit mechanism.\n    reported_temperature_unit: Unit resolved for the latest counted packet.\n    last_packet_valid: Whether the driver resolved a unit for the latest\n        counted packet. Not a quality, accuracy, or freshness claim.\n    last_packet_bean_temp_c: Latest raw bean value in Celsius, only when the\n        latest packet resolved to Celsius.\n    last_packet_env_temp_c: Latest raw environment value in Celsius, only\n        when the latest packet resolved to Celsius.\n    retained_bean_temp_c: Driver-retained last-good bean temperature in Celsius.\n    retained_env_temp_c: Driver-retained last-good environment temperature\n        in Celsius.\n    value_agreement: Typed raw-versus-retained agreement only.\n    status_packet_count: Counted status packets.\n    ignored_temperature_packet_count: Counted packets with unresolved temperatures.\n    status_read_error_count: Counted status read errors.\n    command_loop_error_count: Counted command-loop errors.","properties":{"command_loop_error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Command Loop Error Count"},"configured_temperature_unit":{"anyOf":[{"enum":["celsius","fahrenheit","auto"],"type":"string"},{"type":"null"}],"default":null,"title":"Configured Temperature Unit"},"ignored_temperature_packet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Ignored Temperature Packet Count"},"last_packet_bean_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Last Packet Bean Temp C"},"last_packet_env_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Last Packet Env Temp C"},"last_packet_valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Last Packet Valid"},"outcome":{"enum":["observed","awaiting_first_packet","not_eligible","unsupported","malformed"],"title":"Outcome","type":"string"},"projection_version":{"const":1,"title":"Projection Version","type":"integer"},"reported_temperature_unit":{"anyOf":[{"enum":["celsius","fahrenheit","unknown"],"type":"string"},{"type":"null"}],"default":null,"title":"Reported Temperature Unit"},"retained_bean_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Retained Bean Temp C"},"retained_env_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Retained Env Temp C"},"status_packet_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Status Packet Count"},"status_read_error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Status Read Error Count"},"value_agreement":{"anyOf":[{"enum":["agree","disagree","indeterminate"],"type":"string"},{"type":"null"}],"default":null,"title":"Value Agreement"}},"required":["projection_version","outcome"],"title":"ColdTemperatureProjection","type":"object"},"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"},"FirstCrackStatus":{"description":"Serializable first-crack status for operator decisions.\n\nAttributes:\n    mode: Configured first-crack mode.\n    status: Current first-crack runtime status.\n    detected_at_utc: Authoritative detection timestamp when first crack exists.\n    detected_monotonic_seconds: Authoritative monotonic detection timestamp.\n    allow_manual_override: Whether the explicit override tool is enabled.\n    reason: Human-readable reason when status needs extra context.\n    audio_running: Whether the session-owned audio runtime is running.\n    queued_window_count: Detector windows waiting to be processed.\n    emitted_window_count: Windows emitted by the audio runtime.\n    dropped_window_count: Windows dropped by the audio runtime.\n    processed_window_count: Windows processed by the detector runtime.\n    mic_peak_dbfs: Live rolling peak mic level in dBFS while audio capture\n        runs (#178), or ``None`` when no capture is running. ``-inf`` for\n        silence — surfaces a mis-gained / dead mic under real conditions.\n    mic_rms_dbfs: Live rolling RMS mic level in dBFS while audio capture runs\n        (#178), or ``None`` when no capture is running.\n    overflow_count_last_minute: Microphone input-overflow events (#190) in\n        the trailing 60 seconds, so sustained capture degradation is\n        operator-visible here instead of stderr-only warning logs.\n    estimated_lost_audio_ms_last_minute: Estimated milliseconds of audio at\n        risk from overflow events in the trailing 60 seconds, derived\n        from the actual inter-read gap — see\n        :class:`~coffee_roaster_mcp.audio.OverflowSnapshot`.\n    total_overflow_count: Lifetime overflow event count for the current\n        capture run.\n    max_consecutive_overflow_count: Largest consecutive-overflow streak\n        observed by any active input during the current capture run.\n    last_inference_duration_ms: Elapsed duration of the latest inference\n        attempt in milliseconds.\n    max_inference_duration_ms: Largest inference-attempt duration during\n        the current session in milliseconds.\n    inference_overrun_count: Inference attempts at or beyond the effective\n        configured audio hop during the current session.","properties":{"allow_manual_override":{"title":"Allow Manual Override","type":"boolean"},"audio_running":{"default":false,"title":"Audio Running","type":"boolean"},"detected_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected At Utc"},"detected_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Detected Monotonic Seconds"},"dropped_window_count":{"default":0,"title":"Dropped Window Count","type":"integer"},"emitted_window_count":{"default":0,"title":"Emitted Window Count","type":"integer"},"estimated_lost_audio_ms_last_minute":{"default":0.0,"title":"Estimated Lost Audio Ms Last Minute","type":"number"},"inference_overrun_count":{"default":0,"title":"Inference Overrun Count","type":"integer"},"last_inference_duration_ms":{"default":0.0,"title":"Last Inference Duration Ms","type":"number"},"max_consecutive_overflow_count":{"default":0,"title":"Max Consecutive Overflow Count","type":"integer"},"max_inference_duration_ms":{"default":0.0,"title":"Max Inference Duration Ms","type":"number"},"mic_peak_dbfs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Mic Peak Dbfs"},"mic_rms_dbfs":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Mic Rms Dbfs"},"mode":{"enum":["disabled","audio","manual"],"title":"Mode","type":"string"},"overflow_count_last_minute":{"default":0,"title":"Overflow Count Last Minute","type":"integer"},"processed_window_count":{"default":0,"title":"Processed Window Count","type":"integer"},"queued_window_count":{"default":0,"title":"Queued Window Count","type":"integer"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","manual","pending","detected","faulted","unavailable"],"title":"Status","type":"string"},"total_overflow_count":{"default":0,"title":"Total Overflow Count","type":"integer"}},"required":["mode","status","detected_at_utc","detected_monotonic_seconds","allow_manual_override"],"title":"FirstCrackStatus","type":"object"},"RoasterDeviceState":{"description":"Serializable configured-device state returned by MCP tools.\n\nAttributes:\n    driver: Stable driver identifier returned by the configured driver.\n    connected: Whether the driver reports an open roaster connection.\n    bean_temp_c: Current bean temperature in Celsius when available.\n    env_temp_c: Current environment temperature in Celsius when available.\n    heat_level_percent: Current heat control level.\n    fan_level_percent: Current fan control level.\n    cooling_on: Whether cooling is currently active.\n    raw_vendor_data: Flat safe diagnostic fields from the driver boundary.","properties":{"bean_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bean Temp C"},"connected":{"title":"Connected","type":"boolean"},"cooling_on":{"title":"Cooling On","type":"boolean"},"driver":{"title":"Driver","type":"string"},"env_temp_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Env Temp C"},"fan_level_percent":{"title":"Fan Level Percent","type":"integer"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"raw_vendor_data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Raw Vendor Data","type":"object"}},"required":["driver","connected","bean_temp_c","env_temp_c","heat_level_percent","fan_level_percent","cooling_on","raw_vendor_data"],"title":"RoasterDeviceState","type":"object"},"T0Status":{"description":"Serializable automatic T0 status for operator decisions.\n\nAttributes:\n    auto_detection_enabled: Whether automatic T0 detection is enabled.\n    status: Current automatic T0 detection status.\n    charge_temperature_c: Max preheat/charge bean temperature seen before T0.\n    current_drop_c: Current drop from charge temperature when available.\n    drop_threshold_c: Configured bean-temperature drop threshold.\n    detected_bean_temperature_c: Bean temperature at the detected T0 reading.\n    reason: Human-readable reason when status needs extra context.","properties":{"auto_detection_enabled":{"title":"Auto Detection Enabled","type":"boolean"},"charge_temperature_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Temperature C"},"current_drop_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Drop C"},"detected_bean_temperature_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Detected Bean Temperature C"},"drop_threshold_c":{"title":"Drop Threshold C","type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reason"},"status":{"enum":["disabled","pending","detected","unavailable"],"title":"Status","type":"string"}},"required":["auto_detection_enabled","status","charge_temperature_c","current_drop_c","drop_threshold_c","detected_bean_temperature_c"],"title":"T0Status","type":"object"}},"properties":{"active":{"title":"Active","type":"boolean"},"ambient_status":{"$ref":"#/$defs/AmbientStatus"},"bean_ror_c_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bean Ror C Per Min"},"bean_temp_delta_60s_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bean Temp Delta 60S C"},"beans_added_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beans Added At Utc"},"beans_added_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beans Added Monotonic Seconds"},"beans_dropped_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beans Dropped At Utc"},"beans_dropped_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Beans Dropped Monotonic Seconds"},"cold_characterisation_observation":{"anyOf":[{"$ref":"#/$defs/ColdCharacterisationObservation"},{"type":"null"}],"default":null},"cold_temperature_projection":{"anyOf":[{"$ref":"#/$defs/ColdTemperatureProjection"},{"type":"null"}],"default":null},"cooling_on":{"title":"Cooling On","type":"boolean"},"cooling_started_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooling Started At Utc"},"cooling_started_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cooling Started Monotonic Seconds"},"cooling_stopped_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cooling Stopped At Utc"},"cooling_stopped_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cooling Stopped Monotonic Seconds"},"created_at_utc":{"title":"Created At Utc","type":"string"},"development_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Percent"},"development_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Development Time Seconds"},"device_state":{"anyOf":[{"$ref":"#/$defs/RoasterDeviceState"},{"type":"null"}]},"elapsed_monotonic_seconds":{"title":"Elapsed Monotonic Seconds","type":"number"},"env_ror_c_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Env Ror C Per Min"},"env_temp_delta_60s_c":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Env Temp Delta 60S C"},"events":{"items":{"$ref":"#/$defs/EventSnapshot"},"title":"Events","type":"array"},"fan_level_percent":{"title":"Fan Level Percent","type":"integer"},"faulted_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Faulted At Utc"},"faulted_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Faulted Monotonic Seconds"},"first_crack_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Crack At Utc"},"first_crack_monotonic_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"First Crack Monotonic Seconds"},"first_crack_status":{"$ref":"#/$defs/FirstCrackStatus"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"log_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Log Dir"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"roast_elapsed_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roast Elapsed Seconds"},"session_id":{"title":"Session Id","type":"string"},"session_purpose":{"default":"roast","enum":["roast","cold_characterisation"],"title":"Session Purpose","type":"string"},"stopped_at_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stopped At Utc"},"t0_status":{"$ref":"#/$defs/T0Status"}},"required":["session_id","active","phase","created_at_utc","stopped_at_utc","elapsed_monotonic_seconds","heat_level_percent","fan_level_percent","cooling_on","beans_added_at_utc","first_crack_at_utc","beans_dropped_at_utc","cooling_started_at_utc","cooling_stopped_at_utc","faulted_at_utc","beans_added_monotonic_seconds","first_crack_monotonic_seconds","beans_dropped_monotonic_seconds","cooling_started_monotonic_seconds","cooling_stopped_monotonic_seconds","faulted_monotonic_seconds","roast_elapsed_seconds","development_time_seconds","development_percent","bean_temp_delta_60s_c","env_temp_delta_60s_c","bean_ror_c_per_min","env_ror_c_per_min","device_state","t0_status","first_crack_status","ambient_status","events","log_dir"],"title":"RoastSessionState","type":"object"}},{"description":"Set heat through the configured driver boundary.","inputSchema":{"properties":{"heat_level_percent":{"title":"Heat Level Percent","type":"integer"}},"required":["heat_level_percent"],"title":"set_heatArguments","type":"object"},"name":"set_heat","outputSchema":{"properties":{"cooling_on":{"title":"Cooling On","type":"boolean"},"fan_level_percent":{"title":"Fan Level Percent","type":"integer"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","heat_level_percent","fan_level_percent","cooling_on"],"title":"ControlCommandResult","type":"object"}},{"description":"Set fan through the configured driver boundary.","inputSchema":{"properties":{"fan_level_percent":{"title":"Fan Level Percent","type":"integer"}},"required":["fan_level_percent"],"title":"set_fanArguments","type":"object"},"name":"set_fan","outputSchema":{"properties":{"cooling_on":{"title":"Cooling On","type":"boolean"},"fan_level_percent":{"title":"Fan Level Percent","type":"integer"},"heat_level_percent":{"title":"Heat Level Percent","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","heat_level_percent","fan_level_percent","cooling_on"],"title":"ControlCommandResult","type":"object"}},{"description":"Record the authoritative beans-added event.","inputSchema":{"properties":{},"title":"mark_beans_addedArguments","type":"object"},"name":"mark_beans_added","outputSchema":{"$defs":{"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"}},"properties":{"event":{"$ref":"#/$defs/EventSnapshot"},"event_count":{"title":"Event Count","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","event","event_count"],"title":"EventCommandResult","type":"object"}},{"description":"Record the authoritative first-crack event.","inputSchema":{"properties":{},"title":"mark_first_crackArguments","type":"object"},"name":"mark_first_crack","outputSchema":{"$defs":{"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"}},"properties":{"event":{"$ref":"#/$defs/EventSnapshot"},"event_count":{"title":"Event Count","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","event","event_count"],"title":"EventCommandResult","type":"object"}},{"description":"Drop beans through the driver and record the cooling transition.","inputSchema":{"properties":{"expected_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Expected Session Id"}},"title":"drop_beansArguments","type":"object"},"name":"drop_beans","outputSchema":{"$defs":{"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"}},"properties":{"event":{"$ref":"#/$defs/EventSnapshot"},"event_count":{"title":"Event Count","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","event","event_count"],"title":"EventCommandResult","type":"object"}},{"description":"Start cooling through the driver as an explicit recovery command.","inputSchema":{"properties":{"expected_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Expected Session Id"}},"title":"start_coolingArguments","type":"object"},"name":"start_cooling","outputSchema":{"$defs":{"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"}},"properties":{"event":{"$ref":"#/$defs/EventSnapshot"},"event_count":{"title":"Event Count","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","event","event_count"],"title":"EventCommandResult","type":"object"}},{"description":"Stop cooling through the configured driver boundary.","inputSchema":{"properties":{"expected_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Expected Session Id"}},"title":"stop_coolingArguments","type":"object"},"name":"stop_cooling","outputSchema":{"$defs":{"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"}},"properties":{"event":{"$ref":"#/$defs/EventSnapshot"},"event_count":{"title":"Event Count","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","event","event_count"],"title":"EventCommandResult","type":"object"}},{"description":"Write a snapshot export for one roast session.","inputSchema":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Session Id"}},"title":"export_roast_logArguments","type":"object"},"name":"export_roast_log","outputSchema":{"properties":{"csv_path":{"title":"Csv Path","type":"string"},"jsonl_path":{"title":"Jsonl Path","type":"string"},"log_dir":{"title":"Log Dir","type":"string"},"note":{"title":"Note","type":"string"},"ready":{"title":"Ready","type":"boolean"},"session_id":{"title":"Session Id","type":"string"},"summary_path":{"title":"Summary Path","type":"string"}},"required":["session_id","log_dir","jsonl_path","csv_path","summary_path","ready","note"],"title":"ExportRoastLogResult","type":"object"}},{"description":"Call the configured driver safety method and record a fault event.","inputSchema":{"properties":{"expected_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Expected Session Id"},"reason":{"default":"manual emergency stop","title":"Reason","type":"string"}},"title":"emergency_stopArguments","type":"object"},"name":"emergency_stop","outputSchema":{"$defs":{"EventSnapshot":{"description":"Serializable roast event snapshot for MCP tool responses.","properties":{"kind":{"title":"Kind","type":"string"},"monotonic_seconds":{"title":"Monotonic Seconds","type":"number"},"payload":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"title":"Payload","type":"object"},"recorded_at_utc":{"title":"Recorded At Utc","type":"string"}},"required":["kind","recorded_at_utc","monotonic_seconds","payload"],"title":"EventSnapshot","type":"object"}},"properties":{"event":{"$ref":"#/$defs/EventSnapshot"},"event_count":{"title":"Event Count","type":"integer"},"phase":{"enum":["pre_roast","roasting","development","dropped","cooling","complete","fault"],"title":"Phase","type":"string"},"session_id":{"title":"Session Id","type":"string"}},"required":["session_id","phase","event","event_count"],"title":"EventCommandResult","type":"object"}},{"description":"Store bean origin + roast number for the next roast's audio recording.\n\nCall this BEFORE starting the roast. The recorder reads it when it creates\nthe WAVs, naming them ``mic{N}-{origin}-roast{N}.wav`` and writing a\n``{origin}-roast{N}-session.json`` so the captured audio plugs straight\ninto the coffee-first-crack-detection annotation pipeline. This is purely\nadditive metadata: it sends no hardware command. If never called,\nrecording falls back to the session id as origin and roast number 0.\n\nArgs:\n    origin: Bean origin slug (e.g. ``\"brazil\"``).\n    roast_num: 1-based roast number.\n\nReturns:\n    The stored origin and roast number.\n\nRaises:\n    ValueError: If origin is blank or roast_num is negative.\n","inputSchema":{"properties":{"origin":{"title":"Origin","type":"string"},"roast_num":{"title":"Roast Num","type":"integer"}},"required":["origin","roast_num"],"title":"set_recording_metadataArguments","type":"object"},"name":"set_recording_metadata","outputSchema":{"properties":{"origin":{"title":"Origin","type":"string"},"roast_num":{"title":"Roast Num","type":"integer"}},"required":["origin","roast_num"],"title":"SetRecordingMetadataResult","type":"object"}}]}}}
