Enhancement
There may be errors when listing tools, but i cannot know the existance of errors besides the warning.
from fastmcp import Client
async def main():
client = Client({
"a": {
"command": "uvx",
"args": ["--version"],
},
"b": {
"command": "uvx",
"args": ["--version"],
},
})
await client._connect()
print(await client.list_tools())
if __name__ == "__main__":
import asyncio
asyncio.run(main())
output:
[08/18/25 14:06:00] WARNING Failed to get tools from server: 'FastMCP', mounted at: 'a': Client failed to connect: Connection closed tool_manager.py:86
WARNING Failed to get tools from server: 'FastMCP', mounted at: 'b': Client failed to connect: Connection closed tool_manager.py:86
[]
Is it possible to add an env variable or an argument to explicitly raise an error to inform me?
For example
tools/tool_manager
async def _load_tools(self, *, via_server: bool = False) -> dict[str, Tool]:
try:
...
except Exception as e:
# Skip failed mounts silently, matches existing behavior
+ if os.envron.get("RAISE_ERROR_GET_TOOLS", "false") == "true": raise e
logger.warning(
f"Failed to get tools from server: {mounted.server.name!r}, mounted at: {mounted.prefix!r}: {e}"
)
continue
Enhancement
There may be errors when listing tools, but i cannot know the existance of errors besides the warning.
output:
Is it possible to add an env variable or an argument to explicitly raise an error to inform me?
For example
tools/tool_manager