Skip to main content
Glama

list_live_algorithms

Retrieve and filter live trading algorithms by status or time range to monitor active strategies.

Instructions

List live algorithms with optional filters.

Args: status: Optional status filter (e.g., "Running", "Stopped") start: Optional start time (Unix timestamp) end: Optional end time (Unix timestamp)

Returns: Dictionary containing list of live algorithms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNo
startNo
endNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_live_algorithms' MCP tool. It is decorated with @mcp.tool() for automatic registration and schema generation. Authenticates using QuantConnect auth, sends POST to 'live/list' endpoint with optional filters (status, start, end timestamps), parses response, and returns success/error dict with list of live algorithms or error details.
    @mcp.tool()
    async def list_live_algorithms(
        status: Optional[str] = None,
        start: Optional[int] = None,
        end: Optional[int] = None,
    ) -> Dict[str, Any]:
        """
        List live algorithms with optional filters.
    
        Args:
            status: Optional status filter (e.g., "Running", "Stopped")
            start: Optional start time (Unix timestamp)
            end: Optional end time (Unix timestamp)
    
        Returns:
            Dictionary containing list of live algorithms
        """
        auth = get_auth_instance()
        if auth is None:
            return {
                "status": "error",
                "error": "QuantConnect authentication not configured. Use configure_auth() first.",
            }
    
        try:
            # Prepare request data
            request_data = {}
            if status:
                request_data["status"] = status
            if start is not None:
                request_data["start"] = start
            if end is not None:
                request_data["end"] = end
    
            # Make API request
            response = await auth.make_authenticated_request(
                endpoint="live/list", method="POST", json=request_data
            )
    
            # Parse response
            if response.status_code == 200:
                data = response.json()
    
                if data.get("success", False):
                    live_algorithms = data.get("live", [])
                    
                    return {
                        "status": "success",
                        "live_algorithms": live_algorithms,
                        "total_count": len(live_algorithms),
                        "filters": {
                            "status": status,
                            "start": start,
                            "end": end,
                        },
                        "message": f"Successfully retrieved {len(live_algorithms)} live algorithms",
                    }
                else:
                    # API returned success=false
                    errors = data.get("errors", ["Unknown error"])
                    return {
                        "status": "error",
                        "error": "Failed to list live algorithms",
                        "details": errors,
                    }
    
            elif response.status_code == 401:
                return {
                    "status": "error",
                    "error": "Authentication failed. Check your credentials and ensure they haven't expired.",
                }
    
            else:
                return {
                    "status": "error",
                    "error": f"API request failed with status {response.status_code}",
                    "response_text": (
                        response.text[:500]
                        if hasattr(response, "text")
                        else "No response text"
                    ),
                }
    
        except Exception as e:
            return {
                "status": "error",
                "error": f"Failed to list live algorithms: {str(e)}",
            }
  • Calls register_live_tools(mcp) which defines and registers all live trading tools including list_live_algorithms.
    register_live_tools(mcp)
  • Calls register_live_tools(mcp) to register the live tools including list_live_algorithms.
    register_live_tools(mcp)
  • Exposes register_live_tools in __all__ for import.
    "register_live_tools",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but lacks behavioral details. It doesn't disclose whether this is a read-only operation, requires specific permissions, has rate limits, returns paginated results, or what happens if no filters are applied. The mention of 'optional filters' is minimal and doesn't cover behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with a clear purpose statement followed by structured Args and Returns sections. Every sentence adds value, though the 'Returns' line is somewhat redundant given the output schema. It's front-loaded and efficiently organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 optional parameters, list operation), no annotations, but with an output schema, the description is partially complete. It covers the basic purpose and parameters but lacks usage context, behavioral transparency, and deeper parameter semantics, leaving gaps for an AI agent to infer correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists the three parameters with brief examples (e.g., 'Running', 'Stopped' for status, Unix timestamp for times), adding meaning beyond the schema's generic titles. However, it doesn't explain parameter interactions, format details beyond examples, or default behaviors when null.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('live algorithms') with optional filtering. It distinguishes from siblings like 'read_live_algorithm' (singular read) and 'create_live_algorithm' (creation), but doesn't explicitly differentiate from other list tools like 'list_backtests' or 'list_optimizations' beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), compare with 'read_live_algorithm' for single-algorithm details, or specify scenarios where filtering is beneficial versus retrieving all live algorithms.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/taylorwilsdon/quantconnect-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server