Skip to main content
Glama

check_typesense_health

Verify the health status of a configured Typesense server to ensure optimal search performance and database functionality.

Instructions

Checks the health status of the configured Typesense server. Args: ctx (Context): The MCP context, providing access to application resources. Returns: dict | str: The health status dictionary from Typesense or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:94-114 (handler)
    The handler function for the 'check_typesense_health' tool. It is registered via the @mcp.tool() decorator and executes the logic to check the Typesense server's health using the client from the application context.
    @mcp.tool() async def check_typesense_health(ctx: Context) -> dict | str: """ Checks the health status of the configured Typesense server. Args: ctx (Context): The MCP context, providing access to application resources. Returns: dict | str: The health status dictionary from Typesense or an error message. """ # Access the Typesense client from the lifespan context try: client: typesense.Client = ctx.request_context.lifespan_context.client health_status = await client.health.retrieve() return health_status except Exception as e: # Log the exception ideally print(f"Error checking Typesense health: {e}") return f"Error connecting to Typesense or checking health: {e}"

Other Tools

Related Tools

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/avarant/typesense-mcp-server'

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