Skip to main content
Glama

gmail_apply_labels

Idempotent

Batch add or remove Gmail labels on specific message IDs, with optional creation of missing labels. Use to mark emails as processed (e.g., AI-Processed) and clear unread flags.

Instructions

Add and/or remove labels on specific Gmail messages by ID via batchModify. Resolves label display names to IDs (case-insensitive; system labels like UNREAD/INBOX work too). Optionally creates missing add-labels. Use to mark messages 'AI-Processed' and remove 'UNREAD'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate readOnly=false and destructive=false, so the safety profile is known. The description adds transparency by explaining label display name resolution to IDs (case-insensitive, system labels work), optional creation of missing add-labels, and that missing remove labels are skipped and reported. This goes beyond annotations, though it doesn't discuss rate limits or granular error cases beyond 'unresolved_remove_labels'.

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 sentences, no fluff. The first sentence states the core operation, the second adds a practical example. Every phrase earns its place, and it is front-loaded with the primary action.

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?

The tool has moderate complexity with multiple parameters and an output schema. The description covers the key behavioral nuances (label resolution, creation, removal semantics) while leaving pagination and response format to the output schema. It doesn't mention auth, but annotations and sibling context make it adequately complete for an agent to invoke confidently.

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 description coverage is reported as 0%, so the description must compensate. It explains that label names are resolved to IDs, supports system labels, and that create_missing_labels controls label creation. The schema only provides bare field names and default values, so the description adds meaningful semantics that help an agent provide correct parameter values.

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?

The description opens with a specific verb+resource: 'Add and/or remove labels on specific Gmail messages by ID via batchModify.' This clearly distinguishes it from sibling tools like gmail_search_emails or gmail_bulk_label_matching, which focus on searching or bulk labeling based on criteria, not direct message ID targeting.

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 description provides a concrete use case: 'Use to mark messages AI-Processed and remove UNREAD.' This implies when the tool is appropriate, though it doesn't explicitly contrast with alternatives like gmail_bulk_label_matching. The context is clear enough for an agent to choose this tool for direct label mutations on specific messages.

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/yama662607/inbox-mcp'

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