Skip to main content
Glama

gmail.users.settings.filters.get

Retrieves a specific Gmail filter by ID for a user, returning its criteria and action settings as JSON so you can inspect or verify the filter.

Instructions

Gets a filter. For more information, see Manage Gmail filters [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: create, delete, list.

Input Schema

NameRequiredDescriptionDefault
idYes[URL path segment] The ID of the filter to be fetched.
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] 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.

Output Schema

NameRequiredDescriptionDefault
idNo
actionNo
criteriaNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"The ID of the filter to be fetched."New value: +"[URL path segment] The ID of the filter to be fetched."
    • addedInput schema / properties / userId / default
      Added value: +"me"
    • changedInput schema / properties / userId / description
      Previous value: -"User's email address. The special value \"me\" can be used to indicate the authenticated user."New value: +"[URL path segment] User's email address. The special value \"me\" can be used to indicate the authenticated user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "action": {
      +      "properties": {
      +        "addLabelIds": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "forward": {
      +          "type": "string"
      +        },
      +        "removeLabelIds": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "criteria": {
      +      "properties": {
      +        "excludeChats": {
      +          "type": "boolean"
      +        },
      +        "from": {
      +          "type": "string"
      +        },
      +        "hasAttachment": {
      +          "type": "boolean"
      +        },
      +        "negatedQuery": {
      +          "type": "string"
      +        },
      +        "query": {
      +          "type": "string"
      +        },
      +        "size": {
      +          "type": "integer"
      +        },
      +        "sizeComparison": {
      +          "enum": [
      +            "unspecified",
      +            "smaller",
      +            "larger"
      +          ],
      +          "type": "string"
      +        },
      +        "subject": {
      +          "type": "string"
      +        },
      +        "to": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "id": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose that the call is an HTTP GET returning the resource as JSON, which establishes read-only semantics. It omits auth/scope requirements and error behavior, and the body-building/`body_file` prose is irrelevant and potentially confusing for a GET that sends no body.

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

Conciseness3/5

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

The lead sentence is correctly front-loaded, but the middle sentence about building request bodies from typed parameters or `body_file` is dead weight for a GET with no body, consuming roughly half the text without helping the caller.

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?

An output schema exists, so return values need no explanation, and the doc link covers the resource shape. However, for a settings read in a family with many shield/scope-sensitive siblings, the absence of any access or scope note leaves a gap the boilerplate does not fill.

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 description coverage is 100%, so `id` and `userId` (including the "me" default) are already fully documented. The description adds only a generic note that typed flags override the `params` map and that `body_file` can supply a body, neither of which is meaningful for this endpoint.

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?

"Gets a filter" states a specific verb and resource, and the closing line enumerates the sibling operations (create, delete, list) over the same resource, so the agent can place it in the family. It falls short of 5 because the follow-on boilerplate about request bodies muddies what is otherwise a clean read-only fetch.

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?

Naming create/delete/list implies the routing (use list to discover filter IDs, get to fetch one), but no sentence states when to prefer this over `filters.list` or what prerequisites exist. Usage must be inferred from the sibling roster rather than read.

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