nworks_whoami
Check your authenticated NAVER WORKS account details and verify token status to diagnose authentication issues.
Instructions
현재 인증된 NAVER WORKS 계정 정보와 토큰 유효 상태를 확인합니다. 인증 문제 진단 시 먼저 호출
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/tools.ts:991-1022 (handler)The handler function for the 'nworks_whoami' MCP tool. It retrieves credentials and token information to check the authentication status of the NAVER WORKS integration.
server.tool( "nworks_whoami", "현재 인증된 NAVER WORKS 계정 정보와 토큰 유효 상태를 확인합니다. 인증 문제 진단 시 먼저 호출", {}, async () => { try { const creds = await loadCredentials(); const token = await loadToken(); const userToken = await loadUserToken(); const isValid = token ? token.expiresAt > Date.now() / 1000 : false; const userTokenValid = userToken ? userToken.expiresAt > Date.now() / 1000 : false; const mask = (s: string) => s.length <= 4 ? "****" : `****${s.slice(-4)}`; const info = { serviceAccount: creds.serviceAccount ?? null, clientId: mask(creds.clientId), botId: creds.botId ?? null, tokenValid: isValid, userOAuth: userToken ? { valid: userTokenValid, scope: userToken.scope } : null, }; return { content: [{ type: "text" as const, text: JSON.stringify(info) }], }; } catch (err) { return { content: [{ type: "text" as const, text: mcpErrorHint(err) }],