Skip to main content
Glama
sitebay
by sitebay

sitebay_update_site

Modify SiteBay WordPress site settings including domain, repository URL, Cloudflare dev mode, HTTP authentication, team assignment, and plan type.

Instructions

Update an existing SiteBay site configuration.

Args: fqdn: Site domain to update cf_dev_mode_enabled: Enable/disable Cloudflare dev mode new_fqdn: Change the site domain git_url: Set repository URL for deployments http_auth_enabled: Enable/disable HTTP basic auth team_id: Move site to a different team is_free: Toggle free plan flag

Returns: Confirmation message with updated settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fqdnYes
cf_dev_mode_enabledNo
new_fqdnNo
git_urlNo
http_auth_enabledNo
team_idNo
is_freeNo

Implementation Reference

  • Core implementation of the sitebay_update_site tool. Constructs update data from parameters, calls SiteBayClient.update_site, formats success/error response.
    async def sitebay_update_site(
        client: SiteBayClient,
        fqdn: str,
        cf_dev_mode_enabled: Optional[bool] = None,
        new_fqdn: Optional[str] = None,
        git_url: Optional[str] = None,
        http_auth_enabled: Optional[bool] = None,
        team_id: Optional[str] = None,
        is_free: Optional[bool] = None,
    ) -> str:
        """
        Update an existing SiteBay site configuration.
        
        Args:
            fqdn: The fully qualified domain name of the site to update
            cf_dev_mode_enabled: Enable/disable Cloudflare dev mode
            new_fqdn: New domain for the site
            git_url: Git repository URL
            http_auth_enabled: Enable/disable HTTP basic auth
            team_id: Move site to a different team
            is_free: Toggle free plan flag
        
        Returns:
            Formatted string with update confirmation
        """
        try:
            site_data: Dict[str, Any] = {}
            
            if cf_dev_mode_enabled is not None:
                site_data["cf_dev_mode_enabled"] = cf_dev_mode_enabled
            if new_fqdn:
                site_data["new_fqdn"] = new_fqdn
            if git_url:
                site_data["git_url"] = git_url
            if http_auth_enabled is not None:
                site_data["http_auth_enabled"] = http_auth_enabled
            if team_id:
                site_data["team_id"] = team_id
            if is_free is not None:
                site_data["is_free"] = is_free
            
            if not site_data:
                return "No updates specified. Provide at least one supported field."
            
            site = await client.update_site(fqdn, site_data)
            
            result = f"✅ **Site Updated Successfully!**\n\n"
            result += f"• **Domain**: {site.get('fqdn')}\n"
            result += f"• **Status**: {site.get('status')}\n"
            
            if cf_dev_mode_enabled is not None:
                result += f"• **Cloudflare Dev Mode**: {'Enabled' if cf_dev_mode_enabled else 'Disabled'}\n"
            if new_fqdn:
                result += f"• **New Domain**: {new_fqdn}\n"
            if git_url:
                result += f"• **Git URL**: {git_url}\n"
            if http_auth_enabled is not None:
                result += f"• **HTTP Auth**: {'Enabled' if http_auth_enabled else 'Disabled'}\n"
            if team_id:
                result += f"• **Team ID**: Moved to {team_id}\n"
            if is_free is not None:
                result += f"• **Plan**: {'Free' if is_free else 'Paid'}\n"
            
            return result
            
        except SiteBayError as e:
            return f"Error updating site: {str(e)}"
  • MCP tool registration using @mcp.tool decorator. Initializes SiteBayClient and delegates to the core handler in sites.sitebay_update_site.
    @mcp.tool
    async def sitebay_update_site(
        fqdn: str,
        cf_dev_mode_enabled: Optional[bool] = None,
        new_fqdn: Optional[str] = None,
        git_url: Optional[str] = None,
        http_auth_enabled: Optional[bool] = None,
        team_id: Optional[str] = None,
        is_free: Optional[bool] = None,
    ) -> str:
        """
        Update an existing SiteBay site configuration.
        
        Args:
            fqdn: Site domain to update
            cf_dev_mode_enabled: Enable/disable Cloudflare dev mode
            new_fqdn: Change the site domain
            git_url: Set repository URL for deployments
            http_auth_enabled: Enable/disable HTTP basic auth
            team_id: Move site to a different team
            is_free: Toggle free plan flag
        
        Returns:
            Confirmation message with updated settings
        """
        client = await initialize_client()
        return await sites.sitebay_update_site(
            client,
            fqdn,
            cf_dev_mode_enabled=cf_dev_mode_enabled,
            new_fqdn=new_fqdn,
            git_url=git_url,
            http_auth_enabled=http_auth_enabled,
            team_id=team_id,
            is_free=is_free,
        )

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/sitebay/sitebay-mcp'

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