A definition only. Toolset.toAnthropic builds the array to pass as
tools on a messages.create call, and every tool_use block that comes
back goes to Toolset.call, whose text is the content of the
tool_result block you send in reply.
// Each tool_use block carries a name and an input object: asyncfunctionused(name: string, input: Record<string, unknown>) { consttext = awaittoolset.call(name, input) // text -> the content of a tool_result block, back to the model }
One tool as the Anthropic Messages API takes it.
A definition only. Toolset.toAnthropic builds the array to pass as
toolson amessages.createcall, and everytool_useblock that comes back goes to Toolset.call, whose text is thecontentof thetool_resultblock you send in reply.Example