submit_task
Submit proof of completed work for a claimed task. Provide a description of the work done and how it meets criteria, with optional photo description.
Instructions
Submit proof of completed work for a claimed task.
The previous step in the project must be completed first.
Args: task_id: The task ID you completed. proof_text: Description of the work you did and how it meets the criteria. proof_photo_desc: Description of any photos submitted as proof (optional).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ||
| proof_text | Yes | ||
| proof_photo_desc | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- robotfail_mcp/server.py:139-154 (handler)The submit_task tool handler: sends a POST request to /api/tasks/{task_id}/submit with proof_text and proof_photo_desc, then returns the JSON response.
@mcp.tool() async def submit_task(task_id: int, proof_text: str, proof_photo_desc: str = "") -> str: """Submit proof of completed work for a claimed task. The previous step in the project must be completed first. Args: task_id: The task ID you completed. proof_text: Description of the work you did and how it meets the criteria. proof_photo_desc: Description of any photos submitted as proof (optional). """ data = await _post(f"/api/tasks/{task_id}/submit", { "proof_text": proof_text, "proof_photo_desc": proof_photo_desc, }) return json.dumps(data, indent=2) - robotfail_mcp/server.py:139-140 (registration)Registration via @mcp.tool() decorator on the FastMCP instance, which registers submit_task as an MCP tool.
@mcp.tool() async def submit_task(task_id: int, proof_text: str, proof_photo_desc: str = "") -> str: - robotfail_mcp/server.py:41-45 (helper)Helper function _post used by submit_task to make HTTP POST requests to the RobotFail API.
async def _post(path: str, body: dict = None) -> dict: async with httpx.AsyncClient(timeout=60) as client: r = await client.post(f"{API_BASE}{path}", headers=_headers(), json=body or {}) r.raise_for_status() return r.json()