Skip to main content
Glama

authstatus

Verify authentication status for AI agents on the Open eClass platform via UoA's SSO system, ensuring secure access to course data and operations.

Instructions

Check authentication status with eClass

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools

Implementation Reference

  • Registers the 'authstatus' tool in the list_tools handler, specifying name, description, and a dummy input schema for no-parameter tool.
    types.Tool( name="authstatus", description="Check authentication status with eClass", inputSchema={ "type": "object", "properties": { "random_string": {"type": "string", "description": "Dummy parameter for no-parameter tools"}, }, "required": ["random_string"], }, ),
  • The primary handler function for the 'authstatus' tool, which delegates to the authentication helper to format and return the status response.
    async def handle_authstatus() -> List[types.TextContent]: """Handle checking authentication status.""" # Use the authentication module to format the status response return [authentication.format_authstatus_response(session_state)]
  • Tool dispatcher in the call_tool handler that routes 'authstatus' requests to the specific handle_authstatus function.
    elif name == "authstatus": return await handle_authstatus()
  • Helper function that formats the authentication status response, checking login state and session validity, and returns the appropriate TextContent.
    def format_authstatus_response(session_state) -> types.TextContent: """ Format authentication status response. Args: session_state: The current session state Returns: Formatted MCP TextContent response """ if not session_state.logged_in: return types.TextContent( type="text", text="Status: Not logged in", ) # Check if session is still valid is_valid = session_state.is_session_valid() if is_valid: return types.TextContent( type="text", text=f"Status: Logged in as {session_state.username}\nCourses: {len(session_state.courses)} enrolled", ) else: return types.TextContent( type="text", text="Status: Session expired. Please log in again.", )

Other Tools

Related 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/sdi2200262/eclass-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server