agloop_get_task
Get task status, dependencies, acceptance criteria, and result log by task ID. Inspect the full details of any task to understand its progress and outcomes.
Instructions
Get details for a single task by ID. Returns task status, dependencies, acceptance criteria, and result log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/agloop_mcp/server.py:48-54 (handler)The MCP tool handler for 'agloop_get_task'. Decorated with @mcp.tool(), it accepts a task_id string, delegates to StateManager.get_task(), and returns the task as JSON or an error message.
@mcp.tool() def agloop_get_task(task_id: str) -> str: """Get details for a single task by ID. Returns task status, dependencies, acceptance criteria, and result log.""" task = _sm().get_task(task_id) if not task: return json.dumps({"error": f"Task '{task_id}' not found"}) return json.dumps(asdict(task), indent=2) - StateManager.get_task() — the core helper that loads the full state from .agloop/state.json (or recovers from a checkpoint), then iterates through tasks to find the one with the matching ID.
def get_task(self, task_id: str) -> AgLoopTask | None: state = self.get_state() if not state: return None for task in state.tasks: if task.id == task_id: return task return None - src/agloop_mcp/types.py:41-50 (schema)The AgLoopTask dataclass schema that defines the shape of task data returned by agloop_get_task.
class AgLoopTask: id: str title: str status: TaskStatus = "pending" depends_on: list[str] = field(default_factory=list) files_to_modify: list[str] = field(default_factory=list) acceptance_criteria: list[str] = field(default_factory=list) result_log: str | None = None started_at: str | None = None completed_at: str | None = None - src/agloop_mcp/server.py:48-49 (registration)Registration via the @mcp.tool() decorator on the FastMCP instance 'mcp' (line 22). This registers 'agloop_get_task' as an MCP tool.
@mcp.tool() def agloop_get_task(task_id: str) -> str: