Skip to main content
Glama
enoch-sit

gmail-mcp-server

by enoch-sit

set_labels

Assign or remove labels on a Gmail message to organize your inbox efficiently. Get valid label IDs from get_labels before applying changes.

Instructions

Add and/or remove labels on an email. Use get_labels to obtain valid label IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageIdYesThe Gmail message ID
addLabelIdsNoLabel IDs to add (e.g. ["Label_123", "STARRED"])
removeLabelIdsNoLabel IDs to remove (e.g. ["INBOX", "UNREAD"])
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It states the core operation ('Add and/or remove labels') and implies mutation, but it does not disclose potential side effects, error conditions for invalid IDs, or any required permissions. The reference to get_labels hints at validity concerns, but lacks depth.

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?

The description is two sentences, with the first sentence stating the purpose and the second providing a direct usage hint. Every word earns its place; it is appropriately sized and front-loaded with the main 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?

Given the tool's simplicity (3 params, no output schema, no annotations), the description is largely complete. It covers the purpose, the prerequisite for valid IDs, and the operation. However, it could mention whether both add and remove can be performed in a single call (though 'and/or' implies yes) and any consequences of invalid IDs, which would make it fully self-contained.

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 the baseline is 3. The description adds minimal semantic value beyond the schema: it explains that the tool adds and/or removes labels, which maps to addLabelIds and removeLabelIds, but it does not elaborate on parameter formats or examples beyond what the schema already provides.

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 clearly states the tool's function: 'Add and/or remove labels on an email.' It uses a specific verb (add/remove) and resource (labels on an email), and it is easily distinguished from sibling tools like get_labels, which retrieves labels rather than modifying them.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use get_labels to obtain valid label IDs.' This instructs the agent to use a specific alternative for a prerequisite action, thereby clarifying when to use set_labels (label modification) and when not to (obtaining IDs). This directly addresses usage context and alternatives.

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/enoch-sit/gmail-mcp-server'

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