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

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)

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