You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#892 by adding proper tool description in context.md (#937)
### Summary
This pull request fixes [issue
#892](#892) by
adding a missing docstring to the `fetch_user_age` tool function in
`docs/context.md`.
### Problem
Many non-OpenAI LLMs (such as Claude, Gemini, Mistral, etc.) are unable
to use the `fetch_user_age` function because it lacks a docstring. As a
result, they return responses like:
> "I cannot determine the user's age because the available tools lack
the ability to fetch user-specific information."
### Changes Made
- Added a one-line docstring to the `fetch_user_age` function
- Improved return statement to match expected tool output
```python
@function_tool
async def fetch_user_age(wrapper: RunContextWrapper[UserInfo]) -> str:
"""Fetch the age of the user. Call this function to get user's age information."""
return f"The user {wrapper.context.name} is 47 years old"
0 commit comments