Open Context Protocol is live! 🚀 Read the launch post

listQueue

Retrieve a list of queues belonging to the account used to make the request

Details

  • Method: GET
  • Path: /2010-04-01/Accounts/{AccountSid}/Queues.json
  • Operation ID: ListQueue

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resources to read.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "PageSize": {
    "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int64"
  },
  "Page": {
    "description": "The page index. This value is simply for client state.",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "PageToken": {
    "description": "The page token. This is provided by the API.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "title": "ListQueueResponse",
  "type": "object",
  "properties": {
    "queues": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date_updated": {
            "type": "string",
            "format": "date-time-rfc-2822",
            "nullable": true,
            "description": "The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
          },
          "current_size": {
            "type": "integer",
            "default": 0,
            "description": "The number of calls currently in the queue."
          },
          "friendly_name": {
            "type": "string",
            "nullable": true,
            "description": "A string that you assigned to describe this resource."
          },
          "uri": {
            "type": "string",
            "nullable": true,
            "description": "The URI of this resource, relative to `https://api.twilio.com`."
          },
          "account_sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^AC[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Queue resource."
          },
          "average_wait_time": {
            "type": "integer",
            "default": 0,
            "description": " The average wait time in seconds of the members in this queue. This is calculated at the time of the request."
          },
          "sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^QU[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The unique string that that we created to identify this Queue resource."
          },
          "date_created": {
            "type": "string",
            "format": "date-time-rfc-2822",
            "nullable": true,
            "description": "The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
          },
          "max_size": {
            "type": "integer",
            "default": 0,
            "description": " The maximum number of calls that can be in the queue. The default is 1000 and the maximum is 5000."
          }
        }
      }
    },
    "end": {
      "type": "integer"
    },
    "first_page_uri": {
      "format": "uri",
      "type": "string"
    },
    "next_page_uri": {
      "format": "uri",
      "nullable": true,
      "type": "string"
    },
    "page": {
      "type": "integer"
    },
    "page_size": {
      "type": "integer"
    },
    "previous_page_uri": {
      "format": "uri",
      "nullable": true,
      "type": "string"
    },
    "start": {
      "type": "integer"
    },
    "uri": {
      "format": "uri",
      "type": "string"
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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