> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atla-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool Invocations

> Properly log function-based tool calls in your AI agent traces

Ensure function-based tool calls are properly logged and traced within your AI agent workflows. The `@tool` decorator helps capture tool usage patterns and performance metrics.

## Tool Decoration

Wrap your custom tools with the `@tool` decorator to ensure they appear in traces.

<CodeGroup>
  ```python icon="python" lines theme={null}
  from atla_insights import tool

  @tool  # [!code ++]
  def get_weather(location: str) -> str:
      """Get current weather for a location"""
      response = weather_api.get_current(location)
      return f"Weather in {location}: {response.condition}, {response.temperature}°F"
  ```

  ```code icon="square-js" theme={null}
  coming soon...
  ```
</CodeGroup>
