Skip to main content
Glama

read_project_nodes

Retrieve project node information including available and selected nodes for strategy design and implementation in trading platforms.

Instructions

Read the available and selected nodes of a project.

Args: project_id: ID of the project to read nodes for

Returns: Dictionary containing project node information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the read_project_nodes tool handler. Makes authenticated POST request to QuantConnect API endpoint 'projects/nodes/read' to fetch available and selected project nodes.
    @mcp.tool()
    async def read_project_nodes(project_id: int) -> Dict[str, Any]:
        """
        Read the available and selected nodes of a project.
    
        Args:
            project_id: ID of the project to read nodes for
    
        Returns:
            Dictionary containing project node information
        """
        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}
    
            # Make API request
            response = await auth.make_authenticated_request(
                endpoint="projects/nodes/read", method="POST", json=request_data
            )
    
            # Parse response
            if response.status_code == 200:
                data = response.json()
    
                if data.get("success", False):
                    nodes = data.get("nodes", {})
                    
                    return {
                        "status": "success",
                        "project_id": project_id,
                        "nodes": nodes,
                        "message": f"Successfully retrieved node information for project {project_id}",
                    }
                else:
                    # API returned success=false
                    errors = data.get("errors", ["Unknown error"])
                    return {
                        "status": "error",
                        "error": "Failed to read project nodes",
                        "details": 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"Failed to read project nodes: {str(e)}",
                "project_id": project_id,
            }
  • Calls register_project_tools(mcp) which defines and registers the read_project_nodes tool among other project tools.
    register_project_tools(mcp)
  • Alternative entry point calling register_project_tools(mcp) to register the tool.
    register_project_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 'Read' which implies a read-only operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, error conditions, or what 'available and selected nodes' entails in practice. The description is minimal and lacks context beyond the basic action.

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 core purpose in the first sentence. The 'Args' and 'Returns' sections are structured but could be more integrated; however, they add necessary clarity without waste. Every sentence earns its place, though slight verbosity in formatting reduces perfection.

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 (simple read operation), no annotations, and an output schema exists (implied by 'Returns'), the description is minimally complete. It covers the purpose and parameter semantics but lacks behavioral context and usage guidelines. With the output schema handling return values, the description meets basic needs but has clear gaps in guidance and transparency.

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 adds the meaning of 'project_id' as 'ID of the project to read nodes for', which clarifies the parameter's purpose beyond the schema's title 'Project Id'. However, with only one parameter and no additional details like format or constraints, the value added is moderate, aligning with the baseline for minimal parameter info.

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 ('Read') and the target ('available and selected nodes of a project'), which is specific and distinguishes it from siblings like 'read_project' or 'update_project_nodes'. However, it doesn't explicitly differentiate from other read operations in the sibling list, such as 'read_project' or 'read_project_collaborators', beyond the resource focus.

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. It doesn't mention prerequisites, context for selecting nodes, or comparisons to siblings like 'read_project' or 'update_project_nodes'. Usage is implied by the action and resource but lacks explicit direction.

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