SamplingTool class

A tool definition offered to the client's LLM during sampling (spec 2025-11-25 sampling tool calling, SEP-1577).

Mirrors the shape of a top-level Tool but is transmitted inside a sampling/createMessage request so the model may call it. Round-trips via toJson / fromJson.

Constructors

SamplingTool({required String name, String? description, required Map<String, dynamic> inputSchema})
const
SamplingTool.fromJson(Map<String, dynamic> json)
factory

Properties

description String?
final
hashCode int
The hash code for this object.
no setterinherited
inputSchema Map<String, dynamic>
JSON Schema (2020-12 dialect) describing the tool's arguments.
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited