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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/lunatask_mcp/main.py:163-184 (handler)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" - src/lunatask_mcp/main.py:90-92 (registration)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")