Skip to main content
Glama

delete_project

Remove a project from QuantConnect by specifying its ID to manage your trading strategy workspace.

Instructions

Delete a project from QuantConnect.

Args: project_id: The ID of the project to delete.

Returns: A dictionary containing the deletion result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'delete_project' tool. It authenticates with QuantConnect, sends a POST request to the 'projects/delete' endpoint with the project ID, and returns success/error status based on the API response.
    @mcp.tool()
    async def delete_project(project_id: int) -> Dict[str, Any]:
        """
        Delete a project from QuantConnect.
    
        Args:
            project_id: The ID of the project to delete.
    
        Returns:
            A dictionary containing the deletion result.
        """
        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 = {"projectId": project_id}
            
            response = await auth.make_authenticated_request(
                endpoint="projects/delete", method="POST", json=request_data
            )
    
            if response.status_code == 200:
                data = response.json()
                if data.get("success"):
                    return {
                        "status": "success",
                        "project_id": project_id,
                        "message": f"Successfully deleted project {project_id}.",
                    }
                else:
                    return {
                        "status": "error",
                        "error": "Project deletion failed.",
                        "details": data.get("errors", []),
                        "project_id": project_id,
                    }
            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"An unexpected error occurred: {e}",
                "project_id": project_id,
            }
  • Registration block in the server initialization where register_project_tools(mcp) is called. This invokes the function that defines and registers the delete_project tool (along with other project tools) to the FastMCP server instance.
    safe_print("🔧 Registering QuantConnect tools...")
    register_auth_tools(mcp)
    register_project_tools(mcp)
    register_file_tools(mcp)
    register_backtest_tools(mcp)
    register_live_tools(mcp)
    register_optimization_tools(mcp)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it's a deletion operation, implying a destructive mutation, but doesn't disclose critical behavioral traits such as whether deletion is permanent, requires specific permissions, has side effects (e.g., removing associated files), or rate limits. This is a significant gap for a destructive tool with no annotation coverage.

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 and front-loaded, with the main purpose stated first followed by structured 'Args' and 'Returns' sections. Every sentence adds value, though the 'Returns' section could be more specific, but overall it's efficient with zero waste.

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 complexity (destructive mutation), lack of annotations, and an output schema that exists but isn't detailed in the description, the description is moderately complete. It covers the basic purpose and parameters but misses key behavioral context like permanence or permissions, making it adequate but with clear gaps for safe usage.

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?

The description adds minimal semantics: it explains that 'project_id' is 'The ID of the project to delete,' which clarifies the parameter's purpose. However, with 0% schema description coverage and only one parameter, this is adequate but not comprehensive—it doesn't specify format constraints or examples. The baseline is 3 since the schema lacks descriptions, and the description compensates partially.

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 ('Delete') and resource ('a project from QuantConnect'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'delete_backtest' or 'delete_file', which would require mentioning it's specifically for projects rather than other entities.

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., needing an existing project), exclusions, or comparisons with similar tools like 'delete_backtest' or 'delete_file', leaving the agent without context for selection.

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