check_auth_status
Verify your current authentication status with Google Tag Manager to ensure you can manage tags, triggers, and configurations.
Instructions
現在の認証状態を確認します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:58-64 (registration)Registers the 'check_auth_status' tool, including its name, description, and empty input schema, in the ListToolsRequestSchema handler.{ name: 'check_auth_status', description: '現在の認証状態を確認します', inputSchema: { type: 'object', properties: {}, },
- src/index.js:58-64 (schema)Defines the input schema (empty object) for the check_auth_status tool.{ name: 'check_auth_status', description: '現在の認証状態を確認します', inputSchema: { type: 'object', properties: {}, },
- src/index.js:895-908 (handler)Main handler for executing the check_auth_status tool: retrieves OAuth2Auth from GTMClient, calls isAuthenticated(), and returns JSON response with status.case 'check_auth_status': { const oauth2Auth = this.gtmClient.getOAuth2Auth(); const isAuthenticated = oauth2Auth.isAuthenticated(); return { content: [ { type: 'text', text: JSON.stringify({ authenticated: isAuthenticated, message: isAuthenticated ? '認証済みです' : '未認証です。get_auth_urlツールで認証URLを取得してください。' }, null, 2), }, ], };
- src/oauth2-auth.js:183-185 (helper)Implements the authentication status check by verifying the presence of access_token in OAuth2 client credentials.isAuthenticated() { return !!this.oAuth2Client.credentials.access_token; }
- src/gtm-client.js:365-367 (helper)Helper method in GTMClient that provides the OAuth2Auth instance to the tool handler.getOAuth2Auth() { return this.oauth2Auth; }