Exam 1z0-1157-26 Topic 1 Question 59 Discussion
Actual exam question for Oracle's 1z0-1157-26 exam
Question #: 59
Topic #: 1
Question #: 59
Topic #: 1
What does the @function_tool decorator do in the OpenAI Agents SDK?
Suggested Answer: A Vote an answer
The @function_tool decorator converts an ordinary Python function into a FunctionTool that can be exposed to an agent for model-directed invocation. The Agents SDK automatically derives important tool metadata: by default, the Python function name becomes the tool name, its docstring supplies the tool description, and the function signature is converted into a JSON schema describing the expected arguments. This structured representation allows the language model to determine when the function is relevant and generate valid arguments for it. The decorator does not inherently expose the function as a REST endpoint, persist return values to disk, or guarantee automatic retries whenever execution fails. This mechanism corresponds closely to OCI Enterprise AI Agents' Function Calling model, where application-controlled functions extend an agent beyond pure model generation and enable controlled interaction with external business logic. OpenAI GitHub
by Regina at Sep 16, 2026, 04:51 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).