Skip to main content
Glama

google_auth

Completes Google OAuth2 authorization when a token is missing or expired, opening a browser for local loopback and PKCE flow and storing tokens only locally.

Instructions

第一次使用/token 失效时,完成 Google OAuth2 授权(打开浏览器,本地 loopback 收 code + PKCE)。授权成功后 token 只存本地,永不回传。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "google_auth"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutMsNo等待浏览器回调的毫秒数,默认 180000
manualCodeNo可选:无 GUI 时,把浏览器地址栏含 ?code=... 的整段 URL 粘进来

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that a browser is launched, that a local loopback listener captures the code with PKCE, and that the resulting token stays local and is never sent back, which is the key side-effect and security fact. It omits failure behavior and whether prior tokens are overwritten on re-authorization.

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?

Two tight sentences: the trigger condition comes first, then the mechanism and the token-handling guarantee. No filler and nothing redundant with the schema.

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

Completeness5/5

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

For an authorization tool with an optional-parameter schema and no output schema, the description supplies what matters: when it fires, that it is interactive, and what happens to the credential afterward. An agent can decide to call it and set expectations for the user with no missing critical context.

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

Parameters3/5

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

Schema coverage is 100%, so both timeoutMs and manualCode are already documented, including the no-GUI workflow. The description's mention of opening a browser hints at the timeout parameter but adds no syntax or format detail beyond the schema. Baseline 3 applies.

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 names a specific operation (complete Google OAuth2 authorization) and its mechanism (browser open, local loopback code capture, PKCE), so it is clearly not the read-only or browser-control siblings. It stops short of explicitly contrasting with google_status or google_revoke, which an agent might confuse when a token is merely expired versus revoked.

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

Usage Guidelines4/5

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

The trigger is stated outright: use on first use or when the token is invalid. That is a clear condition for selection. It does not say when NOT to use it (e.g., check google_status first) or what the fallback is if authorization fails.

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