check_github_auth
Verify GitHub authentication status to confirm connection, display username, and identify available actions within the DollhouseMCP server.
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/ServerSetup.ts:65-66 (registration)Registers all authentication tools, including 'check_github_auth', by calling getAuthTools(instance) which returns the tool definitions and handlers.// Register auth tools this.toolRegistry.registerMany(getAuthTools(instance));
- src/server/tools/AuthTools.ts:30-30 (handler)The MCP tool handler for 'check_github_auth' - delegates execution to the server's checkGitHubAuth method.handler: () => server.checkGitHubAuth()
- src/server/tools/AuthTools.ts:25-28 (schema)Input schema for the 'check_github_auth' tool - accepts no parameters (empty object).inputSchema: { type: "object", properties: {} }
- src/server/tools/AuthTools.ts:22-31 (handler)Full tool definition including name, description, schema, and handler for 'check_github_auth'.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 helper function getAuthStatus() that checks GitHub token validity and fetches user info, likely used by server.checkGitHubAuth() implementation.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 }; } }