Skip to main content
Glama

diagnose_google_auth

Diagnose active Google authentication configurations to verify setup and identify issues for Google Workspace integrations.

Instructions

Return a quick summary of the active Google authentication setup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main tool handler decorated with @mcp.tool() that executes the diagnose_google_auth tool. It calls get_client().auth_summary() to retrieve authentication status information.
    @mcp.tool()
    def diagnose_google_auth() -> dict[str, Any]:
        """Return a quick summary of the active Google authentication setup."""
        return get_client().auth_summary()
  • The auth_summary() method in GoogleWorkspaceClient that performs the actual work. It builds and returns a comprehensive dictionary with authentication configuration details including API keys, OAuth client status, service account status, token scopes, and recommendations.
    def auth_summary(self) -> dict[str, Any]:
        oauth_client_ready = bool(self.oauth_client_secrets_file or self.oauth_client_config_json)
        oauth_client_source = None
        if self.oauth_client_secrets_file:
            oauth_client_source = str(self.oauth_client_secrets_file)
        elif self.oauth_client_config_json:
            oauth_client_source = "GOOGLE_OAUTH_CLIENT_CONFIG_JSON"
        service_account_ready = bool(self.service_account_file or self.service_account_json)
        service_account_source = None
        if self.service_account_file:
            service_account_source = str(self.service_account_file)
        elif self.service_account_json:
            service_account_source = "GOOGLE_SERVICE_ACCOUNT_JSON"
        cached_oauth_scopes = self._cached_oauth_token_scopes()
        return {
            "api_key_configured": bool(self.api_key),
            "oauth_access_token_configured": bool(self.oauth_access_token),
            "oauth_client_configured": oauth_client_ready,
            "oauth_client_source": oauth_client_source,
            "oauth_token_file": str(self.oauth_token_file),
            "oauth_token_cached": self.oauth_token_file.exists(),
            "oauth_token_format": self._cached_oauth_token_format(),
            "oauth_token_scopes": cached_oauth_scopes,
            "oauth_token_missing_scopes": self._missing_cached_oauth_scopes(DEFAULT_READONLY_SCOPES),
            "service_account_configured": service_account_ready,
            "service_account_source": service_account_source,
            "recommended_mode": self._recommended_mode(),
            "active_auth_mode": self._active_auth_mode(),
            "notes": [
                "Public Sheets can be read with GOOGLE_API_KEY.",
                "OAuth desktop client credentials can read private files shared to your Google account.",
                "Docs API and Drive export are most reliable with a service account or OAuth access token.",
                "A service account must be granted access to private files or shared drives.",
            ],
        }
  • Import statement that brings the diagnose_google_auth function from the tools module into the package namespace for registration.
    from .tools import (
        diagnose_google_auth,
  • Export of diagnose_google_auth in the __all__ list, making it available as part of the public API.
    "diagnose_google_auth",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Return a quick summary' implies a read-only operation, it doesn't specify what information the summary contains, whether it checks authentication validity or just configuration, potential error conditions, or any rate limits. For an authentication diagnostic tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a zero-parameter tool and front-loads the essential information. Every word earns its place in this concise formulation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this tool has an output schema (which should document the return format), the description doesn't need to explain return values. However, for an authentication diagnostic tool with no annotations, the description should provide more context about what 'active Google authentication setup' means and what kind of summary to expect. The presence of an output schema helps, but the description remains somewhat minimal for this context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100% (though empty). The description appropriately doesn't waste space discussing nonexistent parameters. Since there are no parameters to document, the baseline score of 4 is appropriate as the description doesn't need to compensate for any parameter documentation gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Return') and resource ('active Google authentication setup'), making it immediately understandable. However, it doesn't explicitly differentiate this authentication diagnostic tool from its sibling tools which are all focused on Google document/spreadsheet operations rather than authentication.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance about when to use this tool versus alternatives. It doesn't mention prerequisites (like needing authentication to be configured first), troubleshooting scenarios, or how this differs from other authentication-related tools that might exist. The agent receives no usage context beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/NgoQuocViet2001/google-workspace-mcp'

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