Skip to main content
Glama

update_label

Update an existing Gmail label's display name, visibility, and color settings to organize your emails effectively.

Instructions

Update an existing label

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the label to update
nameNoThe display name of the label
messageListVisibilityNoThe visibility of messages with this label in the message list
labelListVisibilityNoThe visibility of the label in the label list
colorNoThe color settings for the label

Implementation Reference

  • src/index.ts:513-532 (registration)
    Registration of the 'update_label' tool via server.tool(), with Zod schema for parameters (id, name, messageListVisibility, labelListVisibility, color)
    server.tool("update_label",
      "Update an existing label",
      {
        id: z.string().describe("The ID of the label to update"),
        name: z.string().optional().describe("The display name of the label"),
        messageListVisibility: z.enum(['show', 'hide']).optional().describe("The visibility of messages with this label in the message list"),
        labelListVisibility: z.enum(['labelShow', 'labelShowIfUnread', 'labelHide']).optional().describe("The visibility of the label in the label list"),
        color: z.object({
          textColor: z.string().describe("The text color of the label as hex string"),
          backgroundColor: z.string().describe("The background color of the label as hex string")
        }).optional().describe("The color settings for the label")
      },
      async (params) => {
        const { id, ...labelData } = params
        return handleTool(config, async (gmail: gmail_v1.Gmail) => {
          const { data } = await gmail.users.labels.update({ userId: 'me', id, requestBody: labelData })
          return formatResponse(data)
        })
      }
    )
  • Handler function for update_label: extracts id from params, calls gmail.users.labels.update() with the rest as the request body
    async (params) => {
      const { id, ...labelData } = params
      return handleTool(config, async (gmail: gmail_v1.Gmail) => {
        const { data } = await gmail.users.labels.update({ userId: 'me', id, requestBody: labelData })
        return formatResponse(data)
      })
    }
Behavior1/5

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

No annotations provided, and the description only says 'Update an existing label' without any behavioral details such as whether it replaces all fields, requires the label to exist, or returns a response. This is highly insufficient for a mutation tool.

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

Conciseness2/5

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

While very short, the description is under-specified and fails to provide necessary context. Conciseness should not come at the cost of completeness.

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

Completeness1/5

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

With 5 parameters, nested objects, no output schema, and no annotations, the description is grossly incomplete. It does not mention which fields can be updated (name, visibility, color) or any other critical context.

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?

The input schema covers all parameters with descriptions (100% coverage), so the baseline is 3. The description adds no additional meaning beyond what the schema already provides.

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?

The description clearly states the action 'Update' and the resource 'existing label', which is distinct from create, delete, or get operations. However, it does not explicitly differentiate from 'patch_label' which may be a partial update.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like patch_label, or any prerequisites. The description is too minimal to direct correct invocation.

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/shinzo-labs/gmail-mcp'

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