One tapir endpoint offered to a model as a tool, before it is built into a ToolFunction by EndpointTools.registry.
The tool's parameters are the endpoint's inputs: each path capture, query parameter and request body becomes a property of the tool's JSON schema, under its tapir name (the body under body). A header input is a parameter only when it is listed in modelHeaders; any other header, and every authentication input, is the application's: its value comes from headers, never from the model.
Create one with EndpointTools.tool.
Value parameters
- description
-
the description shown to the model; the endpoint's own description, summary or
METHOD /pathwhen absent - endpoint
-
the tapir endpoint the tool calls
- headers
-
the headers the application sends on every call, such as
Authorization - modelHeaders
-
the header inputs the model may set, by name, compared without regard to case
- name
-
the tool's name, as the model calls it;
[a-zA-Z0-9_-]{1,64} - requiresApproval
-
whether the tool changes something, so that an agent should ask before it runs; read it with EndpointTools.requiringApproval
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any