Tools Reference

April 29, 2026 ยท View on GitHub

Detailed documentation for all tools provided by the eClass MCP Server.

Overview

ToolDescriptionRequires Auth
loginAuthenticate via UoA SSONo
get_coursesRetrieve enrolled coursesYes
logoutEnd current sessionNo
authstatusCheck authentication statusNo

login

Authenticates with eClass using credentials from the .env file.

Authentication Flow

  1. Visit eClass login page
  2. Follow SSO authentication link
  3. Authenticate with UoA's CAS system
  4. Verify successful authentication
  5. Establish session for subsequent requests

Input Schema

{
  "type": "object",
  "properties": {
    "random_string": {
      "type": "string",
      "description": "Dummy parameter for no-parameter tools"
    }
  },
  "required": ["random_string"]
}

Note: The random_string parameter is required by the MCP protocol. Actual credentials are read from .env.

Responses

Success:

{
  "type": "text",
  "text": "Login successful! You are now logged in as username."
}

Already logged in:

{
  "type": "text",
  "text": "Already logged in as username"
}

Error:

{
  "type": "text",
  "text": "Error: [specific error message]"
}

Possible errors:

  • "Username and password must be provided in the .env file"
  • "Could not find SSO login link on the login page"
  • "Authentication failed: Invalid credentials"
  • "Network error during login process: [details]"

get_courses

Retrieves the list of enrolled courses from eClass.

Input Schema

{
  "type": "object",
  "properties": {
    "random_string": {
      "type": "string",
      "description": "Dummy parameter for no-parameter tools"
    }
  },
  "required": ["random_string"]
}

Responses

Success:

{
  "type": "text",
  "text": "Found X courses:\n\n1. Course Name\n   URL: https://eclass.uoa.gr/courses/ABC123/\n..."
}

No courses:

{
  "type": "text",
  "text": "No courses found. You may not be enrolled in any courses."
}

Error:

{
  "type": "text",
  "text": "Error: [specific error message]"
}

Possible errors:

  • "Not logged in. Please log in first using the login tool."
  • "Session expired. Please log in again."
  • "Network error retrieving courses: [details]"

logout

Ends the current eClass session.

Input Schema

{
  "type": "object",
  "properties": {
    "random_string": {
      "type": "string",
      "description": "Dummy parameter for no-parameter tools"
    }
  },
  "required": ["random_string"]
}

Responses

Success:

{
  "type": "text",
  "text": "Successfully logged out user username."
}

Not logged in:

{
  "type": "text",
  "text": "Not logged in, nothing to do."
}

Error:

{
  "type": "text",
  "text": "Error during logout: [specific error message]"
}

authstatus

Checks the current authentication status.

Input Schema

{
  "type": "object",
  "properties": {
    "random_string": {
      "type": "string",
      "description": "Dummy parameter for no-parameter tools"
    }
  },
  "required": ["random_string"]
}

Responses

Logged in:

{
  "type": "text",
  "text": "Status: Logged in as username"
}

Not logged in:

{
  "type": "text",
  "text": "Status: Not logged in"
}

Session expired:

{
  "type": "text",
  "text": "Status: Session expired. Please log in again."
}

Common Error Patterns

ErrorDescriptionResolution
Not logged inOperation requires authenticationCall login first
Session expiredSession has timed outCall login to refresh
Network errorConnection to eClass failedCheck network, retry
Missing credentials.env file incompleteSet ECLASS_USERNAME and ECLASS_PASSWORD
Authentication errorInvalid credentialsVerify credentials in .env