reset_auth
Clear saved authentication credentials for the Google Tag Manager MCP Server to resolve connection issues or switch accounts.
Instructions
保存された認証情報をリセットします
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/oauth2-auth.js:190-201 (handler)Core implementation of resetAuth: deletes the saved token file and clears OAuth2 client credentials.async resetAuth() { if (existsSync(this.tokenPath)) { try { const fs = await import('fs/promises'); await fs.unlink(this.tokenPath); } catch (error) { // ファイル削除に失敗しても続行 } } this.oAuth2Client.setCredentials({}); return { success: true, message: '認証情報をリセットしました' }; }
- src/index.js:911-922 (handler)MCP tool handler for 'reset_auth': retrieves OAuth2Auth instance from GTMClient and calls resetAuth(), returns result as text content.case 'reset_auth': { const oauth2Auth = this.gtmClient.getOAuth2Auth(); const result = await oauth2Auth.resetAuth(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.js:67-73 (registration)Tool registration in listTools response: defines 'reset_auth' tool with name, description, and empty input schema.name: 'reset_auth', description: '保存された認証情報をリセットします', inputSchema: { type: 'object', properties: {}, }, },
- src/index.js:70-73 (schema)Input schema for reset_auth tool: empty object (no parameters required).type: 'object', properties: {}, }, },
- src/gtm-client.js:365-367 (helper)Helper method in GTMClient to retrieve the OAuth2Auth instance used by the reset_auth handler.getOAuth2Auth() { return this.oauth2Auth; }