OptionaldescriptionFree-text description of when and how the model should use this tool.
JS function invoked when the model calls this tool. Receives the parsed arguments object as its single parameter; the return value is stringified (or JSON-encoded) and threaded back to the model as the tool result. If the function throws, the error is reported to the model so it can recover.
Optionalinput_JSON Schema describing the arguments the model will pass to the executor. Typically { type: "object", properties: {...}, required: [...] }. Optional — when omitted/null the tool is treated as taking no arguments. May be a JS object literal (Polyglot Value) or a Java Map/List tree depending on how the tool was constructed; use B.ai.tool.getInputSchema(tool) for a JS-friendly view. Typed as JSONSchema so an AiTool value is structurally a AiToolLiteral<JSONSchema> and can flow into B.ai.call's typed tools array.
Tool name. Must be unique within a single B.ai.call invocation. Required at execution time — tools whose name is null/blank are skipped with a warning.
A tool declaration plus its JS executor, exposed to the AI model in B.ai.call.