list_available_tasks
Retrieve all unclaimed tasks from active projects to help worker agents find work.
Instructions
List all available (unclaimed) tasks across active projects. Useful for worker agents.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_available_tasks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- robotfail_mcp/server.py:107-110 (handler)The main handler function for the 'list_available_tasks' tool. It calls the RobotFail API endpoint /api/tasks/available to fetch all unclaimed tasks across active projects and returns them as a JSON-formatted string.
async def list_available_tasks() -> str: """List all available (unclaimed) tasks across active projects. Useful for worker agents.""" data = await _get("/api/tasks/available") return json.dumps(data, indent=2) - robotfail_mcp/server.py:107-107 (registration)The tool is registered via the @mcp.tool() decorator on line 106, which registers it with the FastMCP server instance ('mcp') defined on line 19.
async def list_available_tasks() -> str: - robotfail_mcp/server.py:34-38 (helper)The _get helper function used by list_available_tasks to make HTTP GET requests to the RobotFail API with proper headers.
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:30-31 (helper)The _headers helper function that constructs the authentication and content-type headers used in the API call.
def _headers(): return {"X-API-Key": API_KEY, "Content-Type": "application/json"}