# parse_ai_message_to_openai_tool_action

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/output_parsers/openai_tools/parse_ai_message_to_openai_tool_action)

Parse an AI message potentially containing tool_calls.

## Signature

```python
parse_ai_message_to_openai_tool_action(
    message: BaseMessage,
) -> list[AgentAction] | AgentFinish
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/02991cb4cf2063d51a07268edafb05fe53de1826/libs/langchain/langchain_classic/agents/output_parsers/openai_tools.py#L15)