fix(settings): log tool source resolution failures (no silent swallow)
This commit is contained in:
@@ -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 "",
|
||||
|
||||
Reference in New Issue
Block a user