Exchange Google Health OAuth Code
google_health_exchange_codeConverts a Google OAuth authorization code and PKCE verifier into local tokens stored with 0600 permissions, enabling authenticated Google Health API access for Fitbit and Pixel Watch data queries.
Instructions
Exchange a Google OAuth authorization code for local tokens. Tokens are stored locally with 0600 permissions and are never returned. Gated: requires explicit user intent — agents must not call this autonomously.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"code_verifier": "<code_verifier>"
},
"name": "google_health_exchange_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | OAuth authorization code, or a full redirect URL containing ?code=... | |
| code_verifier | Yes | PKCE code verifier from google_health_get_auth_url. | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| note | Yes | ||
| scope | No | ||
| expires_at | No | ||
| token_path | Yes |