diff --git a/src/agents/items.py b/src/agents/items.py index 8fb2b52a..f48e54fa 100644 --- a/src/agents/items.py +++ b/src/agents/items.py @@ -248,3 +248,15 @@ def tool_call_output_item( "output": output, "type": "function_call_output", } + + @classmethod + def get_tool_call_name(cls, tool_call: ToolCallItem) -> str: + """Returns the tool name from a ToolCallItem.""" + return tool_call.raw_item.name + + @classmethod + def tool_response_output( + cls, tool_call: ToolCallOutputItem + ): + """Extracts and returns the output from a ToolCallOutputItem.""" + return tool_call.output \ No newline at end of file