Skip to main content
Glama
ambit1977

Google Tag Manager MCP Server

by ambit1977

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
NameRequiredDescriptionDefault

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: {},
      },
  • Defines the input schema (empty object) for the check_auth_status tool.
    {
      name: 'check_auth_status',
      description: '現在の認証状態を確認します',
      inputSchema: {
        type: 'object',
        properties: {},
      },
  • 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),
          },
        ],
      };
  • Implements the authentication status check by verifying the presence of access_token in OAuth2 client credentials.
    isAuthenticated() {
      return !!this.oAuth2Client.credentials.access_token;
    }
  • Helper method in GTMClient that provides the OAuth2Auth instance to the tool handler.
    getOAuth2Auth() {
      return this.oauth2Auth;
    }

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/ambit1977/GTM-MCP'

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