Skip to main content
Glama
piekstra

Slack MCP Server

by piekstra

update_message

Modify existing Slack messages by updating text content and rich formatting blocks in specified channels.

Instructions

Update an existing Slack message.

Args: channel: Channel ID where the message exists ts: Timestamp of the message to update text: New message text (fallback text for notifications) blocks: JSON string of Block Kit blocks for rich formatting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
tsYes
textYes
blocksNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler implementation for 'update_message'. Creates a SlackClient instance, parses optional blocks JSON, calls the client's update_message method, and returns the JSON-formatted result or error.
    @mcp.tool()
    async def update_message(channel: str, ts: str, text: str, blocks: Optional[str] = None) -> str:
        """
        Update an existing Slack message.
    
        Args:
            channel: Channel ID where the message exists
            ts: Timestamp of the message to update
            text: New message text (fallback text for notifications)
            blocks: JSON string of Block Kit blocks for rich formatting
        """
        try:
            client = SlackClient()
            blocks_data = json.loads(blocks) if blocks else None
            result = await client.update_message(channel, ts, text, blocks_data)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
  • SlackClient helper method that constructs the request payload and calls Slack API endpoint 'chat.update' via _make_request to update the message.
    async def update_message(
        self, channel: str, ts: str, text: str, blocks: Optional[List[Dict[str, Any]]] = None
    ) -> Dict[str, Any]:
        """Update an existing message."""
        data = {"channel": channel, "ts": ts, "text": text}
    
        if blocks:
            data["blocks"] = blocks
    
        return await self._make_request("POST", "chat.update", json_data=data)
  • The @mcp.tool() decorator registers the update_message function as an MCP tool with FastMCP instance.
    @mcp.tool()
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 but lacks details on permissions required (e.g., if the user must be the original poster), whether edits are reversible, rate limits, or what the output contains (though an output schema exists). The description is minimal and doesn't compensate for the missing annotations.

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 appropriately sized and front-loaded: the first sentence states the purpose clearly. The 'Args' section is structured but could be more integrated. There's minimal waste, though it could be slightly more concise by merging the purpose and parameter explanations into a smoother flow.

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

Completeness3/5

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

Given the tool's moderate complexity (4 parameters, no annotations, but with an output schema), the description is somewhat complete but has gaps. It covers the basic action and parameter hints, but lacks behavioral context and usage guidelines. The output schema mitigates the need to explain return values, but overall, it's adequate with clear room for improvement.

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 description coverage is 0%, so the description must compensate. It adds some semantics by explaining 'text' as 'New message text (fallback text for notifications)' and 'blocks' as 'JSON string of Block Kit blocks for rich formatting,' which clarifies beyond the schema's basic types. However, it doesn't explain 'channel' or 'ts' (timestamp format), leaving two parameters with no semantic context, resulting in partial compensation.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Update an existing Slack message.' It specifies the verb ('update') and resource ('Slack message'), making the action unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'edit_message' (if such existed) or explain how it differs from 'send_message' for modifications.

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 message ownership or permissions), compare it to sibling tools like 'delete_message' or 'send_message' for corrections, or specify scenarios where updating is preferred over deleting and resending. Usage is implied but not articulated.

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/piekstra/slack-mcp-server'

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