agloop_get_state
Retrieve the current AgLoop state including phase, tasks, iteration, and compaction context. Returns null when no active loop exists.
Instructions
Read the full AgLoop state including phase, tasks, iteration, and compaction context. Returns null if no active loop.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agloop_mcp/server.py:39-45 (handler)The `agloop_get_state` tool handler function, which uses `StateManager` to retrieve and return the full AgLoop state.
@mcp.tool() def agloop_get_state() -> str: """Read the full AgLoop state including phase, tasks, iteration, and compaction context. Returns null if no active loop.""" state = _sm().get_state() if not state: return json.dumps({"error": "No active AgLoop state found"}) return json.dumps(asdict(state), indent=2)