Skip to content

Vercel AI SDK

Use Chronary’s calendar tools directly in the Vercel AI SDK. createChronaryAISDKToolkit returns a tools object you pass straight to generateText / streamText.

Terminal window
npm install @chronary/toolkit @chronary/sdk ai
# plus a model provider, e.g. @ai-sdk/openai
npm install @ai-sdk/openai
import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { createChronaryAISDKToolkit } from '@chronary/toolkit/ai-sdk';
const tools = createChronaryAISDKToolkit({
apiKey: process.env.CHRONARY_API_KEY!,
});
const result = await generateText({
model: openai('gpt-4o'),
tools,
maxSteps: 5, // let the model call tools, then answer
prompt: 'Schedule a 30-minute sync with Alex next Tuesday at 10am.',
});
console.log(result.text);

The model can now call any of the 50 Chronary tools (create events, request human calendar setup, check availability, find meeting times, run scheduling proposals, …). See the full list in the MCP Tools Reference.