Skip to content

Commit ea9a6c3

Browse files
author
Motta Kin
committed
Fix test for instructions in test_mcp
1 parent f067645 commit ea9a6c3

File tree

1 file changed

+1
-1
lines changed
  • pydantic_ai_slim/pydantic_ai

1 file changed

+1
-1
lines changed

pydantic_ai_slim/pydantic_ai/mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def server_info(self) -> mcp_types.Implementation:
204204
@property
205205
def instructions(self) -> str | None:
206206
"""Access the instructions sent by the MCP server during initialization."""
207-
if getattr(self, '_instructions', None) is None:
207+
if not hasattr(self, '_instructions'):
208208
raise AttributeError(
209209
f'The `{self.__class__.__name__}.instructions` is only available after initialization.'
210210
)

0 commit comments

Comments
 (0)