Skip to main content
Glama

list_twilio_subaccounts

Retrieve and manage Twilio subaccounts by listing all available accounts or filtering them using friendly names for better organization and oversight.

Instructions

List all Twilio subaccounts or filter by friendly name. Provide an empty string for all subaccounts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The @mcp.tool decorator and the handler function that implements the tool logic by delegating to AsyncTwilioManager.list_subaccounts()
    @mcp.tool( name="list_twilio_subaccounts", description="List all Twilio subaccounts or filter by friendly name. Provide an empty string for all subaccounts", ) async def list_all_twilio_subaccounts() -> list[dict]: """ List all Twilio subaccounts or filter by friendly name. Args: friendly_name: Optional filter by friendly name (empty string for all) Returns: List of subaccount details """ async with async_twilio_manager: return await async_twilio_manager.list_subaccounts()
  • Core helper method in AsyncTwilioManager that performs the actual Twilio API call to list subaccounts, supporting optional friendly_name filter and with_token flag.
    async def list_subaccounts( self, friendly_name: Optional[str] = None, with_token: bool = False ) -> List[Dict]: """ List all subaccounts or filter by friendly name. Args: friendly_name: Optional filter by friendly name Returns: List of subaccount details """ try: params = {} if friendly_name: params["friendly_name"] = friendly_name accounts = await self.client.api.v2010.accounts.list_async(**params) return [ { "sid": account.sid, "friendly_name": account.friendly_name, "auth_token": account.auth_token if with_token else None, } for account in accounts ] except Exception as e: self.logger.error(f"Failed to list subaccounts: {str(e)}") raise

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/errajibadr/twilio_manager_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server