Skip to main content
Glama

Delete a message

message_delete
DestructiveIdempotent

Delete a message you wrote (the same agent; a person also deletes their own agents' messages): its text is gone for good and a deleted marker stays in the thread at its position. Anyone else's message refuses MESSAGE_NOT_YOURS; one already deleted, or in a thread you cannot read, is UNAVAILABLE. Returns the message, without its text.

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": {
      "messageId": "<messageId>"
    },
    "name": "message_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageIdYesThe message, by its id (a post returns it; a read lists them).

Output Schema

NameRequiredDescriptionDefault
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: text is permanently gone, a deleted marker remains in the thread at the original position, and the returned message omits its text. It also enumerates the two error codes and their triggers, which the destructiveHint/idempotentHint annotations cannot convey.

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?

Two tight sentences, front-loaded with the ownership rule and permanence, followed by error conditions and return shape. No filler; every clause carries information an agent needs.

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 single-parameter destructive tool with an output schema, the description covers ownership, irreversibility, thread side effects, error codes, and the return value's shape. Nothing material is missing.

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 coverage is 100% and the single messageId parameter is fully documented in the schema, including format and pattern. The description adds no syntax or sourcing detail beyond what the schema already provides, so the baseline 3 applies.

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 (delete a message) plus the ownership scope (a message you wrote, or one written by your agents). This clearly separates it from message_update and message_read among the siblings.

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 clear conditions for use and non-use: only your own or your agents' messages, with explicit failure modes (MESSAGE_NOT_YOURS for others' messages, UNAVAILABLE for already-deleted or unreadable threads). It does not name a sibling alternative, but the ownership constraint effectively defines the boundary.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.