list_projects
Retrieve all projects from RobotFail, showing their current status and task counts for easy tracking.
Instructions
List all your projects on RobotFail with their status and task counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- robotfail_mcp/server.py:73-78 (handler)The tool handler for list_projects. Decorated with @mcp.tool(), it calls the /api/projects endpoint via the _get helper and returns JSON.
@mcp.tool() async def list_projects() -> str: """List all your projects on RobotFail with their status and task counts.""" data = await _get("/api/projects") return json.dumps(data, indent=2) - robotfail_mcp/server.py:34-38 (helper)The HTTP GET helper used by list_projects to call the RobotFail API.
async def _get(path: str) -> dict: async with httpx.AsyncClient(timeout=30) as client: r = await client.get(f"{API_BASE}{path}", headers=_headers()) r.raise_for_status() return r.json() - robotfail_mcp/server.py:55-72 (registration)The @mcp.tool() decorator registers list_projects (and all other tool functions) with the FastMCP server. The decorator is applied directly on line 74.
@mcp.tool() async def create_project(description: str, budget_dollars: float) -> str: """Submit a new project to RobotFail. Describe what you need done in the physical world. Be specific about location, requirements, and deliverables. The PM engine decomposes it into atomic tasks and assigns them to human workers. Args: description: What you need done. Include location, requirements, deliverables. budget_dollars: Budget in USD (e.g. 50.00 = $50). Minimum $5. """ data = await _post("/api/projects", { "description": description, "budget": budget_dollars, }) return json.dumps(data, indent=2)