@chronary/toolkit 1.2.4 → 1.3.1
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/CHANGELOG.md +9 -0
- package/dist/ai-sdk.cjs +15 -6
- package/dist/ai-sdk.cjs.map +1 -1
- package/dist/ai-sdk.js +15 -6
- package/dist/ai-sdk.js.map +1 -1
- package/dist/index.cjs +15 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/langchain.cjs +15 -6
- package/dist/langchain.cjs.map +1 -1
- package/dist/langchain.js +15 -6
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.cjs +15 -6
- package/dist/mastra.cjs.map +1 -1
- package/dist/mastra.js +15 -6
- package/dist/mastra.js.map +1 -1
- package/dist/mcp.cjs +152 -6
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.d.cts +43 -1
- package/dist/mcp.d.ts +43 -1
- package/dist/mcp.js +152 -6
- package/dist/mcp.js.map +1 -1
- package/dist/openai.cjs +15 -6
- package/dist/openai.cjs.map +1 -1
- package/dist/openai.js +15 -6
- package/dist/openai.js.map +1 -1
- package/package.json +2 -2
package/dist/mcp.d.cts
CHANGED
|
@@ -21,12 +21,42 @@ type McpToolHandlerResult = {
|
|
|
21
21
|
}>;
|
|
22
22
|
isError?: boolean;
|
|
23
23
|
};
|
|
24
|
+
interface McpPromptRegistrationConfig {
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
argsSchema?: ZodRawShape;
|
|
28
|
+
}
|
|
29
|
+
type McpPromptHandlerResult = {
|
|
30
|
+
messages: Array<{
|
|
31
|
+
role: 'user';
|
|
32
|
+
content: {
|
|
33
|
+
type: 'text';
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
interface McpResourceRegistrationConfig {
|
|
39
|
+
title?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
mimeType?: string;
|
|
42
|
+
}
|
|
43
|
+
type McpResourceHandlerResult = {
|
|
44
|
+
contents: Array<{
|
|
45
|
+
uri: string;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
text: string;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
24
50
|
/**
|
|
25
51
|
* Minimal shape of the MCP SDK's `McpServer` that the toolkit depends on.
|
|
26
52
|
* Matches `registerTool(name, config, handler)` from `@modelcontextprotocol/sdk` >= 1.10.
|
|
53
|
+
* `registerPrompt` / `registerResource` are optional so tool-only callers (and
|
|
54
|
+
* the test mocks) don't have to implement them.
|
|
27
55
|
*/
|
|
28
56
|
interface McpServerLike {
|
|
29
57
|
registerTool(name: string, config: McpToolRegistrationConfig, handler: (params: Record<string, unknown>) => Promise<McpToolHandlerResult>): unknown;
|
|
58
|
+
registerPrompt?(name: string, config: McpPromptRegistrationConfig, handler: (...args: any[]) => McpPromptHandlerResult | Promise<McpPromptHandlerResult>): unknown;
|
|
59
|
+
registerResource?(name: string, uri: string, config: McpResourceRegistrationConfig, handler: (...args: any[]) => McpResourceHandlerResult | Promise<McpResourceHandlerResult>): unknown;
|
|
30
60
|
}
|
|
31
61
|
/**
|
|
32
62
|
* MCP v1.x adapter.
|
|
@@ -52,6 +82,18 @@ declare class ChronaryToolkit extends ListToolkit<McpToolDefinition> {
|
|
|
52
82
|
* Uses `server.registerTool()` (MCP SDK v1.10+) so annotations reach the client.
|
|
53
83
|
*/
|
|
54
84
|
registerAll(server: McpServerLike): void;
|
|
85
|
+
/**
|
|
86
|
+
* Register the reusable prompt templates (MCP `prompts` capability) on an
|
|
87
|
+
* McpServer. Mirrors the hosted server's four prompts so stdio and hosted
|
|
88
|
+
* expose the same `prompts/list`. No-op if the server can't register prompts.
|
|
89
|
+
*/
|
|
90
|
+
registerPrompts(server: McpServerLike): void;
|
|
91
|
+
/**
|
|
92
|
+
* Register the static `chronary://about` resource (MCP `resources` capability)
|
|
93
|
+
* so stdio and hosted expose the same `resources/list`. No-op if the server
|
|
94
|
+
* can't register resources.
|
|
95
|
+
*/
|
|
96
|
+
registerResources(server: McpServerLike): void;
|
|
55
97
|
}
|
|
56
98
|
|
|
57
|
-
export { ChronaryToolkit, type McpServerLike, type McpToolDefinition, type McpToolHandlerResult, type McpToolRegistrationConfig };
|
|
99
|
+
export { ChronaryToolkit, type McpPromptHandlerResult, type McpPromptRegistrationConfig, type McpResourceHandlerResult, type McpResourceRegistrationConfig, type McpServerLike, type McpToolDefinition, type McpToolHandlerResult, type McpToolRegistrationConfig };
|
package/dist/mcp.d.ts
CHANGED
|
@@ -21,12 +21,42 @@ type McpToolHandlerResult = {
|
|
|
21
21
|
}>;
|
|
22
22
|
isError?: boolean;
|
|
23
23
|
};
|
|
24
|
+
interface McpPromptRegistrationConfig {
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
argsSchema?: ZodRawShape;
|
|
28
|
+
}
|
|
29
|
+
type McpPromptHandlerResult = {
|
|
30
|
+
messages: Array<{
|
|
31
|
+
role: 'user';
|
|
32
|
+
content: {
|
|
33
|
+
type: 'text';
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
interface McpResourceRegistrationConfig {
|
|
39
|
+
title?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
mimeType?: string;
|
|
42
|
+
}
|
|
43
|
+
type McpResourceHandlerResult = {
|
|
44
|
+
contents: Array<{
|
|
45
|
+
uri: string;
|
|
46
|
+
mimeType: string;
|
|
47
|
+
text: string;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
24
50
|
/**
|
|
25
51
|
* Minimal shape of the MCP SDK's `McpServer` that the toolkit depends on.
|
|
26
52
|
* Matches `registerTool(name, config, handler)` from `@modelcontextprotocol/sdk` >= 1.10.
|
|
53
|
+
* `registerPrompt` / `registerResource` are optional so tool-only callers (and
|
|
54
|
+
* the test mocks) don't have to implement them.
|
|
27
55
|
*/
|
|
28
56
|
interface McpServerLike {
|
|
29
57
|
registerTool(name: string, config: McpToolRegistrationConfig, handler: (params: Record<string, unknown>) => Promise<McpToolHandlerResult>): unknown;
|
|
58
|
+
registerPrompt?(name: string, config: McpPromptRegistrationConfig, handler: (...args: any[]) => McpPromptHandlerResult | Promise<McpPromptHandlerResult>): unknown;
|
|
59
|
+
registerResource?(name: string, uri: string, config: McpResourceRegistrationConfig, handler: (...args: any[]) => McpResourceHandlerResult | Promise<McpResourceHandlerResult>): unknown;
|
|
30
60
|
}
|
|
31
61
|
/**
|
|
32
62
|
* MCP v1.x adapter.
|
|
@@ -52,6 +82,18 @@ declare class ChronaryToolkit extends ListToolkit<McpToolDefinition> {
|
|
|
52
82
|
* Uses `server.registerTool()` (MCP SDK v1.10+) so annotations reach the client.
|
|
53
83
|
*/
|
|
54
84
|
registerAll(server: McpServerLike): void;
|
|
85
|
+
/**
|
|
86
|
+
* Register the reusable prompt templates (MCP `prompts` capability) on an
|
|
87
|
+
* McpServer. Mirrors the hosted server's four prompts so stdio and hosted
|
|
88
|
+
* expose the same `prompts/list`. No-op if the server can't register prompts.
|
|
89
|
+
*/
|
|
90
|
+
registerPrompts(server: McpServerLike): void;
|
|
91
|
+
/**
|
|
92
|
+
* Register the static `chronary://about` resource (MCP `resources` capability)
|
|
93
|
+
* so stdio and hosted expose the same `resources/list`. No-op if the server
|
|
94
|
+
* can't register resources.
|
|
95
|
+
*/
|
|
96
|
+
registerResources(server: McpServerLike): void;
|
|
55
97
|
}
|
|
56
98
|
|
|
57
|
-
export { ChronaryToolkit, type McpServerLike, type McpToolDefinition, type McpToolHandlerResult, type McpToolRegistrationConfig };
|
|
99
|
+
export { ChronaryToolkit, type McpPromptHandlerResult, type McpPromptRegistrationConfig, type McpResourceHandlerResult, type McpResourceRegistrationConfig, type McpServerLike, type McpToolDefinition, type McpToolHandlerResult, type McpToolRegistrationConfig };
|
package/dist/mcp.js
CHANGED
|
@@ -61,7 +61,8 @@ var ListEventsSchema = z.object({
|
|
|
61
61
|
status: z.enum(["confirmed", "tentative", "cancelled", "hold"]).optional().describe("Filter by event status"),
|
|
62
62
|
source: z.enum(["internal", "external_ical"]).optional().describe('Filter by source: "internal" (created via the API) or "external_ical" (synced from an iCal subscription)'),
|
|
63
63
|
limit: z.number().int().min(1).max(200).default(50).describe("Max results to return"),
|
|
64
|
-
offset: z.number().int().min(0).default(0).describe("Pagination offset")
|
|
64
|
+
offset: z.number().int().min(0).default(0).describe("Pagination offset"),
|
|
65
|
+
expand: z.boolean().default(false).describe("Expand recurring series into individual occurrence instances within the window. Requires both start_after and start_before (max 366 days apart). Instances carry recurringEventId + originalStartTime.")
|
|
65
66
|
});
|
|
66
67
|
var GetEventSchema = z.object({
|
|
67
68
|
event_id: z.string().describe("Event ID to retrieve"),
|
|
@@ -77,7 +78,8 @@ var CreateEventSchema = z.object({
|
|
|
77
78
|
status: z.enum(["confirmed", "tentative", "hold"]).optional().describe('Event status. "hold" creates a tentative reservation that auto-expires at hold_expires_at. Defaults to "confirmed".'),
|
|
78
79
|
reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time (e.g. [10, 1440]). Each fires an event.reminder webhook and shows as an alarm in the iCal feed. Omit or null to inherit the calendar default (then the system default of 10 min); [] for no reminders."),
|
|
79
80
|
hold_expires_at: z.string().datetime().optional().describe('Required when status="hold". ISO 8601 timestamp 30s-15min in the future. Auto-releases the hold when reached.'),
|
|
80
|
-
hold_priority: z.number().int().min(0).max(100).optional().describe('Only valid with status="hold". Higher-priority overlapping holds pre-empt lower-priority ones. Defaults to 0.')
|
|
81
|
+
hold_priority: z.number().int().min(0).max(100).optional().describe('Only valid with status="hold". Higher-priority overlapping holds pre-empt lower-priority ones. Defaults to 0.'),
|
|
82
|
+
recurrence_rule: z.string().max(256).optional().describe('Make this a recurring series (RFC 5545 RRULE subset, no "RRULE:" prefix), e.g. "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=12". Supports FREQ=DAILY/WEEKLY/MONTHLY/YEARLY, INTERVAL, COUNT (max 730) or UNTIL, BYDAY (weekly list or monthly ordinal like 2TU/-1FR), BYMONTHDAY (1-28 or -1). start_time must match the rule pattern; expansion is UTC-only. Not allowed with status="hold". Free plan: max 5 recurring events, series must end within 90 days.')
|
|
81
83
|
});
|
|
82
84
|
var UpdateEventSchema = z.object({
|
|
83
85
|
event_id: z.string().describe("Event ID to update"),
|
|
@@ -89,11 +91,13 @@ var UpdateEventSchema = z.object({
|
|
|
89
91
|
all_day: z.boolean().optional().describe("Whether this is an all-day event"),
|
|
90
92
|
status: z.enum(["confirmed", "tentative", "cancelled"]).optional().describe("New event status"),
|
|
91
93
|
metadata: z.record(z.string(), z.unknown()).optional().describe("Replacement metadata object"),
|
|
92
|
-
reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time. Omit to leave unchanged, null to inherit the calendar default, [] for no reminders.")
|
|
94
|
+
reminders: z.array(z.number().int().min(1).max(40320)).max(5).nullable().optional().describe("Reminder offsets in minutes before start_time. Omit to leave unchanged, null to inherit the calendar default, [] for no reminders."),
|
|
95
|
+
recurrence_rule: z.string().max(256).nullable().optional().describe("Set/change the recurring series rule (RFC 5545 RRULE subset, full-series semantics), or null to make the event a one-off. Changing the rule or start_time resets cancelled occurrences.")
|
|
93
96
|
});
|
|
94
97
|
var CancelEventSchema = z.object({
|
|
95
98
|
event_id: z.string().describe("Event ID to cancel"),
|
|
96
|
-
calendar_id: 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.")
|
|
99
|
+
calendar_id: 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."),
|
|
100
|
+
occurrence_start: z.string().datetime().optional().describe("For recurring events only: ISO 8601 start of the single occurrence to cancel. The rest of the series is unaffected.")
|
|
97
101
|
});
|
|
98
102
|
var ConfirmEventSchema = z.object({
|
|
99
103
|
event_id: z.string().describe("Event ID of the hold to confirm")
|
|
@@ -352,6 +356,7 @@ var listEvents = safeFunc(async (ctx) => {
|
|
|
352
356
|
start_before: params.start_before,
|
|
353
357
|
status: params.status,
|
|
354
358
|
source: params.source,
|
|
359
|
+
expand: params.expand,
|
|
355
360
|
limit: params.limit
|
|
356
361
|
});
|
|
357
362
|
return fetchPage(iter, params.offset, params.limit);
|
|
@@ -371,7 +376,11 @@ var updateEvent = safeFunc(async (ctx) => {
|
|
|
371
376
|
return calendar_id ? client.events.update(calendar_id, event_id, updates) : client.events.updateById(event_id, updates);
|
|
372
377
|
});
|
|
373
378
|
var cancelEvent = safeFunc(async (ctx) => {
|
|
374
|
-
const { calendar_id, event_id } = ctx.params;
|
|
379
|
+
const { calendar_id, event_id, occurrence_start } = ctx.params;
|
|
380
|
+
if (occurrence_start) {
|
|
381
|
+
const event = calendar_id ? await ctx.client.events.delete(calendar_id, event_id, { occurrence_start }) : await ctx.client.events.deleteById(event_id, { occurrence_start });
|
|
382
|
+
return { occurrence_cancelled: true, id: event_id, occurrence_start, event };
|
|
383
|
+
}
|
|
375
384
|
if (calendar_id) {
|
|
376
385
|
await ctx.client.events.delete(calendar_id, event_id);
|
|
377
386
|
} else {
|
|
@@ -674,7 +683,7 @@ var TOOL_DEFINITIONS = [
|
|
|
674
683
|
},
|
|
675
684
|
{
|
|
676
685
|
name: "cancel_event",
|
|
677
|
-
description: "Delete or cancel an event from a calendar. Use this to remove, cancel, or delete any scheduled event or appointment. The event is marked cancelled and excluded from future availability calculations. `calendar_id` is optional \u2014 if omitted the calendar is looked up from the event. Provide `calendar_id` to fail fast on cross-calendar typos.",
|
|
686
|
+
description: "Delete or cancel an event from a calendar. Use this to remove, cancel, or delete any scheduled event or appointment. The event is marked cancelled and excluded from future availability calculations. For a recurring series, pass `occurrence_start` to cancel just that one occurrence (the series continues); omit it to cancel the whole series. `calendar_id` is optional \u2014 if omitted the calendar is looked up from the event. Provide `calendar_id` to fail fast on cross-calendar typos.",
|
|
678
687
|
schema: CancelEventSchema,
|
|
679
688
|
annotations: { title: "Cancel Event", readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
680
689
|
execute: createExecutor(cancelEvent)
|
|
@@ -979,6 +988,23 @@ var ListToolkit = class extends BaseToolkit {
|
|
|
979
988
|
};
|
|
980
989
|
|
|
981
990
|
// src/adapters/mcp.ts
|
|
991
|
+
var ABOUT_MARKDOWN = `# Chronary
|
|
992
|
+
|
|
993
|
+
Calendar-as-a-service for AI agents. Give an agent its own calendars and
|
|
994
|
+
events, coordinate availability across agents, run multi-party scheduling
|
|
995
|
+
proposals, place auto-expiring holds, manage availability rules, sync external
|
|
996
|
+
iCal feeds, and receive webhooks.
|
|
997
|
+
|
|
998
|
+
## Getting started
|
|
999
|
+
1. \`create_agent\` \u2014 register an agent (skip if you already have one).
|
|
1000
|
+
2. \`create_calendar\` \u2014 give the agent a calendar.
|
|
1001
|
+
3. \`create_event\` / \`get_availability\` / \`find_meeting_time\` \u2014 schedule and coordinate.
|
|
1002
|
+
|
|
1003
|
+
## Keys & plans
|
|
1004
|
+
Org keys (\`chr_sk_\`) can use every tool; agent-scoped keys (\`chr_ak_\`) are
|
|
1005
|
+
limited to their own agent and cannot use org-only tools such as
|
|
1006
|
+
\`create_agent\` or \`find_meeting_time\`. Temporal holds, cross-agent
|
|
1007
|
+
availability, and scheduling proposals require a Pro plan.`;
|
|
982
1008
|
var ChronaryToolkit = class extends ListToolkit {
|
|
983
1009
|
constructor(config) {
|
|
984
1010
|
super(config);
|
|
@@ -1015,6 +1041,126 @@ var ChronaryToolkit = class extends ListToolkit {
|
|
|
1015
1041
|
);
|
|
1016
1042
|
}
|
|
1017
1043
|
}
|
|
1044
|
+
/**
|
|
1045
|
+
* Register the reusable prompt templates (MCP `prompts` capability) on an
|
|
1046
|
+
* McpServer. Mirrors the hosted server's four prompts so stdio and hosted
|
|
1047
|
+
* expose the same `prompts/list`. No-op if the server can't register prompts.
|
|
1048
|
+
*/
|
|
1049
|
+
registerPrompts(server) {
|
|
1050
|
+
if (!server.registerPrompt) return;
|
|
1051
|
+
server.registerPrompt(
|
|
1052
|
+
"schedule_event",
|
|
1053
|
+
{
|
|
1054
|
+
title: "Schedule an event",
|
|
1055
|
+
description: "Create a calendar event on an agent's calendar at a specific time.",
|
|
1056
|
+
argsSchema: {
|
|
1057
|
+
calendar_id: z2.string().describe("Target calendar ID (cal_...). Run list_calendars first if unknown."),
|
|
1058
|
+
title: z2.string().describe("Event title"),
|
|
1059
|
+
start_time: z2.string().describe("Start time, ISO 8601 (e.g. 2026-07-10T15:00:00Z)"),
|
|
1060
|
+
end_time: z2.string().describe("End time, ISO 8601")
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
({ calendar_id, title, start_time, end_time }) => ({
|
|
1064
|
+
messages: [
|
|
1065
|
+
{
|
|
1066
|
+
role: "user",
|
|
1067
|
+
content: {
|
|
1068
|
+
type: "text",
|
|
1069
|
+
text: `Create an event on calendar ${calendar_id} titled "${title}" from ${start_time} to ${end_time}. Call the create_event tool with those arguments (calendar_id, title, start_time, end_time). If the calendar ID is unknown, call list_calendars first. Report the created event ID when done.`
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
]
|
|
1073
|
+
})
|
|
1074
|
+
);
|
|
1075
|
+
server.registerPrompt(
|
|
1076
|
+
"find_meeting_time",
|
|
1077
|
+
{
|
|
1078
|
+
title: "Find a meeting time",
|
|
1079
|
+
description: "Find a slot that works across several agents, then optionally book it.",
|
|
1080
|
+
argsSchema: {
|
|
1081
|
+
agent_ids: z2.string().describe("Comma-separated agent IDs to coordinate (agt_...)."),
|
|
1082
|
+
duration: z2.string().describe('Meeting length, e.g. "30m" or "1h".'),
|
|
1083
|
+
window: z2.string().optional().describe('Optional ISO 8601 range to search, e.g. "2026-07-10T09:00:00Z/2026-07-10T18:00:00Z".')
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
({ agent_ids, duration, window }) => ({
|
|
1087
|
+
messages: [
|
|
1088
|
+
{
|
|
1089
|
+
role: "user",
|
|
1090
|
+
content: {
|
|
1091
|
+
type: "text",
|
|
1092
|
+
text: `Find a ${duration} slot that works for all of these agents: ${agent_ids}${window ? ` within ${window}` : ""}. Call the find_meeting_time tool (agents, duration, and start/end if a window is given). Present the top few candidate slots and ask which to book before calling create_event. (find_meeting_time requires a Pro plan.)`
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
]
|
|
1096
|
+
})
|
|
1097
|
+
);
|
|
1098
|
+
server.registerPrompt(
|
|
1099
|
+
"daily_agenda",
|
|
1100
|
+
{
|
|
1101
|
+
title: "Summarize an agent's day",
|
|
1102
|
+
description: "Get an agent's current status and upcoming schedule at a glance.",
|
|
1103
|
+
argsSchema: {
|
|
1104
|
+
agent_id: z2.string().describe("Agent whose day to summarize (agt_...)."),
|
|
1105
|
+
date: z2.string().optional().describe("Optional ISO 8601 date to focus on (defaults to today).")
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
({ agent_id, date }) => ({
|
|
1109
|
+
messages: [
|
|
1110
|
+
{
|
|
1111
|
+
role: "user",
|
|
1112
|
+
content: {
|
|
1113
|
+
type: "text",
|
|
1114
|
+
text: `Summarize agent ${agent_id}'s schedule${date ? ` for ${date}` : " for today"}. Use list_calendars to find the agent's calendar(s), then get_calendar_context for the current/next/upcoming events and status. Present a concise agenda.`
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
]
|
|
1118
|
+
})
|
|
1119
|
+
);
|
|
1120
|
+
server.registerPrompt(
|
|
1121
|
+
"new_scheduling_proposal",
|
|
1122
|
+
{
|
|
1123
|
+
title: "Propose a multi-party meeting",
|
|
1124
|
+
description: "Create a scheduling proposal offering several time slots to participants.",
|
|
1125
|
+
argsSchema: {
|
|
1126
|
+
title: z2.string().describe("Proposal / meeting title"),
|
|
1127
|
+
organizer_agent_id: z2.string().describe("Organizer agent ID (agt_...)."),
|
|
1128
|
+
participant_agent_ids: z2.string().describe("Comma-separated participant agent IDs (agt_...).")
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
({ title, organizer_agent_id, participant_agent_ids }) => ({
|
|
1132
|
+
messages: [
|
|
1133
|
+
{
|
|
1134
|
+
role: "user",
|
|
1135
|
+
content: {
|
|
1136
|
+
type: "text",
|
|
1137
|
+
text: `Create a scheduling proposal "${title}" organized by ${organizer_agent_id} for participants ${participant_agent_ids}. First use get_availability / find_meeting_time to pick 2-3 candidate slots, then call create_proposal with those slots. Report the proposal ID. (Scheduling proposals require a Pro plan and an org-level key.)`
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
]
|
|
1141
|
+
})
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Register the static `chronary://about` resource (MCP `resources` capability)
|
|
1146
|
+
* so stdio and hosted expose the same `resources/list`. No-op if the server
|
|
1147
|
+
* can't register resources.
|
|
1148
|
+
*/
|
|
1149
|
+
registerResources(server) {
|
|
1150
|
+
if (!server.registerResource) return;
|
|
1151
|
+
server.registerResource(
|
|
1152
|
+
"about",
|
|
1153
|
+
"chronary://about",
|
|
1154
|
+
{
|
|
1155
|
+
title: "About Chronary",
|
|
1156
|
+
description: "What Chronary is and how to use its MCP tools.",
|
|
1157
|
+
mimeType: "text/markdown"
|
|
1158
|
+
},
|
|
1159
|
+
() => ({
|
|
1160
|
+
contents: [{ uri: "chronary://about", mimeType: "text/markdown", text: ABOUT_MARKDOWN }]
|
|
1161
|
+
})
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
1018
1164
|
};
|
|
1019
1165
|
export {
|
|
1020
1166
|
ChronaryToolkit
|