Skip to main content
Glama

check_github_auth

Verify GitHub authentication status to confirm connection, display username, and identify available actions for AI persona management.

Instructions

Check current GitHub authentication status. Shows whether you're connected to GitHub, your username, and what actions are available. Use when users ask 'am I connected to GitHub?', 'what's my GitHub status?', or similar questions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Defines and registers the 'check_github_auth' tool including name, description, empty input schema, and handler that delegates to server.checkGitHubAuth() method.
    tool: { name: "check_github_auth", description: "Check current GitHub authentication status. Shows whether you're connected to GitHub, your username, and what actions are available. Use when users ask 'am I connected to GitHub?', 'what's my GitHub status?', or similar questions.", inputSchema: { type: "object", properties: {} } }, handler: () => server.checkGitHubAuth() },
  • Core implementation of GitHub authentication status check: retrieves token, validates it by fetching user info from GitHub API, returns status including username and scopes if authenticated.
    async getAuthStatus(): Promise<AuthStatus> { const token = await TokenManager.getGitHubTokenAsync(); if (!token) { return { isAuthenticated: false, hasToken: false }; } try { // Try to get user info to validate token const userInfo = await this.fetchUserInfo(token); return { isAuthenticated: true, hasToken: true, username: userInfo.login, scopes: userInfo.scopes }; } catch (error) { // Token might be invalid or expired ErrorHandler.logError('GitHubAuthManager.checkAuthStatus', error); return { isAuthenticated: false, hasToken: true // Has token but it's invalid }; } }
  • Registers the auth tools (including check_github_auth) from getAuthTools into the MCP tool registry.
    // Register auth tools this.toolRegistry.registerMany(getAuthTools(instance));
  • TypeScript interface definition for the checkGitHubAuth method on IToolHandler.
    checkGitHubAuth(): Promise<any>;

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/DollhouseMCP/DollhouseMCP'

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