From 9e345f3cb742f5046d923858cc2d0923a3a9590f Mon Sep 17 00:00:00 2001 From: Gtax2006 Date: Thu, 28 May 2026 00:11:32 +0800 Subject: [PATCH] feat: add public list_tools() method to CapiscioMCPServer --- capiscio_mcp/integrations/mcp.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/capiscio_mcp/integrations/mcp.py b/capiscio_mcp/integrations/mcp.py index 643fab0..97bef2e 100644 --- a/capiscio_mcp/integrations/mcp.py +++ b/capiscio_mcp/integrations/mcp.py @@ -454,6 +454,16 @@ def server(self) -> "FastMCP": def identity_meta(self) -> Dict[str, str]: """The identity ``_meta`` dict (DID + badge) used in initialize responses.""" return self._identity_meta.copy() + def list_tools(self) -> List[str]: + """Return a list of registered tool names. + + This is the public API for inspecting registered tools. + + Returns: + A sorted list of registered tool names. + """ + return sorted(self._tools.keys()) + # ------------------------------------------------------------------ # Identity meta builder