Open Context Protocol is live! 🚀 Read the launch post

starsAdd

Adds a star to an item.

Details

  • Method: POST
  • Path: /stars.add
  • Operation ID: stars_add

Parameters

{
  "token": {
    "description": "Authentication token. Requires scope: `stars:write`",
    "required": true,
    "location": "header",
    "type": "string"
  },
  "channel": {
    "description": "Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`).",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "file": {
    "description": "File to add star to.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "file_comment": {
    "description": "File comment to add star to.",
    "required": false,
    "location": "formData",
    "type": "string"
  },
  "timestamp": {
    "description": "Timestamp of the message to add star to.",
    "required": false,
    "location": "formData",
    "type": "string"
  }
}

Response Schema

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

Usage

from ocp_agent import OCPAgent

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

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