Skip to content

Commit 1ff369b

Browse files
committed
fix(mcp): use 'is not None' to cache empty tools list correctly
1 parent fedc809 commit 1ff369b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/agents/mcp/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ async def list_tools(
830830

831831
try:
832832
# Return from cache if caching is enabled, we have tools, and the cache is not dirty
833-
if self.cache_tools_list and not self._cache_dirty and self._tools_list:
833+
if self.cache_tools_list and not self._cache_dirty and self._tools_list is not None:
834834
tools = self._tools_list
835835
else:
836836
# Fetch the tools from the server

0 commit comments

Comments
 (0)