Skip to main content
Glama

graph_delete_chat_message

Soft-delete a chat message or restore a previously deleted one via Microsoft Graph, using the user ID; messages remain recoverable.

Instructions

Soft delete a chat message, or restore one with restore.

Graph only exposes this action under /users/{user_id}, so the user ID is required. There is no hard delete, so a deleted message stays recoverable.

Args: chat_id: The chat ID. message_id: The message ID to delete. user_id: The user ID that sent the message. restore: Whether to restore a previously deleted message (default false).

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": {
      "chat_id": "<chat_id>",
      "message_id": "<message_id>",
      "user_id": "<user_id>"
    },
    "name": "graph_delete_chat_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_idYes
restoreNo
user_idYes
message_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.3/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 that deletion is soft and reversible, that no hard delete exists, and that Graph only exposes the action under /users/{user_id}, forcing the user ID. It omits permission/scope requirements and what the response contains, so not a 5.

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?

Front-loaded with the core action, followed by the most important constraint (path requires user_id) and reversibility note, then a tidy Args list. A couple of Args lines merely restate the parameter names, which is minor padding given 0% schema coverage.

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?

For a 4-parameter mutation tool with no annotations and no output schema, the definition covers mode selection, mutability semantics, recoverability, and the routing constraint on user_id. It lacks any statement about required permissions or response shape, which is a modest gap rather than a blocking one.

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 0%, so the description must compensate, and it does document all four parameters in an Args block. It adds real meaning for `restore` (default false, restores a previously deleted message) and clarifies that `user_id` is the sender, though chat_id and message_id are only lightly restated.

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 ('Soft delete a chat message') plus a second mode ('restore one with `restore`'). The chat-message scope distinguishes it from the channel-message sibling without the agent needing to open either schema.

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?

Explains the two modes of operation (delete vs. restore via the `restore` flag) and notes that there is no alternative hard-delete path, which implicitly tells the agent this is the only deletion route. It does not explicitly contrast with sibling tools such as graph_delete_channel_message, keeping it short of a 5.

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