sitebay_get_site
Retrieve detailed WordPress site information including status, versions, URLs, and configuration by providing the domain name.
Instructions
Get detailed information about a specific WordPress site.
Args: fqdn: The fully qualified domain name of the site (e.g., "www.example.com")
Returns: Detailed site information including status, versions, URLs, and configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fqdn | Yes |
Implementation Reference
- src/sitebay_mcp/server.py:83-109 (handler)MCP tool handler for sitebay_get_site: initializes client, calls the sites module implementation, handles errors and logging via Context.@mcp.tool async def sitebay_get_site(ctx: Context, fqdn: str) -> str: """ Get detailed information about a specific WordPress site. Args: fqdn: The fully qualified domain name of the site (e.g., "www.example.com") Returns: Detailed site information including status, versions, URLs, and configuration """ try: await ctx.info(f"Fetching details for site: {fqdn}") client = await initialize_client() result = await sites.sitebay_get_site(client, fqdn) await ctx.info(f"Successfully retrieved details for {fqdn}") return result except SiteBayError as e: await ctx.error(f"SiteBay API error for {fqdn}: {str(e)}") return f"❌ SiteBay Error: {str(e)}" except Exception as e: await ctx.error(f"Unexpected error getting site {fqdn}: {str(e)}") return f"❌ Unexpected error: {str(e)}"
- src/sitebay_mcp/tools/sites.py:57-92 (helper)Core implementation: fetches site details via SiteBayClient.get_site(), formats output string with site info including git integration.async def sitebay_get_site( client: SiteBayClient, fqdn: str ) -> str: """ Get detailed information about a specific WordPress site. Args: fqdn: The fully qualified domain name of the site Returns: Formatted string with detailed site information """ try: site = await client.get_site(fqdn) result = f"**Site Details for {fqdn}**\n\n" result += f"• **Active**: {site.get('active', 'Unknown')}\n" result += f"• **HTTP Auth Enabled**: {site.get('http_auth_enabled', 'Unknown')}\n" result += f"• **Is Free**: {site.get('is_free', 'Unknown')}\n" result += f"• **Git URL**: {site.get('git_url', '—')}\n" result += f"• **Created**: {site.get('created_at', 'Unknown')}\n" result += f"• **Updated**: {site.get('updated_at', 'Unknown')}\n" if site.get('git_enabled'): result += f"• **Git Integration**: Enabled\n" if site.get('git_repo'): result += f"• **Git Repository**: {site.get('git_repo')}\n" return result except SiteBayError as e: return f"Error getting site details: {str(e)}"
- src/sitebay_mcp/server.py:83-83 (registration)FastMCP tool registration decorator for sitebay_get_site.@mcp.tool