check_service_status
Check the current status of any cloud service by entering its name. Returns real-time availability from the official status page.
Instructions
Check the current status of a cloud service (via its status page).
Args: service_name: The service name — e.g. "github", "stripe", "openai", "cloudflare", "vercel"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/grounded_mcp/server.py:82-88 (handler)The tool handler function 'check_service_status' that queries the Grounded API for the current status of a cloud service (e.g. github, stripe, openai).
async def check_service_status(service_name: str) -> str: """Check the current status of a cloud service (via its status page). Args: service_name: The service name — e.g. "github", "stripe", "openai", "cloudflare", "vercel" """ return await _query_fact("statuspage", service_name, "status") - src/grounded_mcp/server.py:81-82 (registration)The tool is registered via the '@mcp.tool()' decorator on the async function, using FastMCP.
@mcp.tool() async def check_service_status(service_name: str) -> str: - src/grounded_mcp/server.py:18-44 (helper)The helper function '_query_fact' that makes HTTP requests to the Grounded API and formats the response. Called by check_service_status.
async def _query_fact(source: str, entity: str, field: str) -> str: """Query the Grounded API and return a formatted result.""" headers = {} if API_KEY: headers["X-API-Key"] = API_KEY async with httpx.AsyncClient() as client: resp = await client.get( f"{API_BASE}/v1/fact", params={"source": source, "entity": entity, "field": field}, headers=headers, timeout=10.0, ) if resp.status_code == 200: data = resp.json() return ( f"Value: {data['value']}\n" f"Source: {data['source_url']}\n" f"Fetched at: {data['fetched_at']}\n" f"Hash: {data['raw_response_hash']}\n" f"Tier: {data['tier']} (TTL: {data['ttl_seconds']}s)" ) elif resp.status_code == 404: detail = resp.json().get("detail", "Not found") return f"Not found: {detail}" else: return f"Error: HTTP {resp.status_code}" - src/grounded_mcp/server.py:83-87 (schema)The docstring serves as the schema definition for the tool, describing the 'service_name' parameter and listing valid cloud services.
"""Check the current status of a cloud service (via its status page). Args: service_name: The service name — e.g. "github", "stripe", "openai", "cloudflare", "vercel" """