Skip to main content
Glama

gmail.users.watch

Set up or update Gmail push notifications for a mailbox by registering a Pub/Sub topic with optional label filters through the Gmail API.

Instructions

Set up or update a push notification watch on the given user mailbox. For more information, see Configure push notifications in Gmail API [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON WatchRequest object accepting labelFilterAction, labelFilterBehavior, labelIds, topicName; pass it via params or whole via body_file Siblings over the same resource: getProfile, stop.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
userIdYes[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user.me
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON WatchRequest object.
request_bodyNoRequest body of type WatchRequest: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
historyIdNo
expirationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON WatchRequest object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type WatchRequest: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "labelFilterAction": {
      +      "enum": [
      +        "include",
      +        "exclude"
      +      ],
      +      "type": "string"
      +    },
      +    "labelFilterBehavior": {
      +      "enum": [
      +        "include",
      +        "exclude"
      +      ],
      +      "type": "string"
      +    },
      +    "labelIds": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "topicName": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / userId / default
      Added value: +"me"
    • changedInput schema / properties / userId / description
      Previous value: -"The user's email address. The special value `me` can be used to indicate the authenticated user."New value: +"[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "expiration": {
      +      "type": "string"
      +    },
      +    "historyId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

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 the write nature ('HTTP POST — creates or triggers a change'), notes refusal under --readonly safety profiles, and states the return format. It omits auth scopes and details about what happens to an existing watch on update.

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

Conciseness4/5

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

The description is front-loaded with purpose and safety, then covers body passing and siblings. It is slightly long and repeats body fields already present in the schema, but every sentence largely earns its place.

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

Completeness4/5

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

Given the tool's complexity (mutation, nested body, output schema), the description covers purpose, mutation, safety gating, body passing, and siblings. Output schema handles returns, and a docs link is provided. Missing auth requirements and update semantics keep it from a 5.

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?

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining that the WatchRequest body can be passed via `params` (merged) or whole via `body_file`, and it lists the accepted fields, which clarifies usage beyond the schema.

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

Purpose5/5

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

States a specific verb and resource: 'Set up or update a push notification watch on the given user mailbox.' It also names sibling tools (getProfile, stop) and notes the HTTP POST method, so an agent can distinguish it immediately.

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

Usage Guidelines3/5

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

The verb 'set up or update' implies when to use it, and siblings are listed, but there is no explicit statement of when to choose watch vs stop or any prerequisites/exclusions. The usage context is only implied.

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

Deploy Server

Other Tools