Open Context Protocol is live! 🚀 Read the launch post

chatMeMessage

Share a me message into a channel.

Details

  • Method: POST
  • Path: /chat.meMessage
  • Operation ID: chat_meMessage

Parameters

{
  "token": {
    "description": "Authentication token. Requires scope: `chat:write`",
    "required": false,
    "location": "header",
    "type": "string"
  },
  "channel": {
    "description": "Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "text": {
    "description": "Text of the message to send.",
    "required": false,
    "location": "formData",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "Schema for successful response from chat.meMessage method",
  "properties": {
    "channel": {
      "pattern": "^[CGD][A-Z0-9]{8,}$",
      "title": "Channel-like conversation ID",
      "type": "string"
    },
    "ok": {
      "enum": [
        true
      ],
      "title": "default success response",
      "type": "boolean"
    },
    "ts": {
      "pattern": "^\\d{10}\\.\\d{6}$",
      "title": "Timestamp in format 0123456789.012345",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ],
  "title": "chat.meMessage schema",
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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