Skip to main content
Glama
errajibadr

TwilioManager MCP

by errajibadr

get_regulatory_bundle_sid

Retrieve the regulatory bundle SID for a Twilio subaccount to manage compliance requirements and documentation.

Instructions

Get the regulatory bundle SID for a Twilio subaccount

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subaccount_sidYes

Implementation Reference

  • The MCP tool handler function that retrieves the regulatory bundle SID for a given subaccount SID by calling the AsyncTwilioManager helper.
    async def get_regulatory_bundle_sid(subaccount_sid: str) -> str | None:
        """
        Get the regulatory bundle SID for a Twilio subaccount
        Args:
            subaccount_sid: The SID of the Twilio subaccount
        Returns:
            The regulatory bundle SID for the Twilio subaccount
        """
        print(f"Getting regulatory bundle SID for subaccount {subaccount_sid}")
        async with async_twilio_manager:
            return await async_twilio_manager.get_bundle_sid(subaccount_sid)
  • The @mcp.tool decorator registering the tool with its name and description.
    @mcp.tool(
        name="get_regulatory_bundle_sid",
        description="Get the regulatory bundle SID for a Twilio subaccount",
    )
  • The AsyncTwilioManager method that implements the core logic: lists all regulatory bundles and returns the SID of the one associated with the given subaccount SID.
    async def get_bundle_sid(self, subaccount_sid: Optional[str] = None) -> Optional[str]:
        """
        Get the bundle SID for a subaccount.
        """
        bundles = await self.client.numbers.v2.regulatory_compliance.bundles.list_async()
        for bundle in bundles:
            if bundle.account_sid == subaccount_sid:
                return bundle.sid
        return None

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