list_redteam_tasks
Retrieve and filter red team tasks by status using this tool to monitor and manage AI safety and prompt auditing activities in real-time.
Instructions
List all redteam tasks, optionally filtered by status.
Args: status: The status to filter tasks by (e.g., "Finished"). If None, list all tasks.
Returns: A dictionary containing the list of redteam tasks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No |
Input Schema (JSON Schema)
{
"properties": {
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"title": "list_redteam_tasksArguments",
"type": "object"
}
Implementation Reference
- src/mcp_server.py:708-722 (handler)The core handler function for the 'list_redteam_tasks' MCP tool. It is registered via the @mcp.tool() decorator and implements the tool logic by calling redteam_client.get_task_list(status=status) and returning the result as a dictionary. The input schema is defined by the function signature (optional 'status' string parameter) and docstring.@mcp.tool() def list_redteam_tasks(status: Optional[str] = None) -> Dict[str, Any]: """ List all redteam tasks, optionally filtered by status. Args: status: The status to filter tasks by (e.g., "Finished"). If None, list all tasks. Returns: A dictionary containing the list of redteam tasks. """ # List redteam tasks redteam_tasks = redteam_client.get_task_list(status=status) return redteam_tasks.to_dict()