Open Context Protocol is live! 🚀 Read the launch post
chatDeleteScheduledMessage

chatDeleteScheduledMessage

Deletes a pending scheduled message from the queue.

Details

  • Method: POST
  • Path: /chat.deleteScheduledMessage
  • Operation ID: chat_deleteScheduledMessage

Parameters

{
  "token": {
    "description": "Authentication token. Requires scope: `chat:write`",
    "required": true,
    "location": "header",
    "type": "string"
  },
  "as_user": {
    "description": "Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "channel": {
    "description": "The channel the scheduled_message is posting to",
    "required": true,
    "location": "formData",
    "type": "string"
  },
  "scheduled_message_id": {
    "description": "`scheduled_message_id` returned from call to chat.scheduleMessage",
    "required": true,
    "location": "formData",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "Schema for successful response from chat.deleteScheduledMessage method",
  "properties": {
    "ok": {
      "enum": [
        true
      ],
      "title": "default success response",
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ],
  "title": "chat.deleteScheduledMessage schema",
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('slack')

# Call this tool
result = await agent.call_tool('chatDeleteScheduledMessage', {
    # Add required parameters here
})