Open Context Protocol is live! 🚀 Read the launch post

viewsPush

Push a view onto the stack of a root view.

Details

  • Method: GET
  • Path: /views.push
  • Operation ID: views_push

Parameters

{
  "token": {
    "description": "Authentication token. Requires scope: `none`",
    "required": true,
    "location": "header",
    "type": "string"
  },
  "trigger_id": {
    "description": "Exchange a trigger to post to the user.",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "view": {
    "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.",
    "required": true,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": true,
  "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.",
  "properties": {
    "ok": {
      "enum": [
        true
      ],
      "title": "default success response",
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ],
  "title": "Default success template",
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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