Skip to content

AI agents

Language models get dates wrong: time zones, daylight saving, “next Friday”, overlapping calendars. weekwise gives them tools that compute these exactly, and a calendar the user picks a time in, right in the conversation.

Package
@weekwise/mcp An MCP server for Claude and other MCP clients, ready to run.
@weekwise/agent-tools The same tools for your own agent: tool definitions with JSON Schema, and plain functions.
Tool
find_free_slots Times a meeting of a given length fits around everyone’s busy time, optionally within working hours and days.
detect_conflicts Every pair of events that overlap, with the overlapping period.
resolve_datetime An exact ISO date-time from the parts of a request: a date or now, +2 weeks, the next Friday, at 15:00.
show_calendar An interactive calendar in the conversation, where the user picks a time. MCP server only.

Results have ISO 8601 times with the offset of the time zone (2026-12-11T15:00:00+01:00) and a label to show people. The tools work offline and connect to no calendar account: the assistant passes in the events it already has, for example from a calendar connector.

The server runs on the user’s machine and needs Node.js 22 or later. --time-zone is the zone of the calls that name none; it defaults to the system’s. Clients that connect to MCP servers only by URL, such as claude.ai in the browser, use the hosted server.

Terminal window
claude mcp add weekwise -- npx -y @weekwise/mcp --time-zone Europe/Berlin

Then ask as usual, for example: I need 45 minutes with Anna next week. I’m busy Monday 10–12 and all of Wednesday. Find times and let me pick one.

show_calendar is an MCP App: in clients that support them, such as Claude Desktop, it renders a weekwise calendar inside the conversation. The user’s events are busy time, hatched and in place, each with its time first; the times the assistant proposes can be moved, resized, or replaced by one the user draws. Days off are hatched too and take no times. The month tab sums up each day: how many times are proposed, the chosen one, and when the user is busy. A click on a day opens it in the view the times are picked in.

A week calendar in a chat with busy time, two proposed times and the user’s choice sent as a message

When the user confirms, the choice becomes their next message, with exact times in the calendar’s zone, so the assistant books what was chosen and nothing else:

I choose 08/12/2026, 14:00 - 15:00 (2026-12-08T14:00:00+01:00 – 2026-12-08T15:00:00+01:00, Europe/Berlin).

The calendar speaks the conversation’s language, follows the client’s light or dark theme, and shows only the hours and days the assistant asked for. Some clients put the message in the chat input for the user to send rather than sending it themselves. Clients without MCP Apps are not offered show_calendar by the local server, so there the assistant proposes the times in text. The hosted server answers each request apart and cannot tell, so it offers show_calendar to every client.

Input
events The user’s events in the period, shown as busy time.
proposals Times the assistant proposes; the first starts selected.
title Heading above the calendar.
view, date "week" (default) or "day", around a "YYYY-MM-DD" day.
hours Visible hours, { from: 7, to: 21 } by default: times stay within them.
workingDays Days the user can pick, 0 = Sunday … 6 = Saturday.
timeStep Minutes the times snap to, 15 by default.
timeZone, locale The zone of the times and the language of the calendar.

@weekwise/agent-tools has a definition per tool with a JSON Schema (draft 2020-12) of its input, and runs the calls a model makes through any date adapter that supports time zones.

Terminal window
npm install @weekwise/agent-tools @weekwise/adapter-temporal
import Anthropic from "@anthropic-ai/sdk";
import { TemporalAdapter } from "@weekwise/adapter-temporal";
import { AgentToolError, agentTools, runAgentTool, type ZoneSettings } from "@weekwise/agent-tools";
const tools = agentTools.map(({ name, description, inputSchema }) => ({
name,
description,
input_schema: inputSchema,
}));
const createAdapter = ({ timeZone, locale }: ZoneSettings) =>
new TemporalAdapter({ timeZone: timeZone ?? "Europe/Berlin", locale });
// for each tool_use block of a response
function toolResult(block: Anthropic.ToolUseBlock): Anthropic.ToolResultBlockParam {
try {
const result = runAgentTool(block.name, block.input, createAdapter);
return { type: "tool_result", tool_use_id: block.id, content: JSON.stringify(result) };
} catch (error) {
// input the model got wrong: it reads the message and corrects the call
if (!(error instanceof AgentToolError)) throw error;
return { type: "tool_result", tool_use_id: block.id, content: error.message, is_error: true };
}
}

Other providers take the same name, description and JSON Schema under their own field names. The tools are also plain functions:

import { TemporalAdapter } from "@weekwise/adapter-temporal";
import { findFreeSlots } from "@weekwise/agent-tools";
const { slots } = findFreeSlots(new TemporalAdapter({ timeZone: "Europe/Berlin" }), {
range: { start: "2026-12-07T00:00", end: "2026-12-12T00:00" },
duration: 45,
workingHours: { start: "09:00", end: "18:00" },
busy: [{ start: "2026-12-07T10:00", end: "2026-12-07T11:30" }],
});
// slots[0] → { start: "2026-12-07T09:00:00+01:00", end: "2026-12-07T09:45:00+01:00", label: "07/12/2026, 09:00 - 09:45" }

Times with an offset or Z are those instants; times without one are wall-clock times in the adapter’s zone. Invalid input throws an AgentToolError that says what to fix.