Skip to main content
Glama

update_rule

Update an existing Outlook inbox rule by patching its fields, conditions, or actions. Specify changes to replace condition/action blocks, or omit them to keep current settings.

Instructions

Patch fields of an existing inbox mail rule. Pass None to leave a field unchanged.

Replacement semantics for nested blocks: Graph PATCH on messageRules replaces the entire conditions or actions block when you send it. If you pass ANY condition arg (sender_contains, subject_contains, body_contains, body_or_subject_contains, from_addresses, has_attachments) the rule's conditions are rebuilt from ONLY the args you pass — any existing conditions you don't re-specify are dropped. Same for actions (move_to_folder, mark_as_read, delete, stop_processing_rules). If you don't pass any condition or action args, the existing blocks are preserved.

If you want to add to a block without losing the rest, call
``get_rule`` first and re-supply the existing values.

Args: rule_id: Graph rule id. Required. display_name: New display name. None = unchanged. is_enabled: Enable/disable the rule. None = unchanged. sequence: New order (lower runs first). None = unchanged. sender_contains / subject_contains / body_contains / body_or_subject_contains / from_addresses / has_attachments: Passing any of these REPLACES the conditions block. move_to_folder / mark_as_read / delete / stop_processing_rules: Passing any of these REPLACES the actions block. mailbox: Optional mailbox for shared mailboxes. include_raw: Include the raw Graph payload.

Returns: The trimmed updated rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deleteNo
mailboxNo
rule_idYes
sequenceNo
is_enabledNo
include_rawNo
display_nameNo
mark_as_readNo
body_containsNo
from_addressesNo
move_to_folderNo
has_attachmentsNo
sender_containsNo
subject_containsNo
stop_processing_rulesNo
body_or_subject_containsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It fully explains the Graph PATCH replacement behavior: passing any condition arg rebuilds the conditions block from only the args passed, dropping others, and the same for actions. It also discloses that passing no condition/action args preserves existing blocks, and mentions the 'trimmed' return value and the include_raw option. This is critical behavior an agent must know before calling.

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

Conciseness4/5

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

The description is long but every section earns its place. The replacement semantics are front-loaded and explained in a dedicated block, the Args list is organized with grouping and clear phrasing, and the Returns line is brief. It's not verbose for the complexity, though it could trim some redundancy in the repetition of 'None = unchanged' across individual args.

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?

Given 16 parameters and complex nested-block behavior, the description covers everything an agent needs: the replacement semantics, the workaround to preserve existing values, the optional mailbox for shared mailboxes, include_raw for raw payload, and the return value. No critical behavior is left to inference.

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 compensate – and it does. Each parameter is explained with its semantic role: rule_id is required, optional fields default to None meaning unchanged, and the condition/action args are grouped and explicitly tied to the replacement behavior. It adds meaning far beyond the raw types and defaults in the schema.

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 'Patch fields of an existing inbox mail rule' – a specific verb and resource that clearly distinguishes it from create_rule, delete_rule, and get_rule. The phrase 'existing' implies the rule must already exist, and the 'Pass None to leave a field unchanged' adds precision.

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 explicitly explains when to use this tool versus alternatives. It details the replacement semantics – that passing any condition/action arg rebuilds that block, dropping unspecified values – and directly advises 'If you want to add to a block without losing the rest, call get_rule first and re-supply the existing values.' This is concrete, actionable guidance that prevents data loss.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.