Skip to main content

Define a Tool

createTool() provides an equivalent function-based constructor. The tool() helper can infer a schema from examples.

Execute Tools Automatically

Execute a Parsed Call

executeParallel() runs multiple independent tool calls concurrently.

Provider Formats

The format helpers convert the universal tool definition for provider APIs.

Validation and Tool Cascading

The core package also exports:
  • ToolValidator for quality and completeness checks.
  • ToolCallDetector for detecting tool intent.
  • ToolCascadeRouter for model and risk-tier selection.
  • ToolCascadeValidator for validating generated tool calls.
  • ToolCascade for the combined tool cascade pipeline.
See Tools and Streaming for agent-loop patterns.