get_auth_headers_info
Retrieve authentication header information securely without exposing sensitive data. This function returns a dictionary containing header details for use in the QuantConnect MCP Server.
Instructions
Get information about authentication headers (without exposing sensitive data).
Returns: Dictionary containing header information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The core handler function for the 'get_auth_headers_info' tool. It retrieves authentication header information (field names, presence of specific headers) without exposing sensitive values like tokens. Uses get_auth_instance() and auth.get_headers() internally. Registered via @mcp.tool() decorator.@mcp.tool() async def get_auth_headers_info() -> Dict[str, Any]: """ Get information about authentication headers (without exposing sensitive data). Returns: Dictionary containing header information """ try: auth = get_auth_instance() if auth is None: return {"status": "error", "error": "Authentication not configured"} # Get headers (but don't expose the actual values) headers = auth.get_headers() return { "status": "success", "header_fields": list(headers.keys()), "has_authorization": "Authorization" in headers, "has_timestamp": "Timestamp" in headers, "timestamp_format": "Unix timestamp", "auth_method": "Basic Authentication with SHA-256 hashed token", } except Exception as e: return { "status": "error", "error": str(e), "message": "Failed to get authentication header information", }
- quantconnect_mcp/main.py:47-47 (registration)Top-level registration call in the main entry point that invokes register_auth_tools(mcp), which defines and registers the get_auth_headers_info tool among other auth tools.register_auth_tools(mcp)