ToolSpec class final

One tool.

parameters is the full JSON Schema of the arguments: the grammar, the typed parsing and the validation use it. promptDeclaration, when set, is the exact entry the model reads in the prompt's tool block (a fine-tune may have learned a shorter form than the full schema).

Constructors

ToolSpec({required String name, required String description, Map<String, Object?> parameters = const {'type' : 'object', 'properties' : {}}, SideEffect sideEffect = SideEffect.read, Map<String, Object?>? promptDeclaration})
const

Properties

declaration → Map<String, Object?>
The tool-block entry: promptDeclaration unchanged when set, else {'type': 'function', 'function': {'name': …, 'description': …, 'parameters': …}} in that key order, with the x-* extension keywords removed from every schema object at any depth (property names are kept).
no setter
description → String
What it does, for the model.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
The name the model calls it by.
final
parameters → Map<String, Object?>
The JSON Schema of the arguments (an object schema).
final
promptDeclaration → Map<String, Object?>?
The tool-block entry the model reads, verbatim; null derives it from the other fields.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sideEffect → SideEffect
What running it does; the assistant (L3) reads it, the model layer ignores it.
final

Methods

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

Operators

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