Skip to main content
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.
input
unknown
required
Tool input (string or serializable object).
return
this for chaining.

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.
output
unknown
required
Tool output (string or serializable object).
return
this for chaining.

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

Set the tool/function definitions available in this context.
definitions
Record<string, unknown>[]
required
Array of tool definition objects.
return
this for chaining.

setToolName(name: string): this

Set the canonical tool/function name.
name
string
required
Tool name (e.g. "web_search", "calculator").
return
this for chaining.