Skip to main content
Glama

test_quantconnect_api

Verify QuantConnect API connectivity and authentication status to ensure trading platform integration functions correctly.

Instructions

Test QuantConnect API connectivity with current authentication.

Args: endpoint: API endpoint to test (default: authenticate) method: HTTP method to use (default: POST)

Returns: Dictionary containing API test results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointNoauthenticate
methodNoPOST

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'test_quantconnect_api' tool. Decorated with @mcp.tool() for automatic schema generation from type hints and docstring, and registration with the MCP server. Tests QuantConnect API connectivity by making an authenticated HTTP request to the specified endpoint.
    @mcp.tool()
    async def test_quantconnect_api(
        endpoint: str = "authenticate", method: str = "POST"
    ) -> Dict[str, Any]:
        """
        Test QuantConnect API connectivity with current authentication.
    
        Args:
            endpoint: API endpoint to test (default: authenticate)
            method: HTTP method to use (default: POST)
    
        Returns:
            Dictionary containing API test results
        """
        try:
            auth = get_auth_instance()
    
            if auth is None:
                return {
                    "status": "error",
                    "error": "Authentication not configured",
                    "message": "Configure authentication first using configure_quantconnect_auth",
                }
    
            # Make API request
            response = await auth.make_authenticated_request(endpoint, method)
    
            # Parse response
            try:
                response_data = response.json()
            except:
                response_data = {"raw_content": response.text}
    
            return {
                "status": "success",
                "endpoint": endpoint,
                "method": method,
                "status_code": response.status_code,
                "response_data": response_data,
                "headers": dict(response.headers),
                "success": response.status_code == 200,
            }
    
        except Exception as e:
            return {
                "status": "error",
                "error": str(e),
                "message": f"Failed to test API endpoint: {endpoint}",
            }
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 of behavioral disclosure. While it mentions testing 'with current authentication,' it doesn't specify what happens during the test (e.g., whether it makes actual API calls, what errors might occur, if it affects system state, or any rate limits). For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 well-structured with clear sections for purpose, arguments, and returns. It's front-loaded with the main purpose, and each sentence adds value without redundancy. The only minor inefficiency is the repetition of 'default' info that's also in the schema.

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

Completeness4/5

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

Given the tool's low complexity (2 simple parameters) and the presence of an output schema (implied by 'Returns' statement), the description is reasonably complete. It covers the purpose, parameters, and return type. However, it lacks details on authentication requirements or error handling, which could be useful given no annotations.

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%, but the description includes an 'Args' section that documents both parameters ('endpoint' and 'method') with their defaults. This adds meaningful semantics beyond the bare schema. However, it doesn't explain valid endpoint values or method options, leaving some ambiguity.

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 tool's purpose: 'Test QuantConnect API connectivity with current authentication.' This specifies the verb ('test'), resource ('QuantConnect API connectivity'), and context ('with current authentication'). However, it doesn't explicitly differentiate from sibling tools like 'get_auth_status' or 'validate_quantconnect_auth' which might serve related authentication purposes.

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 sibling tools like 'get_auth_status' or 'validate_quantconnect_auth' that might overlap in functionality, nor does it specify prerequisites, appropriate contexts, or exclusions for usage.

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