Skip to main content
Glama

graph_categorize_mail

Replaces categories on up to 50 Outlook messages by applying master category display names, with per-message results; use an empty list to clear categories.

Instructions

Set the categories on messages, replacing the categories already set.

Each category must match the display name of a master category, so create it with graph_create_master_category first. Processes each message in order and reports per-message outcomes.

Args: message_ids: Message IDs to update (1-50 per call). categories: Category display names to apply. An empty list clears them. mailbox: Shared mailbox address or user ID to act on. Empty targets your own mailbox. Requires the delegated Mail.*.Shared permissions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message_ids": "<message_ids>",
      "categories": "<categories>"
    },
    "name": "graph_categorize_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
mailboxNo
categoriesYes
message_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses destructive overwrite semantics, that an empty categories list clears them, that messages are processed sequentially with per-message outcome reporting, the 50-item batch cap, and that shared mailboxes require delegated Mail.*.Shared permissions. It does not say whether a mid-batch failure aborts the remaining messages or whether the operation is retry-safe.

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?

Front-loaded with the operation and its replacement semantics, then the prerequisite, then the batch behavior, then per-argument notes. Every sentence adds a fact an agent needs; there is no filler.

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

Completeness5/5

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

For a no-annotation, no-output-schema batch mutation, the definition covers scope, overwrite risk, prerequisite, batch bounds, mailbox targeting and permissions. The only thin spot is atomicity on partial failure, which is largely covered by the per-message outcome reporting note.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry every parameter, and it does: message_ids with its 1-50 bound, categories as display names with the empty-list-clears rule, and mailbox with its default (own mailbox) and permission implication. That is meaning well beyond the bare JSON types.

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 plus the critical semantic twist: 'Set the categories on messages, replacing the categories already set.' It also differentiates itself from the sibling graph_create_master_category by casting that tool as the prerequisite step, so an agent knows this is the apply step, not the define step.

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?

Gives a clear precondition — the category must already exist as a master category, created via graph_create_master_category first — which is the main thing that can make a call fail. It stops short of explicit when-not-to-use guidance (e.g. using it for single-message edits or bulk over 50) beyond the batch bound.

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