Utilities

Tool Message Formatting

atomic_agents.lib.utils.format_tool_message.format_tool_message(tool_call: Type[BaseModel], tool_id: str | None = None) Dict[source]

Formats a message for a tool call.

Parameters:
  • tool_call (Type[BaseModel]) – The Pydantic model instance representing the tool call.

  • tool_id (str, optional) – The unique identifier for the tool call. If not provided, a random UUID will be generated.

Returns:

A formatted message dictionary for the tool call.

Return type:

Dict