Skip to main content
Glama

update_message

Modify existing Slack messages by providing channel ID, timestamp, and new text content to correct errors or update information.

Instructions

Update an existing message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYesChannel ID
tsYesMessage timestamp
textYesNew message text

Implementation Reference

  • The main execution handler for the 'update_message' tool. It validates input using updateMessageSchema, calls Slack's chat.update method, and returns the updated message details.
    export async function updateMessage(client: SlackClientWrapper, args: unknown) {
      const params = updateMessageSchema.parse(args);
    
      return await client.safeCall(async () => {
        const result = await client.getClient().chat.update({
          channel: params.channel,
          ts: params.ts,
          text: params.text,
        });
    
        return {
          ok: true,
          channel: result.channel,
          ts: result.ts,
          message: result.message,
        };
      });
    }
  • Zod schema for input validation of the update_message tool, requiring channel ID, message timestamp, and new text.
    export const updateMessageSchema = z.object({
      channel: channelIdSchema,
      ts: timestampSchema,
      text: z.string().min(1),
    });
  • src/index.ts:427-427 (registration)
    Registers the 'update_message' tool handler in the toolHandlers map, delegating to messageTools.updateMessage.
    update_message: (args) => messageTools.updateMessage(slackClient, args),
  • src/index.ts:195-216 (registration)
    Defines the 'update_message' tool in the tools list for list_tools, including JSON input schema mirroring the Zod schema.
    {
      name: 'update_message',
      description: 'Update an existing message',
      inputSchema: {
        type: 'object',
        properties: {
          channel: {
            type: 'string',
            description: 'Channel ID',
          },
          ts: {
            type: 'string',
            description: 'Message timestamp',
          },
          text: {
            type: 'string',
            description: 'New message text',
          },
        },
        required: ['channel', 'ts', 'text'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool updates a message, implying a mutation, but doesn't disclose any behavioral traits such as required permissions, whether updates are reversible, rate limits, or what happens if the message doesn't exist. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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?

The description is a single, efficient sentence with zero waste: 'Update an existing message'. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration. Every word earns its place, making it highly concise and well-structured.

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

Completeness2/5

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

Given the tool's complexity as a mutation operation, lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions or error handling, and with no output schema, it should ideally hint at return values. For a 3-parameter mutation tool, the description is too minimal to provide adequate 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 has 100% description coverage, with clear documentation for 'channel', 'ts', and 'text' parameters. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter relationships, constraints, or usage examples. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing message' clearly states the verb ('Update') and resource ('an existing message'), making the basic purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'send_message' or 'delete_message' beyond the obvious update vs. create/delete distinction, and it doesn't specify what aspects of a message can be updated beyond the implied text change.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing message), exclusions (e.g., cannot update messages in archived channels), or comparisons to siblings like 'send_message' for new messages or 'delete_message' for removal. Usage is implied by the name but not explicitly stated.

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/Hais/slack-bot-mcp'

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