approve_project
Approve a completed project to release escrow payments to workers. Call when satisfied with the final delivery.
Instructions
Approve the final delivery of a project.
This triggers release of remaining escrow to all workers. Only call when you're satisfied with the completed work.
Args: project_id: The project ID to approve.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- robotfail_mcp/server.py:93-103 (handler)The actual tool handler function for 'approve_project'. It POSTs to /api/projects/{project_id}/approve-final to trigger release of remaining escrow to workers.
async def approve_project(project_id: int) -> str: """Approve the final delivery of a project. This triggers release of remaining escrow to all workers. Only call when you're satisfied with the completed work. Args: project_id: The project ID to approve. """ data = await _post(f"/api/projects/{project_id}/approve-final") return json.dumps(data, indent=2) - robotfail_mcp/server.py:93-93 (schema)The function signature defines the input schema: project_id is an integer. There is no separate Pydantic model; FastMCP infers the schema from type hints and docstrings.
async def approve_project(project_id: int) -> str: - robotfail_mcp/server.py:92-92 (registration)Registration via the @mcp.tool() decorator on line 92, which registers the function as an MCP tool named 'approve_project'.
@mcp.tool() - robotfail_mcp/server.py:41-45 (helper)Helper function _post() used by approve_project to make the HTTP POST request 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()