@defaulthq/ai-tools package wraps every public API endpoint as a standard tool() definition.
Your agent reads the tool descriptions, decides what to call, and the package handles the
requests.
This is a server side package. It holds your API key, so it must never run in a browser.
Install both packages
ai package.
Use
Bind your Default API key once, then spread the tools into anygenerateText or streamText call.
triggers:write and scheduling:write permissions.
What the model needs from you
The tool descriptions teach the model how to chain the flow. Your prompt supplies what the API cannot know: today’s date and the lead’s timezone, as in the example above. The model has no clock, so without the date a request for slots “next week” can use dates from the past. Without the timezone it can read “Tuesday at 3pm” in the wrong one and book the wrong slot.The tools
Routing and booking. The four steps from Route and book through the API, as tools the agent chains on its own.
Direct booking. For booking on an event without a workflow.
Manage meetings.