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

# FiddlerToolSpan

> Span wrapper for tool/function invocations with tool-specific attribute

Span wrapper for tool/function invocations with tool-specific attribute
helpers.

Created via FiddlerClient.startTool.  All setter methods return
`this` for fluent chaining.

## Methods

### `setInput(input: unknown): this`

Set the input passed to the tool.

Overrides the base FiddlerSpan.setInput to write to
`gen_ai.tool.input` instead of `gen_ai.llm.input.user`.

<ParamField path="input" type="unknown" required={true}>
  Tool input (string or serializable object).
</ParamField>

<ResponseField name="return">
  `this` for chaining.
</ResponseField>

### `setOutput(output: unknown): this`

Set the output returned by the tool.

Overrides the base FiddlerSpan.setOutput to write to
`gen_ai.tool.output` instead of `gen_ai.llm.output`.

<ParamField path="output" type="unknown" required={true}>
  Tool output (string or serializable object).
</ParamField>

<ResponseField name="return">
  `this` for chaining.
</ResponseField>

### `setToolDefinitions(definitions: Record<string, unknown>[]): this`

Set the tool/function definitions available in this context.

<ParamField path="definitions" type="Record<string, unknown>[]" required={true}>
  Array of tool definition objects.
</ParamField>

<ResponseField name="return">
  `this` for chaining.
</ResponseField>

### `setToolName(name: string): this`

Set the canonical tool/function name.

<ParamField path="name" type="string" required={true}>
  Tool name (e.g. `"web_search"`, `"calculator"`).
</ParamField>

<ResponseField name="return">
  `this` for chaining.
</ResponseField>
