@chronary/toolkit 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openai.cjs CHANGED
@@ -80,6 +80,20 @@ var UpdateCalendarSchema = import_zod.z.object({
80
80
  var DeleteCalendarSchema = import_zod.z.object({
81
81
  calendar_id: import_zod.z.string().describe("Calendar ID to delete")
82
82
  });
83
+ var timeOfDay = import_zod.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
84
+ var workingHoursDaySchema = import_zod.z.object({
85
+ start: timeOfDay.describe('Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. "09:00")'),
86
+ end: timeOfDay.describe('End of the working window, HH:MM 24-hour, after start (e.g. "17:00")')
87
+ }).refine((v) => v.end > v.start, "end must be after start").describe("A single day's working hours window");
88
+ var workingHoursSchema = import_zod.z.object({
89
+ mon: workingHoursDaySchema.optional(),
90
+ tue: workingHoursDaySchema.optional(),
91
+ wed: workingHoursDaySchema.optional(),
92
+ thu: workingHoursDaySchema.optional(),
93
+ fri: workingHoursDaySchema.optional(),
94
+ sat: workingHoursDaySchema.optional(),
95
+ sun: workingHoursDaySchema.optional()
96
+ }).refine((v) => Object.keys(v).length > 0, "at least one day must be specified").nullable();
83
97
  var ListBookingPagesSchema = import_zod.z.object({
84
98
  limit: import_zod.z.number().int().min(1).max(200).default(50).describe("Max results to return"),
85
99
  offset: import_zod.z.number().int().min(0).default(0).describe("Pagination offset, at most 10000")
@@ -88,7 +102,7 @@ var GetBookingPageSchema = import_zod.z.object({
88
102
  booking_page_id: import_zod.z.string().describe("Booking page ID to fetch (bkp_...)")
89
103
  });
90
104
  var CreateBookingPageSchema = import_zod.z.object({
91
- calendar_id: import_zod.z.string().describe("Calendar a booking resolves to (from create_calendar/list_calendars)."),
105
+ calendar_id: import_zod.z.string().describe("Calendar ID a booking resolves to."),
92
106
  title: import_zod.z.string().min(1).max(200).describe("Meeting title shown on the page."),
93
107
  description: import_zod.z.string().max(2e3).optional().describe("Optional description shown to the booker."),
94
108
  duration_minutes: import_zod.z.number().int().min(5).max(480).optional().describe("Slot length in minutes (default 30)."),
@@ -96,7 +110,8 @@ var CreateBookingPageSchema = import_zod.z.object({
96
110
  window_days: import_zod.z.number().int().min(1).max(365).optional().describe("How far ahead bookings are allowed (default 14)."),
97
111
  min_notice_minutes: import_zod.z.number().int().min(0).max(40320).optional().describe("Minimum lead time before a bookable slot (default 0)."),
98
112
  timezone: import_zod.z.string().min(1).max(64).optional().describe("IANA timezone for display + working hours (default UTC)."),
99
- availability_constraints: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ start: import_zod.z.string(), end: import_zod.z.string() })).nullable().optional().describe('Weekly working hours, e.g. {"mon":{"start":"09:00","end":"17:00"}}. Omit/null for any time in the window.'),
113
+ // Same shape the hosted API validates (#2525).
114
+ availability_constraints: workingHoursSchema.optional().describe('Weekly working hours keyed by day (mon, tue, wed, thu, fri, sat, sun; a day left out takes no bookings), each {"start":"HH:MM","end":"HH:MM"} in 24-hour time with end after start, e.g. {"mon":{"start":"09:00","end":"17:00"}}. Omit/null for any time in the window.'),
100
115
  active: import_zod.z.boolean().optional().describe("Whether the page accepts bookings (default true).")
101
116
  });
102
117
  var DeleteBookingPageSchema = import_zod.z.object({
@@ -159,7 +174,7 @@ var UpdateEventSchema = import_zod.z.object({
159
174
  });
160
175
  var CancelEventSchema = import_zod.z.object({
161
176
  event_id: import_zod.z.string().describe("Event ID to cancel"),
162
- calendar_id: import_zod.z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event. Matches the asymmetry with confirm_event / release_event which never required this arg."),
177
+ calendar_id: import_zod.z.string().optional().describe("Calendar ID that owns the event. Optional \u2014 if omitted the calendar is resolved from the event."),
163
178
  occurrence_start: import_zod.z.string().datetime({ offset: true }).optional().describe("For recurring events only: ISO 8601 start of the single occurrence to cancel. The rest of the series is unaffected.")
164
179
  });
165
180
  var ConfirmEventSchema = import_zod.z.object({
@@ -231,7 +246,11 @@ var proposalSlotSchema = import_zod.z.object({
231
246
  end_time: import_zod.z.string().datetime({ offset: true }).describe("Slot end time (ISO 8601), after start_time"),
232
247
  weight: import_zod.z.number().min(0).max(10).default(1).optional().describe("Preference for this slot, 0\u201310 (higher = more preferred). Used to rank candidate slots when the proposal is resolved. Defaults to 1."),
233
248
  calendar_id: import_zod.z.string().optional().describe("Calendar to create the event on if this slot is chosen. Defaults to the proposal's top-level calendar_id.")
234
- });
249
+ }).refine(
250
+ // Same rule as the API (#2538): a slot must end after it starts.
251
+ (v) => new Date(v.end_time).getTime() > new Date(v.start_time).getTime(),
252
+ "end_time must be after start_time"
253
+ );
235
254
  var CreateProposalSchema = import_zod.z.object({
236
255
  title: import_zod.z.string().min(1).max(500).describe("Short description of what the meeting is about"),
237
256
  description: import_zod.z.string().max(5e3).optional().describe("Longer context/agenda"),
@@ -264,20 +283,6 @@ var ResolveProposalSchema = import_zod.z.object({
264
283
  var CancelProposalSchema = import_zod.z.object({
265
284
  proposal_id: import_zod.z.string().describe("Proposal to cancel")
266
285
  });
267
- var timeOfDay = import_zod.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "must be HH:MM in 24-hour time");
268
- var workingHoursDaySchema = import_zod.z.object({
269
- start: timeOfDay.describe('Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. "09:00")'),
270
- end: timeOfDay.describe('End of the working window, HH:MM 24-hour, after start (e.g. "17:00")')
271
- }).refine((v) => v.end > v.start, "end must be after start").describe("A single day's working hours window");
272
- var workingHoursSchema = import_zod.z.object({
273
- mon: workingHoursDaySchema.optional(),
274
- tue: workingHoursDaySchema.optional(),
275
- wed: workingHoursDaySchema.optional(),
276
- thu: workingHoursDaySchema.optional(),
277
- fri: workingHoursDaySchema.optional(),
278
- sat: workingHoursDaySchema.optional(),
279
- sun: workingHoursDaySchema.optional()
280
- }).refine((v) => Object.keys(v).length > 0, "at least one day must be specified").nullable();
281
286
  var SetAvailabilityRulesSchema = import_zod.z.object({
282
287
  calendar_id: import_zod.z.string().describe("Calendar to configure"),
283
288
  buffer_before_minutes: import_zod.z.number().int().min(0).max(120).default(0).describe("Minutes of buffer before each event (0\u2013120)"),
@@ -352,7 +357,7 @@ var ListWebhookDeliveriesSchema = import_zod.z.object({
352
357
  });
353
358
  var GetWebhookDeliverySchema = import_zod.z.object({
354
359
  webhook_id: import_zod.z.string().describe("Webhook subscription the delivery belongs to"),
355
- delivery_id: import_zod.z.string().describe("Delivery ID (whd_...) from list_webhook_deliveries")
360
+ delivery_id: import_zod.z.string().describe("Delivery ID (whd_...)")
356
361
  });
357
362
  var SendTestWebhookSchema = import_zod.z.object({
358
363
  webhook_id: import_zod.z.string().describe("Webhook subscription to send the test event to"),
@@ -876,14 +881,14 @@ var RAW_TOOL_DEFINITIONS = [
876
881
  name: "create_calendar",
877
882
  description: 'Create a calendar to hold events and track availability. Calendars are required before creating events \u2014 call this first when setting up a new agent. An agent can have multiple calendars (e.g. "Work", "Personal"). Org-level calendars (no agent_id) can be used as shared resources like meeting rooms.',
878
883
  schema: CreateCalendarSchema,
879
- annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
884
+ annotations: { title: "Create Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
880
885
  execute: createExecutor(createCalendar)
881
886
  },
882
887
  {
883
888
  name: "update_calendar",
884
889
  description: "Update a calendar's name, timezone, agent status, default reminders, or metadata. Agent keys may only update calendars owned by their agent.",
885
890
  schema: UpdateCalendarSchema,
886
- annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
891
+ annotations: { title: "Update Calendar", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
887
892
  execute: createExecutor(updateCalendar)
888
893
  },
889
894
  {
@@ -898,7 +903,7 @@ var RAW_TOOL_DEFINITIONS = [
898
903
  name: "create_booking_page",
899
904
  description: "Create a public booking page (a hosted scheduling link) for a calendar. Returns a booking_url to send to a human; when they pick a slot, a confirmed event is created on the calendar and an event.created webhook fires with a booking_page_id field. Set availability_constraints to restrict to weekly working hours; existing calendar events always block slots.",
900
905
  schema: CreateBookingPageSchema,
901
- annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
906
+ annotations: { title: "Create Booking Page", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
902
907
  execute: createExecutor(createBookingPage)
903
908
  },
904
909
  {
@@ -933,7 +938,7 @@ var RAW_TOOL_DEFINITIONS = [
933
938
  },
934
939
  {
935
940
  name: "list_org_events",
936
- description: "List events across all of the organization's calendars in one call, ordered by start time (an Agent key sees only its agent's calendars). Narrow with `calendar_ids`, `agent_id`, a `start_after`/`start_before` window, `status` and `source`. `q` searches titles (case-insensitive) and needs both window bounds at most 31 days apart. Use list_events for one calendar.",
941
+ description: "List events across all of the organization's calendars in one call, ordered by start time (an Agent key sees only its agent's calendars). Narrow with `calendar_ids`, `agent_id`, a `start_after`/`start_before` window, `status` and `source`. `q` searches titles (case-insensitive) and needs both window bounds at most 31 days apart. Page with the returned next_cursor.",
937
942
  schema: ListOrgEventsSchema,
938
943
  annotations: { title: "List Organization Events", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
939
944
  untrustedFields: EVENT_UNTRUSTED_FIELDS,
@@ -949,16 +954,16 @@ var RAW_TOOL_DEFINITIONS = [
949
954
  },
950
955
  {
951
956
  name: "create_event",
952
- description: `Create a booking, appointment, meeting, hold, or any scheduled event on a calendar. The calendar_id comes from create_calendar or list_events. Once created, this event blocks the agent's availability during that time and appears in availability queries. Use status="hold" with hold_expires_at to tentatively reserve a slot that auto-releases on TTL.`,
957
+ description: `Create a booking, appointment, meeting, hold, or any scheduled event on a calendar. Once created, this event blocks the agent's availability during that time and appears in availability queries. Use status="hold" with hold_expires_at to tentatively reserve a slot that auto-releases on TTL.`,
953
958
  schema: CreateEventSchema,
954
- annotations: { title: "Create Event", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
959
+ annotations: { title: "Create Event", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
955
960
  execute: createExecutor(createEvent)
956
961
  },
957
962
  {
958
963
  name: "update_event",
959
- description: "Reschedule or edit an event \u2014 change its title, description, start/end times, location, status, reminders, or metadata. Use this to move an appointment to a new time or update its details. Provide only the fields you want to change. Holds cannot be edited via this tool (use confirm_event / release_event). External iCal events are read-only. `calendar_id` is optional \u2014 if omitted it is resolved from the event.",
964
+ description: "Reschedule or edit an event \u2014 change its title, description, start/end times, location, status, reminders, or metadata. Use this to move an appointment to a new time or update its details. Provide only the fields you want to change. Holds cannot be edited; confirm or release them instead. External iCal events are read-only. `calendar_id` is optional \u2014 if omitted it is resolved from the event.",
960
965
  schema: UpdateEventSchema,
961
- annotations: { title: "Update Event", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
966
+ annotations: { title: "Update Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
962
967
  untrustedFields: EVENT_UNTRUSTED_FIELDS,
963
968
  execute: createExecutor(updateEvent)
964
969
  },
@@ -974,7 +979,7 @@ var RAW_TOOL_DEFINITIONS = [
974
979
  name: "confirm_event",
975
980
  description: 'Promote a held event to a confirmed booking. The event must currently have status="hold" and its hold_expires_at must not have passed. After confirmation, event.started and event.ended lifecycle webhooks fire at the scheduled times.',
976
981
  schema: ConfirmEventSchema,
977
- annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
982
+ annotations: { title: "Confirm Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
978
983
  untrustedFields: EVENT_UNTRUSTED_FIELDS,
979
984
  execute: createExecutor(confirmEvent)
980
985
  },
@@ -990,7 +995,7 @@ var RAW_TOOL_DEFINITIONS = [
990
995
  name: "create_agent",
991
996
  description: "Register your agent (AI assistant, human participant, or resource) with Chronary so it can own calendars, events, and webhooks.",
992
997
  schema: CreateAgentSchema,
993
- annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
998
+ annotations: { title: "Create Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
994
999
  execute: createExecutor(createAgent)
995
1000
  },
996
1001
  {
@@ -1009,14 +1014,14 @@ var RAW_TOOL_DEFINITIONS = [
1009
1014
  },
1010
1015
  {
1011
1016
  name: "update_agent",
1012
- description: "Update an agent's name, description, metadata, or status (active/paused). Requires an Organization key \u2014 Agent keys cannot mutate agents.",
1017
+ description: "Update an agent's name, description, metadata, or status (active/paused). Setting status on a decommissioned agent restores it and makes its calendars writable again; that is refused with quota_exceeded when the agent, its calendars or their recurring series would put the organization over the plan's agent, calendar or recurring series limit. Requires an Organization key \u2014 Agent keys cannot mutate agents.",
1013
1018
  schema: UpdateAgentSchema,
1014
- annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1019
+ annotations: { title: "Update Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1015
1020
  execute: createExecutor(updateAgent)
1016
1021
  },
1017
1022
  {
1018
1023
  name: "delete_agent",
1019
- description: "Decommission an agent. This marks the agent as decommissioned and revokes all of its Agent keys. Requires an Organization key \u2014 Agent keys cannot delete agents.",
1024
+ description: "Decommission an agent. This marks the agent as decommissioned and revokes all of its Agent keys. Its calendars and events are kept but stop counting toward the plan's calendar limit, and they are read-only (writes return agent_inactive) until the agent is restored by setting its status again (active or paused). Requires an Organization key \u2014 Agent keys cannot delete agents.",
1020
1025
  schema: DeleteAgentSchema,
1021
1026
  annotations: { title: "Delete Agent", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1022
1027
  execute: createExecutor(deleteAgent)
@@ -1040,7 +1045,7 @@ var RAW_TOOL_DEFINITIONS = [
1040
1045
  name: "create_connection_link",
1041
1046
  description: "Request human setup of Google Calendar or Microsoft Outlook for a Chronary calendar. Give setup_url to a human; the agent never receives OAuth credentials, provider calendar names, or event data. When the human finishes, the linked account becomes a Connection, listed under Human calendars in the Chronary console. The secret URL is returned only on first creation. If reused=true and setup_url is null, retain the original URL or cancel this link and create a replacement.",
1042
1047
  schema: CreateConnectionLinkSchema,
1043
- annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
1048
+ annotations: { title: "Create Human Calendar Setup Link", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
1044
1049
  execute: createExecutor(createConnectionLink)
1045
1050
  },
1046
1051
  {
@@ -1060,7 +1065,7 @@ var RAW_TOOL_DEFINITIONS = [
1060
1065
  // ── Calendar context ───────────────────────────────────────────
1061
1066
  {
1062
1067
  name: "get_calendar_context",
1063
- description: `Get a calendar's temporal context in a single call: the current event (if one is happening now), the next upcoming event, recent past events, a short upcoming window, and the owning agent's status (idle/working/waiting/error). Use this to answer "what is this agent doing right now?" without issuing multiple list_events queries.`,
1068
+ description: `Get a calendar's temporal context in a single call: the current event (if one is happening now), the next upcoming event, recent past events, a short upcoming window, and the owning agent's status (idle/working/waiting/error). Use this to answer "what is this agent doing right now?" without listing events separately. Recurring series appear as their occurrences (with recurringEventId); when events overlap, the current event is the most recently started.`,
1064
1069
  schema: GetCalendarContextSchema,
1065
1070
  annotations: { title: "Get Calendar Context", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1066
1071
  untrustedFields: EVENT_UNTRUSTED_FIELDS,
@@ -1071,7 +1076,7 @@ var RAW_TOOL_DEFINITIONS = [
1071
1076
  name: "create_proposal",
1072
1077
  description: "Create a scheduling proposal \u2014 send a set of candidate time slots to one or more participant agents so they can accept, decline, or counter-propose. The organizer agent owns the proposal; once every participant responds, the system auto-resolves to the highest-scoring slot (or cancels if all decline). Requires an Organization key and a Developer or Pro plan.",
1073
1078
  schema: CreateProposalSchema,
1074
- annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1079
+ annotations: { title: "Create Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1075
1080
  execute: createExecutor(createProposal)
1076
1081
  },
1077
1082
  {
@@ -1090,16 +1095,16 @@ var RAW_TOOL_DEFINITIONS = [
1090
1095
  },
1091
1096
  {
1092
1097
  name: "respond_to_proposal",
1093
- description: 'Submit a response (accept / decline / counter) on behalf of one participant agent to an open proposal. An "accept" requires the slot id from the proposal; a "counter" can suggest alternative slots. When all participants have responded the proposal auto-resolves \u2014 no separate resolve call needed in the normal flow. Requires an Organization key and a Developer or Pro plan.',
1098
+ description: 'Submit a response (accept / decline / counter) on behalf of one participant agent to an open proposal. An "accept" requires the slot id from the proposal; a "counter" can suggest alternative slots. When all participants have responded the proposal auto-resolves \u2014 no separate resolve call needed in the normal flow. The result is the saved response plus auto_resolved (confirmed / cancelled / null) and auto_resolve_error: if the auto-resolve fails, the response is still saved and auto_resolve_error says what to do next (usually: resolve the proposal once the cause is fixed). Do not respond again. Requires an Organization key and a Developer or Pro plan.',
1094
1099
  schema: RespondToProposalSchema,
1095
- annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1100
+ annotations: { title: "Respond To Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1096
1101
  execute: createExecutor(respondToProposal)
1097
1102
  },
1098
1103
  {
1099
1104
  name: "resolve_proposal",
1100
1105
  description: 'Force-resolve an open proposal using responses collected so far. Picks the highest-scoring slot among those accepted by the most participants and creates a confirmed calendar event. If every response was "decline", the proposal is cancelled instead. Use when you want to close out a proposal without waiting for every participant. Requires an Organization key and a Developer or Pro plan.',
1101
1106
  schema: ResolveProposalSchema,
1102
- annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1107
+ annotations: { title: "Resolve Proposal", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1103
1108
  execute: createExecutor(resolveProposal)
1104
1109
  },
1105
1110
  {
@@ -1114,7 +1119,7 @@ var RAW_TOOL_DEFINITIONS = [
1114
1119
  name: "set_availability_rules",
1115
1120
  description: "Set or replace the availability rules on a calendar \u2014 buffer times before/after events and optional per-day working hours. When these rules are set, every availability query on this calendar automatically applies them (busy-block expansion for buffers, masking outside working hours). Upsert: overwrites any existing rules.",
1116
1121
  schema: SetAvailabilityRulesSchema,
1117
- annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1122
+ annotations: { title: "Set Availability Rules", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1118
1123
  execute: createExecutor(setAvailabilityRules)
1119
1124
  },
1120
1125
  {
@@ -1150,7 +1155,7 @@ var RAW_TOOL_DEFINITIONS = [
1150
1155
  name: "create_webhook",
1151
1156
  description: "Create a webhook subscription so the org receives HTTP POST notifications when events occur (e.g. event.created, proposal.confirmed). The signing secret is returned ONCE in this response \u2014 store it to verify the HMAC-SHA256 signature on delivered payloads. Requires an Organization key.",
1152
1157
  schema: CreateWebhookSchema,
1153
- annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
1158
+ annotations: { title: "Create Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
1154
1159
  execute: createExecutor(createWebhook)
1155
1160
  },
1156
1161
  {
@@ -1185,16 +1190,16 @@ var RAW_TOOL_DEFINITIONS = [
1185
1190
  },
1186
1191
  {
1187
1192
  name: "send_test_webhook",
1188
- description: "Send a signed sample payload of one event type to a webhook endpoint, to check that it receives and verifies deliveries. The delivery is marked is_test, carries the X-Chronary-Test: 1 header, makes one attempt, does not count toward the monthly delivery quota and is sent even when the endpoint is paused or disabled. The endpoint must subscribe to the event type. Poll get_webhook_delivery with the returned delivery_id for the result. Limited to 10 per minute. Requires an Organization key.",
1193
+ description: "Send a signed sample payload of one event type to a webhook endpoint, to check that it receives and verifies deliveries. The delivery is marked is_test, carries the X-Chronary-Test: 1 header, makes one attempt, does not count toward the monthly delivery quota and is sent even when the endpoint is paused or disabled. The endpoint must subscribe to the event type. The outcome is recorded on the returned delivery_id. Limited to 10 per minute. Requires an Organization key.",
1189
1194
  schema: SendTestWebhookSchema,
1190
- annotations: { title: "Send Test Webhook", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
1195
+ annotations: { title: "Send Test Webhook", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
1191
1196
  execute: createExecutor(sendTestWebhook)
1192
1197
  },
1193
1198
  {
1194
1199
  name: "replay_webhook_delivery",
1195
- description: "Send a failed or dropped webhook delivery again, as a new delivery with a new delivery_id. The stored payload goes out unchanged (same event id), signed with the endpoint's current secret, with an X-Chronary-Replay-Of header naming the original delivery. Only failed or dropped deliveries that are not test events can be replayed, the endpoint must be active, and the payload must still be stored (30 days). The replay follows the normal retry schedule and counts toward the monthly delivery quota. Poll get_webhook_delivery with the returned delivery_id for the result. Limited to 30 per minute. Requires a Developer or Pro plan and an Organization key.",
1200
+ description: "Send a failed or dropped webhook delivery again, as a new delivery with a new delivery_id. The stored payload goes out unchanged (same event id), signed with the endpoint's current secret, with an X-Chronary-Replay-Of header naming the original delivery. Only failed or dropped deliveries that are not test events can be replayed, the endpoint must be active, and the payload must still be stored (30 days). The replay follows the normal retry schedule and counts toward the monthly delivery quota. The outcome is recorded on the returned delivery_id. Limited to 30 per minute. Requires a Developer or Pro plan and an Organization key.",
1196
1201
  schema: ReplayWebhookDeliverySchema,
1197
- annotations: { title: "Replay Webhook Delivery", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
1202
+ annotations: { title: "Replay Webhook Delivery", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
1198
1203
  execute: createExecutor(replayWebhookDelivery)
1199
1204
  },
1200
1205
  // ── iCal Subscriptions ─────────────────────────────────────────
@@ -1216,14 +1221,14 @@ var RAW_TOOL_DEFINITIONS = [
1216
1221
  name: "subscribe_ical",
1217
1222
  description: "Link an external iCal feed (e.g. a human's Google Calendar) to an agent's calendar so external events appear in availability calculations. The target calendar must be owned by the specified agent \u2014 create the calendar with that agent_id first (org-level calendars without an agent_id cannot host external iCal subscriptions; create a dedicated per-agent calendar for sync targets).",
1218
1223
  schema: SubscribeICalSchema,
1219
- annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
1224
+ annotations: { title: "Subscribe iCal", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
1220
1225
  execute: createExecutor(subscribeICal)
1221
1226
  },
1222
1227
  {
1223
1228
  name: "update_ical_subscription",
1224
1229
  description: "Update an external iCal feed subscription \u2014 change its label or its feed URL. Changing the URL forces a full re-sync on the next poll.",
1225
1230
  schema: UpdateICalSubscriptionSchema,
1226
- annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
1231
+ annotations: { title: "Update iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
1227
1232
  execute: createExecutor(updateICalSubscription)
1228
1233
  },
1229
1234
  {
@@ -1235,23 +1240,23 @@ var RAW_TOOL_DEFINITIONS = [
1235
1240
  },
1236
1241
  {
1237
1242
  name: "sync_ical_subscription",
1238
- description: 'Start an immediate fetch of an external iCal feed instead of waiting for the next scheduled poll. Returns {"status":"syncing"} as soon as the fetch has started; call get_ical_subscription a few seconds later to read last_synced_at and last_error. A paused feed must be resumed first; one manual sync per feed per minute.',
1243
+ description: 'Start an immediate fetch of an external iCal feed instead of waiting for the next scheduled poll. Returns {"status":"syncing"} as soon as the fetch has started; last_synced_at and last_error on the subscription update when the fetch finishes, usually within a few seconds. A paused feed must be resumed first; one manual sync per feed per minute on paid plans, per 15 minutes on Free.',
1239
1244
  schema: SyncICalSubscriptionSchema,
1240
- annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
1245
+ annotations: { title: "Sync iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
1241
1246
  execute: createExecutor(syncICalSubscription)
1242
1247
  },
1243
1248
  {
1244
1249
  name: "pause_ical_subscription",
1245
1250
  description: "Pause an external iCal feed subscription: scheduled polls skip it and manual syncs are refused until it is resumed. Busy blocks already imported stay. Pausing a paused feed changes nothing. Returns the subscription.",
1246
1251
  schema: PauseICalSubscriptionSchema,
1247
- annotations: { title: "Pause iCal Subscription", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1252
+ annotations: { title: "Pause iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1248
1253
  execute: createExecutor(pauseICalSubscription)
1249
1254
  },
1250
1255
  {
1251
1256
  name: "resume_ical_subscription",
1252
1257
  description: "Resume a paused or failing external iCal feed subscription: it returns to scheduled polling and its last_error is cleared. Resuming an active feed changes nothing. Returns the subscription.",
1253
1258
  schema: ResumeICalSubscriptionSchema,
1254
- annotations: { title: "Resume iCal Subscription", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1259
+ annotations: { title: "Resume iCal Subscription", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1255
1260
  execute: createExecutor(resumeICalSubscription)
1256
1261
  },
1257
1262
  // ── Scoped keys ────────────────────────────────────────────────
@@ -1259,7 +1264,7 @@ var RAW_TOOL_DEFINITIONS = [
1259
1264
  name: "create_scoped_key",
1260
1265
  description: "Create an Agent key (chr_ak_*) that can only act on behalf of a single agent. Use this to self-provision or rotate per-agent credentials. The plaintext key is returned exactly once in the response \u2014 store it immediately, it cannot be retrieved later. Requires an Organization key.",
1261
1266
  schema: CreateScopedKeySchema,
1262
- annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1267
+ annotations: { title: "Create Scoped Key", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1263
1268
  execute: createExecutor(createScopedKey)
1264
1269
  },
1265
1270
  {
@@ -1289,7 +1294,7 @@ var RAW_TOOL_DEFINITIONS = [
1289
1294
  name: "accept_terms",
1290
1295
  description: "Re-accept the current Chronary terms of service on behalf of the calling org. Use this when responses carry the Chronary-Terms-Upgrade-Required header \u2014 a material ToS bump otherwise leaves MCP-only agents stuck without a console session. Pass the current tos_version (read it from GET /v1/auth/terms/current). Requires an Organization key (chr_sk_*); Agent keys cannot accept org-wide terms.",
1291
1296
  schema: AcceptTermsSchema,
1292
- annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1297
+ annotations: { title: "Accept Terms", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1293
1298
  execute: createExecutor(acceptTerms)
1294
1299
  },
1295
1300
  // ── Usage ──────────────────────────────────────────────────────
@@ -1317,9 +1322,9 @@ var RAW_TOOL_DEFINITIONS = [
1317
1322
  },
1318
1323
  {
1319
1324
  name: "request_upgrade",
1320
- description: "Ask your human to upgrade this Chronary account to Pro. Returns approval_url \u2014 give it to your human; only a human can pay. If reused=true a request is already pending \u2014 do not call again; poll get_upgrade_request at most once a minute. The link opens the Billing page in the Chronary console.",
1325
+ description: "Ask your human to upgrade this Chronary account to the next plan up. Returns approval_url \u2014 give it to your human; only a human can pay. If reused=true a request is already pending \u2014 do not call again; check the status of the request at most once a minute. The link opens the Billing page in the Chronary console.",
1321
1326
  schema: RequestUpgradeSchema,
1322
- annotations: { title: "Request Upgrade", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1327
+ annotations: { title: "Request Upgrade", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1323
1328
  execute: createExecutor(requestUpgrade)
1324
1329
  },
1325
1330
  {
@@ -1333,7 +1338,7 @@ var RAW_TOOL_DEFINITIONS = [
1333
1338
  name: "cancel_upgrade_request",
1334
1339
  description: "Withdraw a pending upgrade request (for example, the blocker went away). The approval URL stops working. Fails with upgrade_request_not_pending if the request is already completed, declined, canceled, or expired.",
1335
1340
  schema: CancelUpgradeRequestSchema,
1336
- annotations: { title: "Cancel Upgrade Request", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1341
+ annotations: { title: "Cancel Upgrade Request", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
1337
1342
  execute: createExecutor(cancelUpgradeRequest)
1338
1343
  }
1339
1344
  ];