Open Context Protocol is live! 🚀 Read the launch post

listMember

Retrieve the members of the queue

Details

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

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to read.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "QueueSid": {
    "description": "The SID of the Queue in which to find the members",
    "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": "ListMemberResponse",
  "type": "object",
  "properties": {
    "queue_members": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "call_sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^CA[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Member resource is associated with."
          },
          "date_enqueued": {
            "type": "string",
            "format": "date-time-rfc-2822",
            "nullable": true,
            "description": "The date that the member was enqueued, given in RFC 2822 format."
          },
          "position": {
            "type": "integer",
            "default": 0,
            "description": "This member's current position in the queue."
          },
          "uri": {
            "type": "string",
            "nullable": true,
            "description": "The URI of the resource, relative to `https://api.twilio.com`."
          },
          "wait_time": {
            "type": "integer",
            "default": 0,
            "description": "The number of seconds the member has been in the queue."
          },
          "queue_sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^QU[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The SID of the Queue the member is in."
          }
        }
      }
    },
    "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('listMember', {
    # Add required parameters here
})