flycal-cli 0.7.3 → 0.7.7
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.
- checksums.yaml +4 -4
- data/README.md +105 -227
- data/lib/flycal_cli/calendar_service.rb +2 -5
- data/lib/flycal_cli/cli.rb +74 -148
- data/lib/flycal_cli/description_query.rb +32 -0
- data/lib/flycal_cli/mock/calendar_service.rb +43 -0
- data/lib/flycal_cli/mock/config.rb +171 -0
- data/lib/flycal_cli/mock/event_generator.rb +71 -0
- data/lib/flycal_cli/mock.rb +10 -0
- data/lib/flycal_cli/pipeline/aggregator.rb +229 -0
- data/lib/flycal_cli/pipeline/json_renderer.rb +142 -0
- data/lib/flycal_cli/pipeline/params.rb +46 -0
- data/lib/flycal_cli/pipeline/renderer.rb +27 -0
- data/lib/flycal_cli/pipeline/retriever.rb +72 -0
- data/lib/flycal_cli/pipeline/search_pipeline.rb +18 -0
- data/lib/flycal_cli/pipeline/text_renderer.rb +133 -0
- data/lib/flycal_cli/pipeline.rb +14 -0
- data/lib/flycal_cli/version.rb +1 -1
- data/lib/flycal_cli.rb +3 -0
- data/mcp/README.md +48 -9
- data/mcp/tools.json +322 -53
- data/mockTemplates/mock1.json +11 -0
- data/mocks/mock1.json +11 -0
- metadata +16 -1
data/mcp/tools.json
CHANGED
|
@@ -2,52 +2,140 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"name": "flycal-cli",
|
|
4
4
|
"title": "flycal CLI MCP tools catalog",
|
|
5
|
-
"description": "Machine-readable catalog of flycal-cli commands for MCP servers. Each tool maps to a CLI invocation
|
|
6
|
-
"version": "0.
|
|
5
|
+
"description": "Machine-readable catalog of flycal-cli commands for MCP servers. Each tool maps to a CLI invocation. Non-interactive tools are safe to run from an MCP host; interactive tools require a TTY.",
|
|
6
|
+
"version": "0.7.3",
|
|
7
7
|
"binary": "flycal",
|
|
8
8
|
"homepage": "https://github.com/magnum/flycal-cli",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
"read_only": true,
|
|
10
|
+
"global_options": {
|
|
11
|
+
"locale": {
|
|
12
|
+
"cli": ["--locale"],
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["en", "it"],
|
|
15
|
+
"default": "en",
|
|
16
|
+
"config_key": "locale",
|
|
17
|
+
"description": "Override UI locale for this invocation only. Falls back to config locale, then en."
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"shared_formats": {
|
|
21
|
+
"absolute_date": {
|
|
22
|
+
"description": "Absolute calendar date/time",
|
|
23
|
+
"examples": [
|
|
24
|
+
"2026-08-01",
|
|
25
|
+
"2026/08/01",
|
|
26
|
+
"2026-08-01T14:30",
|
|
27
|
+
"01-08-2026 (locale it)",
|
|
28
|
+
"08-01-2026 (locale en)",
|
|
29
|
+
"01/08/2026 09:00"
|
|
30
|
+
],
|
|
31
|
+
"notes": [
|
|
32
|
+
"YYYY-MM-DD and YYYY/MM/DD always accepted",
|
|
33
|
+
"locale it also accepts DD-MM-YYYY / DD/MM/YYYY",
|
|
34
|
+
"locale en also accepts MM-DD-YYYY / MM/DD/YYYY",
|
|
35
|
+
"optional time: THH:MM or space + HH:MM(:SS)"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"relative_date": {
|
|
39
|
+
"description": "Relative start expressions (en + it)",
|
|
40
|
+
"examples": [
|
|
41
|
+
"now",
|
|
42
|
+
"today",
|
|
43
|
+
"oggi",
|
|
44
|
+
"tomorrow",
|
|
45
|
+
"domani",
|
|
46
|
+
"yesterday",
|
|
47
|
+
"ieri",
|
|
48
|
+
"monday",
|
|
49
|
+
"lunedi",
|
|
50
|
+
"next monday",
|
|
51
|
+
"prossimo lunedi",
|
|
52
|
+
"last friday",
|
|
53
|
+
"scorso venerdi"
|
|
54
|
+
],
|
|
55
|
+
"notes": [
|
|
56
|
+
"bare weekday = next occurrence including today if it matches",
|
|
57
|
+
"next/prossimo = next occurrence excluding today",
|
|
58
|
+
"last/scorso = previous occurrence excluding today"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"duration": {
|
|
62
|
+
"description": "Duration / window length",
|
|
63
|
+
"examples": [
|
|
64
|
+
"45min",
|
|
65
|
+
"1h",
|
|
66
|
+
"90min",
|
|
67
|
+
"3 days",
|
|
68
|
+
"5days",
|
|
69
|
+
"1 week",
|
|
70
|
+
"1week",
|
|
71
|
+
"48 hours",
|
|
72
|
+
"2 months",
|
|
73
|
+
"1 year"
|
|
74
|
+
],
|
|
75
|
+
"notes": [
|
|
76
|
+
"quote values that contain spaces",
|
|
77
|
+
"no-space forms also work (30days, 48hours)"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
14
80
|
},
|
|
15
81
|
"config": {
|
|
16
82
|
"path": "~/.flycal/config.yml",
|
|
17
83
|
"credentials_path": "~/.flycal/credentials.json",
|
|
84
|
+
"tokens_path": "~/.flycal/tokens.yml",
|
|
85
|
+
"credentials_note": "Default/test phase: project-provided API credentials — just run flycal login. Creating your own Google Cloud Console OAuth client is optional and only needed if you want to use your own API project; save that JSON as ~/.flycal/credentials.json then run flycal login.",
|
|
18
86
|
"keys": {
|
|
19
87
|
"calendar_default": {
|
|
20
88
|
"type": ["string", "null"],
|
|
21
|
-
"
|
|
89
|
+
"cli_related": ["flycal_config", "flycal_search.calendar", "flycal_slots.calendar"],
|
|
90
|
+
"description": "Default Google Calendar ID. YAML null (~) means unset."
|
|
22
91
|
},
|
|
23
92
|
"locale": {
|
|
24
93
|
"type": "string",
|
|
25
94
|
"enum": ["en", "it"],
|
|
95
|
+
"default": "en",
|
|
26
96
|
"description": "Default CLI locale"
|
|
27
97
|
},
|
|
28
98
|
"slots.templates": {
|
|
29
99
|
"type": "object",
|
|
30
|
-
"description": "Named
|
|
100
|
+
"description": "Named day/hour schedules for flycal slots. Default used = first key (usually work).",
|
|
101
|
+
"item_shape": {
|
|
102
|
+
"days": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": { "type": "integer", "minimum": 1, "maximum": 7 },
|
|
105
|
+
"description": "1=Monday ... 7=Sunday"
|
|
106
|
+
},
|
|
107
|
+
"hours": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": { "type": "string" },
|
|
110
|
+
"description": "Ranges like 9:30-13:00 or 19-23"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"default_templates": ["work", "dinner"]
|
|
31
114
|
},
|
|
32
115
|
"slots.defaults.from": {
|
|
33
116
|
"type": "string",
|
|
34
|
-
"
|
|
117
|
+
"default": "now",
|
|
118
|
+
"description": "Default value for slots --from when omitted"
|
|
35
119
|
},
|
|
36
120
|
"slots.defaults.default_duration": {
|
|
37
121
|
"type": "string",
|
|
38
|
-
"
|
|
122
|
+
"default": "45min",
|
|
123
|
+
"description": "Default value for slots --duration when omitted"
|
|
39
124
|
},
|
|
40
125
|
"slots.free_before": {
|
|
41
126
|
"type": "string",
|
|
42
|
-
"
|
|
127
|
+
"default": "0m",
|
|
128
|
+
"description": "Busy buffer before each slot start"
|
|
43
129
|
},
|
|
44
130
|
"slots.free_after": {
|
|
45
131
|
"type": "string",
|
|
46
|
-
"
|
|
132
|
+
"default": "15m",
|
|
133
|
+
"description": "Busy buffer after each slot; free gaps must fit duration + free_after"
|
|
47
134
|
},
|
|
48
135
|
"slots.exclude_calendars": {
|
|
49
136
|
"type": "array",
|
|
50
137
|
"items": { "type": "string" },
|
|
138
|
+
"default": [],
|
|
51
139
|
"description": "Calendar IDs whose events block free slots. If empty, calendar_default is used."
|
|
52
140
|
}
|
|
53
141
|
}
|
|
@@ -55,20 +143,23 @@
|
|
|
55
143
|
"notes": [
|
|
56
144
|
"flycal is read-only against Google Calendar (no create/update/delete of events).",
|
|
57
145
|
"Auth uses OAuth desktop flow; tokens live under ~/.flycal/.",
|
|
58
|
-
"Prefer quoting
|
|
59
|
-
"
|
|
146
|
+
"Prefer quoting values with spaces (e.g. --in \"3 days\", --from \"next monday\").",
|
|
147
|
+
"slots copies the availability list (without header) to clipboard when pbcopy, wl-copy, xclip, or clip is available."
|
|
60
148
|
],
|
|
61
149
|
"tools": [
|
|
62
150
|
{
|
|
63
151
|
"name": "flycal_version",
|
|
64
152
|
"title": "Show flycal version",
|
|
65
|
-
"description": "Print the installed flycal-cli version.",
|
|
153
|
+
"description": "Print the installed flycal-cli version string (e.g. flycal 0.7.3).",
|
|
66
154
|
"interactive": false,
|
|
67
155
|
"requires_auth": false,
|
|
68
156
|
"command": {
|
|
69
157
|
"argv": ["flycal", "version"],
|
|
70
158
|
"alternatives": [["flycal", "--version"], ["flycal", "-v"]]
|
|
71
159
|
},
|
|
160
|
+
"parameters": {
|
|
161
|
+
"locale": { "$ref": "#/global_options/locale" }
|
|
162
|
+
},
|
|
72
163
|
"inputSchema": {
|
|
73
164
|
"type": "object",
|
|
74
165
|
"additionalProperties": false,
|
|
@@ -76,7 +167,7 @@
|
|
|
76
167
|
"locale": {
|
|
77
168
|
"type": "string",
|
|
78
169
|
"enum": ["en", "it"],
|
|
79
|
-
"description": "Optional locale override
|
|
170
|
+
"description": "Optional locale override (--locale)."
|
|
80
171
|
}
|
|
81
172
|
}
|
|
82
173
|
}
|
|
@@ -84,20 +175,30 @@
|
|
|
84
175
|
{
|
|
85
176
|
"name": "flycal_update",
|
|
86
177
|
"title": "Update flycal gem",
|
|
87
|
-
"description": "Run gem update flycal-cli to install the latest published version.",
|
|
178
|
+
"description": "Run `gem update flycal-cli` to install the latest published version.",
|
|
88
179
|
"interactive": false,
|
|
89
180
|
"requires_auth": false,
|
|
90
181
|
"side_effects": ["updates_local_gem"],
|
|
91
182
|
"command": {
|
|
92
183
|
"argv": ["flycal", "update"]
|
|
93
184
|
},
|
|
185
|
+
"parameters": {
|
|
186
|
+
"locale": {
|
|
187
|
+
"cli": ["--locale"],
|
|
188
|
+
"type": "string",
|
|
189
|
+
"enum": ["en", "it"],
|
|
190
|
+
"required": false,
|
|
191
|
+
"description": "Optional locale override."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
94
194
|
"inputSchema": {
|
|
95
195
|
"type": "object",
|
|
96
196
|
"additionalProperties": false,
|
|
97
197
|
"properties": {
|
|
98
198
|
"locale": {
|
|
99
199
|
"type": "string",
|
|
100
|
-
"enum": ["en", "it"]
|
|
200
|
+
"enum": ["en", "it"],
|
|
201
|
+
"description": "Optional locale override (--locale)."
|
|
101
202
|
}
|
|
102
203
|
}
|
|
103
204
|
}
|
|
@@ -105,20 +206,30 @@
|
|
|
105
206
|
{
|
|
106
207
|
"name": "flycal_login",
|
|
107
208
|
"title": "Connect Google account",
|
|
108
|
-
"description": "Start OAuth browser login
|
|
209
|
+
"description": "Start OAuth browser login. Requires ~/.flycal/credentials.json and a browser/TTY. Interactive.",
|
|
109
210
|
"interactive": true,
|
|
110
211
|
"requires_auth": false,
|
|
111
212
|
"side_effects": ["writes_tokens"],
|
|
112
213
|
"command": {
|
|
113
214
|
"argv": ["flycal", "login"]
|
|
114
215
|
},
|
|
216
|
+
"parameters": {
|
|
217
|
+
"locale": {
|
|
218
|
+
"cli": ["--locale"],
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": ["en", "it"],
|
|
221
|
+
"required": false,
|
|
222
|
+
"description": "Optional locale override."
|
|
223
|
+
}
|
|
224
|
+
},
|
|
115
225
|
"inputSchema": {
|
|
116
226
|
"type": "object",
|
|
117
227
|
"additionalProperties": false,
|
|
118
228
|
"properties": {
|
|
119
229
|
"locale": {
|
|
120
230
|
"type": "string",
|
|
121
|
-
"enum": ["en", "it"]
|
|
231
|
+
"enum": ["en", "it"],
|
|
232
|
+
"description": "Optional locale override (--locale)."
|
|
122
233
|
}
|
|
123
234
|
}
|
|
124
235
|
}
|
|
@@ -133,13 +244,23 @@
|
|
|
133
244
|
"command": {
|
|
134
245
|
"argv": ["flycal", "logout"]
|
|
135
246
|
},
|
|
247
|
+
"parameters": {
|
|
248
|
+
"locale": {
|
|
249
|
+
"cli": ["--locale"],
|
|
250
|
+
"type": "string",
|
|
251
|
+
"enum": ["en", "it"],
|
|
252
|
+
"required": false,
|
|
253
|
+
"description": "Optional locale override."
|
|
254
|
+
}
|
|
255
|
+
},
|
|
136
256
|
"inputSchema": {
|
|
137
257
|
"type": "object",
|
|
138
258
|
"additionalProperties": false,
|
|
139
259
|
"properties": {
|
|
140
260
|
"locale": {
|
|
141
261
|
"type": "string",
|
|
142
|
-
"enum": ["en", "it"]
|
|
262
|
+
"enum": ["en", "it"],
|
|
263
|
+
"description": "Optional locale override (--locale)."
|
|
143
264
|
}
|
|
144
265
|
}
|
|
145
266
|
}
|
|
@@ -147,15 +268,24 @@
|
|
|
147
268
|
{
|
|
148
269
|
"name": "flycal_calendars",
|
|
149
270
|
"title": "List calendars",
|
|
150
|
-
"description": "List available Google calendars as lines of \"name id\".
|
|
271
|
+
"description": "List available Google calendars as lines of \"name id\". Read-only; does not change config.",
|
|
151
272
|
"interactive": false,
|
|
152
273
|
"requires_auth": true,
|
|
153
274
|
"command": {
|
|
154
275
|
"argv": ["flycal", "calendars"]
|
|
155
276
|
},
|
|
277
|
+
"parameters": {
|
|
278
|
+
"locale": {
|
|
279
|
+
"cli": ["--locale"],
|
|
280
|
+
"type": "string",
|
|
281
|
+
"enum": ["en", "it"],
|
|
282
|
+
"required": false,
|
|
283
|
+
"description": "Optional locale override."
|
|
284
|
+
}
|
|
285
|
+
},
|
|
156
286
|
"output": {
|
|
157
287
|
"format": "text/lines",
|
|
158
|
-
"example": "Work
|
|
288
|
+
"example": "Work work@example.com\nPersonal personal@example.com"
|
|
159
289
|
},
|
|
160
290
|
"inputSchema": {
|
|
161
291
|
"type": "object",
|
|
@@ -163,7 +293,8 @@
|
|
|
163
293
|
"properties": {
|
|
164
294
|
"locale": {
|
|
165
295
|
"type": "string",
|
|
166
|
-
"enum": ["en", "it"]
|
|
296
|
+
"enum": ["en", "it"],
|
|
297
|
+
"description": "Optional locale override (--locale)."
|
|
167
298
|
}
|
|
168
299
|
}
|
|
169
300
|
}
|
|
@@ -171,7 +302,7 @@
|
|
|
171
302
|
{
|
|
172
303
|
"name": "flycal_config",
|
|
173
304
|
"title": "Configure flycal (interactive)",
|
|
174
|
-
"description": "Interactive configuration menu.
|
|
305
|
+
"description": "Interactive configuration menu. Prefer editing ~/.flycal/config.yml from MCP hosts unless a TTY is available.",
|
|
175
306
|
"interactive": true,
|
|
176
307
|
"requires_auth": true,
|
|
177
308
|
"side_effects": ["writes_config"],
|
|
@@ -179,17 +310,36 @@
|
|
|
179
310
|
"argv": ["flycal", "config"]
|
|
180
311
|
},
|
|
181
312
|
"menu_options": [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
313
|
+
{
|
|
314
|
+
"id": "calendar_default",
|
|
315
|
+
"description": "Single-select default calendar; saved as calendar_default"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"id": "exclude_calendars",
|
|
319
|
+
"description": "Multi-select calendars whose events block slots; saved as slots.exclude_calendars (min 1)"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"id": "edit config",
|
|
323
|
+
"description": "Open ~/.flycal/config.yml with $EDITOR or vi"
|
|
324
|
+
}
|
|
185
325
|
],
|
|
326
|
+
"parameters": {
|
|
327
|
+
"locale": {
|
|
328
|
+
"cli": ["--locale"],
|
|
329
|
+
"type": "string",
|
|
330
|
+
"enum": ["en", "it"],
|
|
331
|
+
"required": false,
|
|
332
|
+
"description": "Optional locale override."
|
|
333
|
+
}
|
|
334
|
+
},
|
|
186
335
|
"inputSchema": {
|
|
187
336
|
"type": "object",
|
|
188
337
|
"additionalProperties": false,
|
|
189
338
|
"properties": {
|
|
190
339
|
"locale": {
|
|
191
340
|
"type": "string",
|
|
192
|
-
"enum": ["en", "it"]
|
|
341
|
+
"enum": ["en", "it"],
|
|
342
|
+
"description": "Optional locale override (--locale)."
|
|
193
343
|
}
|
|
194
344
|
}
|
|
195
345
|
}
|
|
@@ -197,7 +347,7 @@
|
|
|
197
347
|
{
|
|
198
348
|
"name": "flycal_search",
|
|
199
349
|
"title": "Search calendar events",
|
|
200
|
-
"description": "Search Google Calendar events. Prints one line per event (Calendar | Start | End | Title) plus a summary with total occupied time
|
|
350
|
+
"description": "Search Google Calendar events. Prints one line per event (Calendar | Start | End | Title) plus a summary with total occupied time (hours/minutes and 8-hour working days). Ranges >7 days add weekly breakdown; >30 days monthly. Read-only.",
|
|
201
351
|
"interactive": false,
|
|
202
352
|
"requires_auth": true,
|
|
203
353
|
"command": {
|
|
@@ -208,42 +358,102 @@
|
|
|
208
358
|
"to": ["--to", "{value}"],
|
|
209
359
|
"in": ["--in", "{value}"],
|
|
210
360
|
"description": ["--description", "{value}"],
|
|
211
|
-
"locale": ["--locale", "{value}"]
|
|
361
|
+
"locale": ["--locale", "{value}"],
|
|
362
|
+
"format": ["--format", "{value}"]
|
|
212
363
|
},
|
|
213
364
|
"examples": [
|
|
214
365
|
["flycal", "search"],
|
|
215
366
|
["flycal", "search", "--in", "30days", "--description", "placeholder"],
|
|
216
367
|
["flycal", "search", "-f", "2025-03-01", "-t", "2025-03-31", "-c", "Work"],
|
|
217
|
-
["flycal", "search", "--
|
|
368
|
+
["flycal", "search", "--from", "monday", "--in", "2 weeks", "--locale", "it"]
|
|
218
369
|
]
|
|
219
370
|
},
|
|
371
|
+
"parameters": {
|
|
372
|
+
"calendar": {
|
|
373
|
+
"cli": ["--calendar", "-c"],
|
|
374
|
+
"type": "string",
|
|
375
|
+
"required": false,
|
|
376
|
+
"default": "config.calendar_default (or primary)",
|
|
377
|
+
"description": "Calendar name or ID to search."
|
|
378
|
+
},
|
|
379
|
+
"from": {
|
|
380
|
+
"cli": ["--from", "-f"],
|
|
381
|
+
"type": "string",
|
|
382
|
+
"required": false,
|
|
383
|
+
"default": "today midnight",
|
|
384
|
+
"description": "Range start. Absolute or relative date/time.",
|
|
385
|
+
"formats": ["absolute_date", "relative_date"]
|
|
386
|
+
},
|
|
387
|
+
"to": {
|
|
388
|
+
"cli": ["--to", "-t"],
|
|
389
|
+
"type": "string",
|
|
390
|
+
"required": false,
|
|
391
|
+
"default": "23:59 of day 30 from today",
|
|
392
|
+
"description": "Range end. Ignored when `in` is set.",
|
|
393
|
+
"formats": ["absolute_date", "relative_date"]
|
|
394
|
+
},
|
|
395
|
+
"in": {
|
|
396
|
+
"cli": ["--in", "-i"],
|
|
397
|
+
"type": "string",
|
|
398
|
+
"required": false,
|
|
399
|
+
"description": "Duration from `from`; overrides `to`.",
|
|
400
|
+
"formats": ["duration"]
|
|
401
|
+
},
|
|
402
|
+
"description": {
|
|
403
|
+
"cli": ["--description", "-d"],
|
|
404
|
+
"type": "string",
|
|
405
|
+
"required": false,
|
|
406
|
+
"description": "Case-insensitive contains filter on event summary or description."
|
|
407
|
+
},
|
|
408
|
+
"locale": {
|
|
409
|
+
"cli": ["--locale"],
|
|
410
|
+
"type": "string",
|
|
411
|
+
"enum": ["en", "it"],
|
|
412
|
+
"required": false,
|
|
413
|
+
"description": "Optional locale override."
|
|
414
|
+
},
|
|
415
|
+
"format": {
|
|
416
|
+
"cli": ["--format"],
|
|
417
|
+
"type": "string",
|
|
418
|
+
"enum": ["text", "json"],
|
|
419
|
+
"required": false,
|
|
420
|
+
"default": "text",
|
|
421
|
+
"description": "Output format: text (shell) or json (pretty-printed)."
|
|
422
|
+
}
|
|
423
|
+
},
|
|
220
424
|
"inputSchema": {
|
|
221
425
|
"type": "object",
|
|
222
426
|
"additionalProperties": false,
|
|
223
427
|
"properties": {
|
|
224
428
|
"calendar": {
|
|
225
429
|
"type": "string",
|
|
226
|
-
"description": "Calendar name or ID. Default: calendar_default from config."
|
|
430
|
+
"description": "--calendar / -c. Calendar name or ID. Default: calendar_default from config."
|
|
227
431
|
},
|
|
228
432
|
"from": {
|
|
229
433
|
"type": "string",
|
|
230
|
-
"description": "Start datetime. Default: today midnight.
|
|
434
|
+
"description": "--from / -f. Start datetime. Default: today midnight. Absolute (YYYY-MM-DD, locale dates) or relative (monday, tomorrow, next monday, lunedi, …)."
|
|
231
435
|
},
|
|
232
436
|
"to": {
|
|
233
437
|
"type": "string",
|
|
234
|
-
"description": "End datetime. Default: 23:59 of day 30 from today. Ignored when `in` is set."
|
|
438
|
+
"description": "--to / -t. End datetime. Default: 23:59 of day 30 from today. Ignored when `in` is set. Same formats as from."
|
|
235
439
|
},
|
|
236
440
|
"in": {
|
|
237
441
|
"type": "string",
|
|
238
|
-
"description": "Duration from `from
|
|
442
|
+
"description": "--in / -i. Duration from `from`, overrides `to`. Examples: 30days, \"3 days\", 2months, 1week, 48hours."
|
|
239
443
|
},
|
|
240
444
|
"description": {
|
|
241
445
|
"type": "string",
|
|
242
|
-
"description": "Case-insensitive contains filter on event summary or description."
|
|
446
|
+
"description": "--description / -d. Case-insensitive contains filter on event summary or description."
|
|
243
447
|
},
|
|
244
448
|
"locale": {
|
|
245
449
|
"type": "string",
|
|
246
|
-
"enum": ["en", "it"]
|
|
450
|
+
"enum": ["en", "it"],
|
|
451
|
+
"description": "--locale. Optional locale override (en, it)."
|
|
452
|
+
},
|
|
453
|
+
"format": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"enum": ["text", "json"],
|
|
456
|
+
"description": "--format. Output format (default: text). json returns params/info/items/groups."
|
|
247
457
|
}
|
|
248
458
|
}
|
|
249
459
|
}
|
|
@@ -251,7 +461,7 @@
|
|
|
251
461
|
{
|
|
252
462
|
"name": "flycal_slots",
|
|
253
463
|
"title": "Find free time slots",
|
|
254
|
-
"description": "Find free
|
|
464
|
+
"description": "Find continuous free ranges using a slots.templates schedule (days + hours). Default template = first key (usually work). Busy events come from slots.exclude_calendars (or calendar_default if empty). Respects free_before/free_after. Prints header + availability; copies availability list to clipboard when a clipboard tool exists.",
|
|
255
465
|
"interactive": false,
|
|
256
466
|
"requires_auth": true,
|
|
257
467
|
"command": {
|
|
@@ -268,13 +478,71 @@
|
|
|
268
478
|
"examples": [
|
|
269
479
|
["flycal", "slots"],
|
|
270
480
|
["flycal", "slots", "--in", "5 days"],
|
|
481
|
+
["flycal", "slots", "--from", "monday", "--in", "5 days", "--locale", "it"],
|
|
271
482
|
["flycal", "slots", "--in", "12 days", "--template", "dinner"],
|
|
272
|
-
["flycal", "slots", "--duration", "1h"]
|
|
483
|
+
["flycal", "slots", "--from", "next monday", "--duration", "1h", "--template", "work"]
|
|
273
484
|
]
|
|
274
485
|
},
|
|
486
|
+
"parameters": {
|
|
487
|
+
"duration": {
|
|
488
|
+
"cli": ["--duration"],
|
|
489
|
+
"type": "string",
|
|
490
|
+
"required": false,
|
|
491
|
+
"default": "config slots.defaults.default_duration (45min)",
|
|
492
|
+
"description": "Minimum free-range length to keep a slot.",
|
|
493
|
+
"formats": ["duration"],
|
|
494
|
+
"examples": ["45min", "1h", "90min"]
|
|
495
|
+
},
|
|
496
|
+
"from": {
|
|
497
|
+
"cli": ["--from", "-f"],
|
|
498
|
+
"type": "string",
|
|
499
|
+
"required": false,
|
|
500
|
+
"default": "config slots.defaults.from (now)",
|
|
501
|
+
"description": "Search window start. Absolute or relative date/time. If date-only is today, starts from now.",
|
|
502
|
+
"formats": ["absolute_date", "relative_date"],
|
|
503
|
+
"examples": ["now", "monday", "next monday", "lunedi", "2026-08-01"]
|
|
504
|
+
},
|
|
505
|
+
"in": {
|
|
506
|
+
"cli": ["--in", "-i"],
|
|
507
|
+
"type": "string",
|
|
508
|
+
"required": false,
|
|
509
|
+
"default": "1 week",
|
|
510
|
+
"description": "Search window length from --from.",
|
|
511
|
+
"formats": ["duration"],
|
|
512
|
+
"examples": ["5 days", "1 week", "12 days", "48 hours"]
|
|
513
|
+
},
|
|
514
|
+
"template": {
|
|
515
|
+
"cli": ["--template", "-T"],
|
|
516
|
+
"type": "string",
|
|
517
|
+
"required": false,
|
|
518
|
+
"default": "first key in slots.templates (usually work)",
|
|
519
|
+
"description": "Named schedule from config slots.templates (e.g. work, dinner).",
|
|
520
|
+
"examples": ["work", "dinner"]
|
|
521
|
+
},
|
|
522
|
+
"calendar": {
|
|
523
|
+
"cli": ["--calendar", "-c"],
|
|
524
|
+
"type": "string",
|
|
525
|
+
"required": false,
|
|
526
|
+
"default": null,
|
|
527
|
+
"description": "Fallback calendar name/ID only when slots.exclude_calendars is empty/unset."
|
|
528
|
+
},
|
|
529
|
+
"locale": {
|
|
530
|
+
"cli": ["--locale"],
|
|
531
|
+
"type": "string",
|
|
532
|
+
"enum": ["en", "it"],
|
|
533
|
+
"required": false,
|
|
534
|
+
"description": "Optional locale override."
|
|
535
|
+
}
|
|
536
|
+
},
|
|
275
537
|
"output": {
|
|
276
538
|
"format": "text/plain",
|
|
277
|
-
"
|
|
539
|
+
"includes": [
|
|
540
|
+
"count + from/to + duration + template",
|
|
541
|
+
"bullet list of considered calendars",
|
|
542
|
+
"link: Google Calendar day URL at --from",
|
|
543
|
+
"availability ranges grouped by day (copied to clipboard without header)"
|
|
544
|
+
],
|
|
545
|
+
"example": "found 6 slots\nfrom sat 1 August 2026 to sat 8 August 2026\nwith duration 45min, template dinner\nconsidering calendars\n- Work\n- Personal\nlink: https://calendar.google.com/calendar/r/day/2026/8/1\n\nsaturday 1/8\n19 - 23"
|
|
278
546
|
},
|
|
279
547
|
"inputSchema": {
|
|
280
548
|
"type": "object",
|
|
@@ -283,37 +551,38 @@
|
|
|
283
551
|
"properties": {
|
|
284
552
|
"duration": {
|
|
285
553
|
"type": "string",
|
|
286
|
-
"description": "Slot length. Default
|
|
554
|
+
"description": "--duration. Slot length. Optional. Default: slots.defaults.default_duration (45min). Examples: 45min, 1h, 90min."
|
|
287
555
|
},
|
|
288
556
|
"from": {
|
|
289
557
|
"type": "string",
|
|
290
|
-
"description": "
|
|
558
|
+
"description": "--from / -f. Window start. Optional. Default: slots.defaults.from (now). Absolute dates (YYYY-MM-DD, locale dates) or relative (now, today/oggi, tomorrow/domani, monday/lunedi, next monday/prossimo lunedi, last friday/scorso venerdi)."
|
|
291
559
|
},
|
|
292
560
|
"in": {
|
|
293
561
|
"type": "string",
|
|
294
|
-
"description": "
|
|
562
|
+
"description": "--in / -i. Window length from --from. Optional. Default: 1 week. Examples: \"5 days\", 1week, \"12 days\", 48hours."
|
|
295
563
|
},
|
|
296
564
|
"template": {
|
|
297
565
|
"type": "string",
|
|
298
|
-
"description": "Template name from slots.templates
|
|
566
|
+
"description": "--template / -T. Template name from slots.templates. Optional. Default: first template (usually work). Built-ins: work (Mon-Fri office hours), dinner (evening hours)."
|
|
299
567
|
},
|
|
300
568
|
"calendar": {
|
|
301
569
|
"type": "string",
|
|
302
|
-
"description": "Fallback calendar name/ID when exclude_calendars is
|
|
570
|
+
"description": "--calendar / -c. Fallback calendar name/ID when slots.exclude_calendars is empty."
|
|
303
571
|
},
|
|
304
572
|
"locale": {
|
|
305
573
|
"type": "string",
|
|
306
|
-
"enum": ["en", "it"]
|
|
574
|
+
"enum": ["en", "it"],
|
|
575
|
+
"description": "--locale. Optional locale override (en, it)."
|
|
307
576
|
}
|
|
308
577
|
}
|
|
309
578
|
}
|
|
310
579
|
}
|
|
311
580
|
],
|
|
312
581
|
"mcp_implementation_hints": {
|
|
313
|
-
"execution": "Spawn the flycal binary with argv from command.argv or build argv from option_map. Capture stdout/stderr and exit code. Return stdout as MCP text content.",
|
|
314
|
-
"
|
|
315
|
-
"
|
|
316
|
-
"
|
|
317
|
-
"tool_filter": "
|
|
582
|
+
"execution": "Spawn the flycal binary with argv from command.argv, or build argv from argv_template + option_map for each provided parameter. Capture stdout/stderr and exit code. Return stdout as MCP text content.",
|
|
583
|
+
"parameter_building": "For each non-null input property present in option_map, append the mapped flag and value. Quote values with spaces. Always append --locale when locale is set.",
|
|
584
|
+
"interactive_tools": "Do not auto-run tools with interactive=true unless the host provides a TTY. Tell the user to run them in a terminal.",
|
|
585
|
+
"auth_errors": "If output indicates the user is not connected, suggest flycal login (after credentials.json is in place).",
|
|
586
|
+
"tool_filter": "Prefer exposing flycal_search, flycal_slots, flycal_calendars, and flycal_version to agents."
|
|
318
587
|
}
|
|
319
588
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mockCalendar": "mock1",
|
|
3
|
+
"mockEventDescriptionPatterns": "work,personal,event",
|
|
4
|
+
"mockEventCount": 100,
|
|
5
|
+
"mockEventFrom": "2026-01-01",
|
|
6
|
+
"mockEventTo": "2026-01-31",
|
|
7
|
+
"mockEventDurationMin": "4h",
|
|
8
|
+
"mockEventDurationMax": "4h",
|
|
9
|
+
"mockEventHoursFrom": "09:00",
|
|
10
|
+
"mockEventHoursTo": "17:00"
|
|
11
|
+
}
|
data/mocks/mock1.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mockCalendar": "mock1",
|
|
3
|
+
"mockEventDescriptionPatterns": "work,personal,event",
|
|
4
|
+
"mockEventCount": 100,
|
|
5
|
+
"mockEventFrom": "2026-01-01",
|
|
6
|
+
"mockEventTo": "2026-01-31",
|
|
7
|
+
"mockEventDurationMin": "4h",
|
|
8
|
+
"mockEventDurationMax": "4h",
|
|
9
|
+
"mockEventHoursFrom": "09:00",
|
|
10
|
+
"mockEventHoursTo": "17:00"
|
|
11
|
+
}
|