Skip to main content
Glama

ping

Check if the LunaTask MCP Server is operational by sending a health-check request and receiving a 'pong' response.

Instructions

Ping health-check tool that returns a static 'pong' response.

This tool serves as a basic health-check endpoint to verify that the MCP server is functioning correctly.

Args: ctx: The execution context providing access to logging and other MCP capabilities.

Returns: str: The 'pong' response text.

Raises: asyncio.CancelledError: If the operation is cancelled during execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The ping tool handler is implemented as an async method within the CoreServer class in src/lunatask_mcp/main.py. It takes a context object and returns 'pong'.
    async def ping_tool(self, ctx: Context) -> str:
        """Ping health-check tool that returns a static 'pong' response.
    
        This tool serves as a basic health-check endpoint to verify that
        the MCP server is functioning correctly.
    
        Args:
            ctx: The execution context providing access to logging and other MCP capabilities.
    
        Returns:
            str: The 'pong' response text.
    
        Raises:
            asyncio.CancelledError: If the operation is cancelled during execution.
        """
        try:
            await ctx.info("Ping tool called, returning pong")
        except asyncio.CancelledError:
            await ctx.info("Ping tool execution cancelled")
            raise
        else:
            return "pong"
  • The ping tool is registered in the CoreServer._register_tools method by passing self.ping_tool to self.app.tool with the name 'ping'.
    def _register_tools(self) -> None:
        """Register all tools and resources with the FastMCP instance."""
        self.app.tool(self.ping_tool, name="ping")

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/tensorfreitas/lunatask-mcp'

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