From 1da3587334732abebc9f6167366838f34700ec7c Mon Sep 17 00:00:00 2001 From: Chaim Date: Mon, 4 May 2026 06:37:09 +0000 Subject: [PATCH] fix(settings): log tool source resolution failures (no silent swallow) --- web/mcp_introspection.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/mcp_introspection.py b/web/mcp_introspection.py index fbaa54e..131122a 100644 --- a/web/mcp_introspection.py +++ b/web/mcp_introspection.py @@ -4,8 +4,11 @@ from __future__ import annotations import inspect +import logging from typing import Any +logger = logging.getLogger(__name__) + async def list_mcp_tools() -> list[dict[str, Any]]: """List all registered MCP tools with metadata.""" @@ -24,8 +27,10 @@ async def list_mcp_tools() -> list[dict[str, Any]]: _, line = inspect.getsourcelines(fn) source_location = f"{file}:{line}" module = fn.__module__ - except Exception: - pass + except Exception as e: + logger.debug( + "tool_source_resolution_failed name=%s err=%s", t.name, e, + ) out.append({ "name": t.name, "description": t.description or "",