{"at":"2026-11-23T05:18:13.993Z","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-23T05:18:14.334Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T05:18:14.434Z","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-23T05:18:14.829Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2025-06-18","serverInfo":{"name":"headroom","version":"0.2.23"}}}}
{"at":"2026-11-23T05:18:14.829Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:18:14.829Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:18:14.829Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Return the latest quota windows for every Headroom meter.","inputSchema":{"properties":{},"type":"object"},"name":"quota_status"},{"description":"Check whether an action class can consume all of its meters. With no expect_percent, reports the learned cost and confidence for this action class; lease atomically reserves every consumed meter for the learned (or given) expectation so the next call learns too.","inputSchema":{"properties":{"action_class":{"type":"string"},"allow_unknown":{"type":"boolean"},"expect_percent":{"maximum":100,"minimum":0,"type":"number"},"lease":{"type":"boolean"},"owner":{"type":"string"}},"required":["action_class","owner"],"type":"object"},"name":"quota_can"},{"description":"Return Headroom events since an ISO timestamp or duration resolved by the caller.","inputSchema":{"properties":{"since":{"type":"string"}},"type":"object"},"name":"quota_events"},{"description":"Reserve a meter for an orchestrator. owner defaults to this MCP session's client name and session id when omitted.","inputSchema":{"properties":{"action_class":{"type":"string"},"expected_percent":{"maximum":100,"minimum":0,"type":"number"},"meter_id":{"type":"string"},"note":{"type":"string"},"owner":{"type":"string"},"ttl_ms":{"exclusiveMinimum":0,"type":"number"}},"required":["meter_id"],"type":"object"},"name":"quota_lease_start"},{"description":"End a meter lease. A different owner must set force plus confirm_force and a reason, both of which are audited.","inputSchema":{"properties":{"confirm_force":{"type":"boolean"},"force":{"type":"boolean"},"id":{"type":"string"},"owner":{"type":"string"},"reason":{"type":"string"}},"required":["id","owner"],"type":"object"},"name":"quota_lease_end"},{"description":"List meter leases and estimated spend.","inputSchema":{"properties":{},"type":"object"},"name":"quota_leases"},{"description":"Learned median, interquartile range and sample count of spent percent, per action class.","inputSchema":{"properties":{"action_class":{"type":"string"}},"type":"object"},"name":"quota_cost"},{"description":"Burn in percent per hour over the last N minutes. need selects a vendor-reported window.","inputSchema":{"properties":{"meter":{"type":"string"},"minutes":{"exclusiveMinimum":0,"type":"number"},"need":{"type":"string"},"owner":{"type":"string"}},"type":"object"},"name":"quota_rate"},{"description":"Per-owner attributed spend on shared meters: how much of each window's actual movement the spend ledger books to each lease owner, with a confidence. The owner `unattributed` is movement that happened while no lease was open. since is an ISO timestamp, defaulting to 24 hours ago.","inputSchema":{"properties":{"meter":{"type":"string"},"owner":{"type":"string"},"since":{"type":"string"}},"type":"object"},"name":"quota_spend"},{"description":"Read this session's hand-off messages from <HEADROOM_HOME>/inbox/<session>/, oldest first, marking each read. Read-only: sending a message is `headroom inbox send`, never this tool.","inputSchema":{"properties":{"session":{"type":"string"},"since":{"minimum":0,"type":"number"}},"required":["session"],"type":"object"},"name":"quota_inbox"},{"description":"Points available per remaining vendor-reported window before reset, including advisory banked-reset guidance. need selects that window.","inputSchema":{"properties":{"meter":{"type":"string"},"need":{"type":"string"},"reserve_percent":{"maximum":100,"minimum":0,"type":"number"},"target_points":{"minimum":0,"type":"number"}},"required":["meter"],"type":"object"},"name":"quota_plan"},{"description":"Pre-dispatch check for vendor-reported windows. needs accepts 5h, wk, 30d, or an exact <n>m, <n>h, or <n>d duration.","inputSchema":{"properties":{"action_class":{"type":"string"},"allowance":{"enum":["pro_rata","fill"],"type":"string"},"cap_percent":{"maximum":100,"minimum":0,"type":"number"},"duration_minutes":{"exclusiveMinimum":0,"type":"number"},"meter":{"type":"string"},"needs":{"items":{"pattern":"^(5h|wk|30d|[1-9][0-9]*[mhd]):[0-9]+(\\.[0-9]+)?$","type":"string"},"type":"array"},"owner":{"type":"string"},"plan":{"type":"boolean"},"plan_share_percent":{"minimum":0,"type":"number"},"reserve_percent":{"maximum":100,"minimum":0,"type":"number"}},"required":["needs"],"type":"object"},"name":"quota_gate"},{"description":"Returns immediately (never blocks) with the meter's reset time and a suggested sleep, for a caller that polls itself.","inputSchema":{"properties":{"meter":{"type":"string"}},"required":["meter"],"type":"object"},"name":"quota_wait"},{"description":"How many more lanes fit before a vendor-reported window resets. need selects that window.","inputSchema":{"properties":{"action_class":{"type":"string"},"allowance":{"enum":["pro_rata","fill"],"type":"string"},"duration_minutes":{"exclusiveMinimum":0,"type":"number"},"lane_cost_percent":{"exclusiveMinimum":0,"type":"number"},"meter":{"type":"string"},"need":{"type":"string"},"owner":{"type":"string"},"plan_share_percent":{"minimum":0,"type":"number"},"weekly_reserve_percent":{"maximum":100,"minimum":0,"type":"number"}},"required":["meter"],"type":"object"},"name":"quota_fill"},{"description":"Turn the text of Claude Code's /usage panel into observations, for a meter Headroom cannot poll (a denied probe, or a model-scoped weekly bar the account-wide window hides). text is the pasted panel; principal names the Claude principal and is required when more than one is configured. Stores the readings the same way a poll does, so status, gate, can, rate and route see them immediately.","inputSchema":{"properties":{"principal":{"type":"string"},"text":{"type":"string"}},"required":["text"],"type":"object"},"name":"quota_usage_paste"},{"description":"Among the principals routing.toml's [consumes] entry for this action class allows, picks the one with the most remaining headroom on its own tightest window and returns its launch environment (e.g. CLAUDE_CONFIG_DIR for a second Claude profile). Every candidate's own state and reason is reported too, not just the winner.","inputSchema":{"properties":{"action_class":{"type":"string"},"allow_unknown":{"type":"boolean"},"owner":{"type":"string"}},"required":["action_class","owner"],"type":"object"},"name":"quota_route"},{"description":"Record or refresh this orchestrator's heartbeat lease with the daemon -- the one process that survives a crashed session -- so a lapse past 2x interval_ms is noticed and, once configured, notified. owner defaults to this MCP session's client name and session id, same as quota_lease_start. resume_sentence is what a human or a fresh session should do to pick this session's work back up; omit it on a plain re-beat to keep whatever was registered before. Pass stop: true to deregister instead of beating (interval_ms and resume_sentence are ignored then).","inputSchema":{"properties":{"interval_ms":{"exclusiveMinimum":0,"type":"number"},"owner":{"type":"string"},"resume_sentence":{"type":"string"},"stop":{"type":"boolean"}},"type":"object"},"name":"quota_heartbeat"}]}}}
