Files
openai--openai-agents-python/docs
Abbas Asad 653abc5f59 Fix #892 by adding proper tool description in context.md (#937)
### Summary

This pull request fixes [issue
#892](https://github.com/openai/openai-agents-python/issues/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"
2025-06-26 08:40:22 +09:00
..
2025-04-21 16:59:01 -04:00
2025-06-04 11:53:17 -04:00
2025-03-11 09:42:28 -07:00
2025-03-23 17:56:55 -04:00
2025-03-11 09:42:28 -07:00
2025-06-04 16:57:19 -04:00
2025-06-04 11:53:17 -04:00
2025-03-11 09:42:28 -07:00
2025-06-09 10:24:51 -04:00