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

# decorators.ToolCall

> Tool_Call utilities for decorators for automatic logging and instrumentation of functions and methods.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/decorators/tool_call.py)

#### current\_tool\_call

```python theme={null}
def current_tool_call() -> Optional[ToolCall]
```

Get the current tool call from the context variable.

#### tool\_call

```python theme={null}
def tool_call(logger: Optional[Logger] = None,
              id: Optional[Union[str, Callable]] = None,
              name: Optional[str] = None,
              description: Optional[str] = None,
              arguments: Optional[str] = None,
              tags: Optional[Dict[str, str]] = None,
              evaluators: Optional[List[str]] = None,
              evaluator_variables: Optional[Dict[str, str]] = None)
```

Decorator for tracking tool calls.

This decorator wraps functions to automatically create and manage [ToolCall](/sdk/python/references/models/prompt)
objects for tracking tool calls, including inputs, outputs, and metadata.
The decorated function must be called within a @trace or @span decorated context.
