Skip to main content
Glama

create_project_collaborator

Add collaborators to QuantConnect projects with customizable permissions for write access and live control.

Instructions

Add a collaborator to a project.

Args: project_id: ID of the project to add collaborator to collaborator_user_id: User ID of the user to add as collaborator (from profile URL) collaboration_write: Grant write permission (default: True) collaboration_live_control: Grant live control permission (default: False)

Returns: Dictionary containing collaborator addition result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
collaborator_user_idYes
collaboration_writeNo
collaboration_live_controlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'create_project_collaborator' tool. It is a nested async function decorated with @mcp.tool() inside register_project_tools. Handles authentication, prepares API request to QuantConnect's projects/collaboration/create endpoint, and processes the response.
    @mcp.tool()
    async def create_project_collaborator(
        project_id: int, collaborator_user_id: str, collaboration_write: bool = True, collaboration_live_control: bool = False
    ) -> Dict[str, Any]:
        """
        Add a collaborator to a project.
    
        Args:
            project_id: ID of the project to add collaborator to
            collaborator_user_id: User ID of the user to add as collaborator (from profile URL)
            collaboration_write: Grant write permission (default: True)
            collaboration_live_control: Grant live control permission (default: False)
    
        Returns:
            Dictionary containing collaborator addition 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,
                "collaboratorUserId": collaborator_user_id,
                "collaborationWrite": collaboration_write,
                "collaborationLiveControl": collaboration_live_control,
            }
    
            # Make API request
            response = await auth.make_authenticated_request(
                endpoint="projects/collaboration/create", method="POST", json=request_data
            )
    
            # Parse response
            if response.status_code == 200:
                data = response.json()
    
                if data.get("success", False):
                    return {
                        "status": "success",
                        "project_id": project_id,
                        "collaborator_user_id": collaborator_user_id,
                        "collaboration_write": collaboration_write,
                        "collaboration_live_control": collaboration_live_control,
                        "message": f"Successfully added collaborator {collaborator_user_id} to project {project_id}",
                    }
                else:
                    # API returned success=false
                    errors = data.get("errors", ["Unknown error"])
                    return {
                        "status": "error",
                        "error": "Failed to add project collaborator",
                        "details": errors,
                        "project_id": project_id,
                        "collaborator_user_id": collaborator_user_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"Failed to add project collaborator: {str(e)}",
                "project_id": project_id,
                "collaborator_user_id": collaborator_user_id,
            }
  • Registration call in the main entry point that invokes register_project_tools(mcp), which defines and registers the create_project_collaborator tool via its @mcp.tool() decorator.
    register_project_tools(mcp)
  • Alternative registration call in server.py that registers the project tools including create_project_collaborator.
    register_project_tools(mcp)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Add a collaborator') but doesn't mention whether this requires authentication, what happens on failure (e.g., if the user doesn't exist), or if there are rate limits. This leaves significant gaps in understanding the tool's behavior beyond basic functionality.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose, followed by organized sections for arguments and returns. Every sentence adds value without redundancy, and the formatting enhances readability, making it efficient for the agent to parse.

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 (mutation with 4 parameters), no annotations, and an output schema present, the description covers the purpose and parameters well but lacks behavioral context like error handling or permissions. The output schema handles return values, but without annotations, the description should do more to explain mutation risks or prerequisites.

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

Parameters5/5

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

The description provides detailed parameter information in the 'Args' section, explaining each parameter's purpose and default values. With 0% schema description coverage, this fully compensates by adding essential semantics beyond the bare schema, making parameters clear and actionable for the agent.

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 action ('Add a collaborator to a project') with the specific resource ('project'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'update_project_collaborator' or 'delete_project_collaborator', which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'update_project_collaborator' or 'delete_project_collaborator'. It also lacks information about prerequisites, such as whether the user needs specific permissions or if the project must exist, leaving the agent without contextual usage instructions.

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