google-mcp-suite 1.2.0 → 1.3.0

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.
Files changed (231) hide show
  1. package/dist/calendar/methods/add_calendar_entry/index.d.ts.map +1 -1
  2. package/dist/calendar/methods/add_calendar_entry/index.js +6 -0
  3. package/dist/calendar/methods/add_calendar_entry/index.js.map +1 -1
  4. package/dist/calendar/methods/clear_calendar/index.d.ts.map +1 -1
  5. package/dist/calendar/methods/clear_calendar/index.js +6 -1
  6. package/dist/calendar/methods/clear_calendar/index.js.map +1 -1
  7. package/dist/calendar/methods/create_calendar/index.d.ts.map +1 -1
  8. package/dist/calendar/methods/create_calendar/index.js +6 -0
  9. package/dist/calendar/methods/create_calendar/index.js.map +1 -1
  10. package/dist/calendar/methods/delete_calendar/index.d.ts.map +1 -1
  11. package/dist/calendar/methods/delete_calendar/index.js +6 -1
  12. package/dist/calendar/methods/delete_calendar/index.js.map +1 -1
  13. package/dist/calendar/methods/get_calendar/index.d.ts.map +1 -1
  14. package/dist/calendar/methods/get_calendar/index.js +6 -0
  15. package/dist/calendar/methods/get_calendar/index.js.map +1 -1
  16. package/dist/calendar/methods/get_calendar_entry/index.d.ts.map +1 -1
  17. package/dist/calendar/methods/get_calendar_entry/index.js +6 -0
  18. package/dist/calendar/methods/get_calendar_entry/index.js.map +1 -1
  19. package/dist/calendar/methods/get_colors/index.d.ts.map +1 -1
  20. package/dist/calendar/methods/get_colors/index.js +6 -0
  21. package/dist/calendar/methods/get_colors/index.js.map +1 -1
  22. package/dist/calendar/methods/get_setting/index.d.ts.map +1 -1
  23. package/dist/calendar/methods/get_setting/index.js +6 -0
  24. package/dist/calendar/methods/get_setting/index.js.map +1 -1
  25. package/dist/calendar/methods/list_event_instances/index.d.ts.map +1 -1
  26. package/dist/calendar/methods/list_event_instances/index.js +6 -0
  27. package/dist/calendar/methods/list_event_instances/index.js.map +1 -1
  28. package/dist/calendar/methods/list_settings/index.d.ts.map +1 -1
  29. package/dist/calendar/methods/list_settings/index.js +6 -0
  30. package/dist/calendar/methods/list_settings/index.js.map +1 -1
  31. package/dist/calendar/methods/move_event/index.d.ts.map +1 -1
  32. package/dist/calendar/methods/move_event/index.js +6 -0
  33. package/dist/calendar/methods/move_event/index.js.map +1 -1
  34. package/dist/calendar/methods/patch_event/index.d.ts.map +1 -1
  35. package/dist/calendar/methods/patch_event/index.js +6 -0
  36. package/dist/calendar/methods/patch_event/index.js.map +1 -1
  37. package/dist/calendar/methods/query_free_busy/index.d.ts.map +1 -1
  38. package/dist/calendar/methods/query_free_busy/index.js +6 -0
  39. package/dist/calendar/methods/query_free_busy/index.js.map +1 -1
  40. package/dist/calendar/methods/quick_add_event/index.d.ts.map +1 -1
  41. package/dist/calendar/methods/quick_add_event/index.js +6 -0
  42. package/dist/calendar/methods/quick_add_event/index.js.map +1 -1
  43. package/dist/calendar/methods/remove_calendar_entry/index.d.ts +2 -1
  44. package/dist/calendar/methods/remove_calendar_entry/index.d.ts.map +1 -1
  45. package/dist/calendar/methods/remove_calendar_entry/index.js +8 -1
  46. package/dist/calendar/methods/remove_calendar_entry/index.js.map +1 -1
  47. package/dist/calendar/methods/update_calendar/index.d.ts.map +1 -1
  48. package/dist/calendar/methods/update_calendar/index.js +6 -0
  49. package/dist/calendar/methods/update_calendar/index.js.map +1 -1
  50. package/dist/calendar/methods/update_calendar_entry/index.d.ts.map +1 -1
  51. package/dist/calendar/methods/update_calendar_entry/index.js +6 -0
  52. package/dist/calendar/methods/update_calendar_entry/index.js.map +1 -1
  53. package/dist/calendar/tools/create_event/index.d.ts.map +1 -1
  54. package/dist/calendar/tools/create_event/index.js +6 -0
  55. package/dist/calendar/tools/create_event/index.js.map +1 -1
  56. package/dist/calendar/tools/delete_event/index.d.ts.map +1 -1
  57. package/dist/calendar/tools/delete_event/index.js +6 -1
  58. package/dist/calendar/tools/delete_event/index.js.map +1 -1
  59. package/dist/calendar/tools/get_event/index.d.ts.map +1 -1
  60. package/dist/calendar/tools/get_event/index.js +6 -0
  61. package/dist/calendar/tools/get_event/index.js.map +1 -1
  62. package/dist/calendar/tools/list_calendars/index.d.ts.map +1 -1
  63. package/dist/calendar/tools/list_calendars/index.js +6 -0
  64. package/dist/calendar/tools/list_calendars/index.js.map +1 -1
  65. package/dist/calendar/tools/list_events/index.d.ts.map +1 -1
  66. package/dist/calendar/tools/list_events/index.js +6 -0
  67. package/dist/calendar/tools/list_events/index.js.map +1 -1
  68. package/dist/calendar/tools/respond_to_event/index.d.ts.map +1 -1
  69. package/dist/calendar/tools/respond_to_event/index.js +6 -0
  70. package/dist/calendar/tools/respond_to_event/index.js.map +1 -1
  71. package/dist/calendar/tools/suggest_time/index.d.ts.map +1 -1
  72. package/dist/calendar/tools/suggest_time/index.js +6 -0
  73. package/dist/calendar/tools/suggest_time/index.js.map +1 -1
  74. package/dist/calendar/tools/update_event/index.d.ts.map +1 -1
  75. package/dist/calendar/tools/update_event/index.js +6 -0
  76. package/dist/calendar/tools/update_event/index.js.map +1 -1
  77. package/dist/gmail/methods/batch_delete_messages/index.d.ts.map +1 -1
  78. package/dist/gmail/methods/batch_delete_messages/index.js +6 -1
  79. package/dist/gmail/methods/batch_delete_messages/index.js.map +1 -1
  80. package/dist/gmail/methods/batch_modify_messages/index.d.ts.map +1 -1
  81. package/dist/gmail/methods/batch_modify_messages/index.js +6 -0
  82. package/dist/gmail/methods/batch_modify_messages/index.js.map +1 -1
  83. package/dist/gmail/methods/create_filter/index.d.ts.map +1 -1
  84. package/dist/gmail/methods/create_filter/index.js +6 -1
  85. package/dist/gmail/methods/create_filter/index.js.map +1 -1
  86. package/dist/gmail/methods/delete_draft/index.d.ts +2 -1
  87. package/dist/gmail/methods/delete_draft/index.d.ts.map +1 -1
  88. package/dist/gmail/methods/delete_draft/index.js +8 -1
  89. package/dist/gmail/methods/delete_draft/index.js.map +1 -1
  90. package/dist/gmail/methods/delete_filter/index.d.ts +2 -1
  91. package/dist/gmail/methods/delete_filter/index.d.ts.map +1 -1
  92. package/dist/gmail/methods/delete_filter/index.js +8 -1
  93. package/dist/gmail/methods/delete_filter/index.js.map +1 -1
  94. package/dist/gmail/methods/delete_label/index.d.ts +2 -2
  95. package/dist/gmail/methods/delete_label/index.d.ts.map +1 -1
  96. package/dist/gmail/methods/delete_label/index.js +8 -2
  97. package/dist/gmail/methods/delete_label/index.js.map +1 -1
  98. package/dist/gmail/methods/delete_message/index.d.ts.map +1 -1
  99. package/dist/gmail/methods/delete_message/index.js +6 -1
  100. package/dist/gmail/methods/delete_message/index.js.map +1 -1
  101. package/dist/gmail/methods/delete_thread/index.d.ts.map +1 -1
  102. package/dist/gmail/methods/delete_thread/index.js +6 -1
  103. package/dist/gmail/methods/delete_thread/index.js.map +1 -1
  104. package/dist/gmail/methods/download_attachment/index.d.ts.map +1 -1
  105. package/dist/gmail/methods/download_attachment/index.js +6 -0
  106. package/dist/gmail/methods/download_attachment/index.js.map +1 -1
  107. package/dist/gmail/methods/get_draft/index.d.ts.map +1 -1
  108. package/dist/gmail/methods/get_draft/index.js +6 -0
  109. package/dist/gmail/methods/get_draft/index.js.map +1 -1
  110. package/dist/gmail/methods/get_filter/index.d.ts.map +1 -1
  111. package/dist/gmail/methods/get_filter/index.js +6 -0
  112. package/dist/gmail/methods/get_filter/index.js.map +1 -1
  113. package/dist/gmail/methods/get_label/index.d.ts.map +1 -1
  114. package/dist/gmail/methods/get_label/index.js +6 -0
  115. package/dist/gmail/methods/get_label/index.js.map +1 -1
  116. package/dist/gmail/methods/get_message/index.d.ts.map +1 -1
  117. package/dist/gmail/methods/get_message/index.js +6 -0
  118. package/dist/gmail/methods/get_message/index.js.map +1 -1
  119. package/dist/gmail/methods/list_filters/index.d.ts.map +1 -1
  120. package/dist/gmail/methods/list_filters/index.js +6 -0
  121. package/dist/gmail/methods/list_filters/index.js.map +1 -1
  122. package/dist/gmail/methods/list_messages/index.d.ts.map +1 -1
  123. package/dist/gmail/methods/list_messages/index.js +6 -0
  124. package/dist/gmail/methods/list_messages/index.js.map +1 -1
  125. package/dist/gmail/methods/send_draft/index.d.ts.map +1 -1
  126. package/dist/gmail/methods/send_draft/index.js +6 -1
  127. package/dist/gmail/methods/send_draft/index.js.map +1 -1
  128. package/dist/gmail/methods/send_message/index.d.ts.map +1 -1
  129. package/dist/gmail/methods/send_message/index.js +6 -1
  130. package/dist/gmail/methods/send_message/index.js.map +1 -1
  131. package/dist/gmail/methods/trash_message/index.d.ts.map +1 -1
  132. package/dist/gmail/methods/trash_message/index.js +6 -0
  133. package/dist/gmail/methods/trash_message/index.js.map +1 -1
  134. package/dist/gmail/methods/trash_thread/index.d.ts.map +1 -1
  135. package/dist/gmail/methods/trash_thread/index.js +6 -0
  136. package/dist/gmail/methods/trash_thread/index.js.map +1 -1
  137. package/dist/gmail/methods/untrash_message/index.d.ts.map +1 -1
  138. package/dist/gmail/methods/untrash_message/index.js +6 -0
  139. package/dist/gmail/methods/untrash_message/index.js.map +1 -1
  140. package/dist/gmail/methods/untrash_thread/index.d.ts.map +1 -1
  141. package/dist/gmail/methods/untrash_thread/index.js +6 -0
  142. package/dist/gmail/methods/untrash_thread/index.js.map +1 -1
  143. package/dist/gmail/methods/update_draft/index.d.ts.map +1 -1
  144. package/dist/gmail/methods/update_draft/index.js +6 -0
  145. package/dist/gmail/methods/update_draft/index.js.map +1 -1
  146. package/dist/gmail/methods/update_label/index.d.ts.map +1 -1
  147. package/dist/gmail/methods/update_label/index.js +6 -0
  148. package/dist/gmail/methods/update_label/index.js.map +1 -1
  149. package/dist/gmail/tools/create_draft/index.d.ts.map +1 -1
  150. package/dist/gmail/tools/create_draft/index.js +6 -0
  151. package/dist/gmail/tools/create_draft/index.js.map +1 -1
  152. package/dist/gmail/tools/create_label/index.d.ts.map +1 -1
  153. package/dist/gmail/tools/create_label/index.js +6 -0
  154. package/dist/gmail/tools/create_label/index.js.map +1 -1
  155. package/dist/gmail/tools/get_thread/index.d.ts.map +1 -1
  156. package/dist/gmail/tools/get_thread/index.js +6 -0
  157. package/dist/gmail/tools/get_thread/index.js.map +1 -1
  158. package/dist/gmail/tools/label_message/index.d.ts.map +1 -1
  159. package/dist/gmail/tools/label_message/index.js +6 -0
  160. package/dist/gmail/tools/label_message/index.js.map +1 -1
  161. package/dist/gmail/tools/label_thread/index.d.ts.map +1 -1
  162. package/dist/gmail/tools/label_thread/index.js +6 -0
  163. package/dist/gmail/tools/label_thread/index.js.map +1 -1
  164. package/dist/gmail/tools/list_drafts/index.d.ts.map +1 -1
  165. package/dist/gmail/tools/list_drafts/index.js +10 -0
  166. package/dist/gmail/tools/list_drafts/index.js.map +1 -1
  167. package/dist/gmail/tools/list_labels/index.d.ts.map +1 -1
  168. package/dist/gmail/tools/list_labels/index.js +6 -0
  169. package/dist/gmail/tools/list_labels/index.js.map +1 -1
  170. package/dist/gmail/tools/search_threads/index.d.ts.map +1 -1
  171. package/dist/gmail/tools/search_threads/index.js +6 -0
  172. package/dist/gmail/tools/search_threads/index.js.map +1 -1
  173. package/dist/gmail/tools/unlabel_message/index.d.ts.map +1 -1
  174. package/dist/gmail/tools/unlabel_message/index.js +6 -0
  175. package/dist/gmail/tools/unlabel_message/index.js.map +1 -1
  176. package/dist/gmail/tools/unlabel_thread/index.d.ts.map +1 -1
  177. package/dist/gmail/tools/unlabel_thread/index.js +6 -0
  178. package/dist/gmail/tools/unlabel_thread/index.js.map +1 -1
  179. package/dist/lib/operation.d.ts +45 -3
  180. package/dist/lib/operation.d.ts.map +1 -1
  181. package/dist/lib/operation.js.map +1 -1
  182. package/dist/lib/server.d.ts +1 -3
  183. package/dist/lib/server.d.ts.map +1 -1
  184. package/dist/lib/server.js +2 -2
  185. package/dist/lib/server.js.map +1 -1
  186. package/dist/sheets/methods/append_values/index.d.ts.map +1 -1
  187. package/dist/sheets/methods/append_values/index.js +6 -0
  188. package/dist/sheets/methods/append_values/index.js.map +1 -1
  189. package/dist/sheets/methods/batch_clear_values/index.d.ts.map +1 -1
  190. package/dist/sheets/methods/batch_clear_values/index.js +6 -1
  191. package/dist/sheets/methods/batch_clear_values/index.js.map +1 -1
  192. package/dist/sheets/methods/batch_clear_values_by_data_filter/index.d.ts.map +1 -1
  193. package/dist/sheets/methods/batch_clear_values_by_data_filter/index.js +6 -1
  194. package/dist/sheets/methods/batch_clear_values_by_data_filter/index.js.map +1 -1
  195. package/dist/sheets/methods/batch_get_values/index.d.ts.map +1 -1
  196. package/dist/sheets/methods/batch_get_values/index.js +6 -0
  197. package/dist/sheets/methods/batch_get_values/index.js.map +1 -1
  198. package/dist/sheets/methods/batch_get_values_by_data_filter/index.d.ts.map +1 -1
  199. package/dist/sheets/methods/batch_get_values_by_data_filter/index.js +6 -0
  200. package/dist/sheets/methods/batch_get_values_by_data_filter/index.js.map +1 -1
  201. package/dist/sheets/methods/batch_update_values/index.d.ts.map +1 -1
  202. package/dist/sheets/methods/batch_update_values/index.js +6 -0
  203. package/dist/sheets/methods/batch_update_values/index.js.map +1 -1
  204. package/dist/sheets/methods/batch_update_values_by_data_filter/index.d.ts.map +1 -1
  205. package/dist/sheets/methods/batch_update_values_by_data_filter/index.js +6 -0
  206. package/dist/sheets/methods/batch_update_values_by_data_filter/index.js.map +1 -1
  207. package/dist/sheets/methods/clear_values/index.d.ts.map +1 -1
  208. package/dist/sheets/methods/clear_values/index.js +6 -1
  209. package/dist/sheets/methods/clear_values/index.js.map +1 -1
  210. package/dist/sheets/methods/copy_sheet/index.d.ts.map +1 -1
  211. package/dist/sheets/methods/copy_sheet/index.js +6 -0
  212. package/dist/sheets/methods/copy_sheet/index.js.map +1 -1
  213. package/dist/sheets/methods/create_spreadsheet/index.d.ts.map +1 -1
  214. package/dist/sheets/methods/create_spreadsheet/index.js +6 -0
  215. package/dist/sheets/methods/create_spreadsheet/index.js.map +1 -1
  216. package/dist/sheets/methods/get_developer_metadata/index.d.ts.map +1 -1
  217. package/dist/sheets/methods/get_developer_metadata/index.js +6 -0
  218. package/dist/sheets/methods/get_developer_metadata/index.js.map +1 -1
  219. package/dist/sheets/methods/get_spreadsheet/index.d.ts.map +1 -1
  220. package/dist/sheets/methods/get_spreadsheet/index.js +6 -0
  221. package/dist/sheets/methods/get_spreadsheet/index.js.map +1 -1
  222. package/dist/sheets/methods/get_values/index.d.ts.map +1 -1
  223. package/dist/sheets/methods/get_values/index.js +6 -0
  224. package/dist/sheets/methods/get_values/index.js.map +1 -1
  225. package/dist/sheets/methods/search_developer_metadata/index.d.ts.map +1 -1
  226. package/dist/sheets/methods/search_developer_metadata/index.js +6 -0
  227. package/dist/sheets/methods/search_developer_metadata/index.js.map +1 -1
  228. package/dist/sheets/methods/update_values/index.d.ts.map +1 -1
  229. package/dist/sheets/methods/update_values/index.js +6 -0
  230. package/dist/sheets/methods/update_values/index.js.map +1 -1
  231. package/package.json +1 -1
@@ -1,4 +1,46 @@
1
1
  import type { z } from 'zod';
2
+ /**
3
+ * The four MCP tool-behavior hints, all required: every operation declares its
4
+ * full annotation quad explicitly, the same way Google's MCP reference pages
5
+ * present them (each page ends with a Tool Annotations section listing all
6
+ * four). Structurally a strict subset of the SDK's `ToolAnnotations`, whose
7
+ * fields are all optional with dangerous defaults (an absent `destructiveHint`
8
+ * means true on the wire); requiring all four here keeps an unclassified
9
+ * operation from compiling and keeps the emitted payload free of default
10
+ * ambiguity. Do not abstract the quads into named profiles or category
11
+ * constants; the explicit flags are the transcription.
12
+ *
13
+ * Design provenance:
14
+ * - Field semantics: the MCP specification's `ToolAnnotations`,
15
+ * https://modelcontextprotocol.io/specification/2025-06-18/schema
16
+ * - Classification: tools transcribe their Google MCP reference page's
17
+ * Tool Annotations section verbatim; methods follow the rubric those pages
18
+ * establish (EXTENDING.md, "Annotations")
19
+ * - Per the spec, annotations are hints, not guarantees; clients treat them
20
+ * as untrusted
21
+ */
22
+ export type OperationAnnotations = {
23
+ /** True when the operation does not modify its environment (a pure read). */
24
+ readOnlyHint: boolean;
25
+ /**
26
+ * True when the operation may perform non-additive updates: removals
27
+ * (delete, clear, trash, unlabel, unsubscribe), sends, and standing side
28
+ * effects. Updates and additive modifications are false, per Google's own
29
+ * `update_event` classification.
30
+ */
31
+ destructiveHint: boolean;
32
+ /**
33
+ * True when repeating the call with the same arguments has no additional
34
+ * effect (reads, updates, removals); false for creates and sends, which
35
+ * duplicate their effect.
36
+ */
37
+ idempotentHint: boolean;
38
+ /**
39
+ * True when the operation reaches arbitrary external entities (Gmail's
40
+ * sends); false for everything bound to the account's own data.
41
+ */
42
+ openWorldHint: boolean;
43
+ };
2
44
  /**
3
45
  * A single operation: its documented I/O contract plus the work that fulfills it.
4
46
  * Every tool and method is an `Operation`; they differ only by which Google
@@ -15,8 +57,8 @@ export type Operation<Client, In extends z.ZodObject, Out extends z.ZodObject> =
15
57
  output: Out;
16
58
  };
17
59
  handler: (client: Client, args: z.infer<In>) => Promise<z.infer<Out>>;
18
- /** Irreversible (send, permanent delete) or a standing side effect (a forwarding filter); surfaced as MCP `destructiveHint`. */
19
- destructive?: boolean;
60
+ /** The four MCP behavior hints, emitted verbatim in `tools/list`; see {@link OperationAnnotations}. */
61
+ annotations: OperationAnnotations;
20
62
  };
21
63
  /**
22
64
  * An operation with its schemas erased; the shape the registry and server hold.
@@ -32,7 +74,7 @@ export type AnyOperation<Client> = {
32
74
  output: z.ZodObject;
33
75
  };
34
76
  handler: (client: Client, args: never) => Promise<unknown>;
35
- destructive?: boolean;
77
+ annotations: OperationAnnotations;
36
78
  };
37
79
  /**
38
80
  * Define an operation. A no-op at runtime (it returns its argument); its job is
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/lib/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,CAAC,SAAS,IAAI;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QA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AM,EAAE,EAAE,EAAE,GAAG,CAAC,KAC9B,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,CAAQ,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EACpC,GAAG,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,GAChD,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAWtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../src/lib/operation.ts"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,GAA+B,EACH,EAAE,CAAC,GAAG,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,GAAG,MAA8C;IAEjD,MAAM,MAAM,GAAyC,EAAE,CAAC;IACxD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/C,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;YACvD,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { z } from 'zod';\n\n/**\n * A single operation: its documented I/O contract plus the work that fulfills it.\n * Every tool and method is an `Operation`; they differ only by which Google\n * reference the folder mirrors (MCP toolset vs REST), never by type.\n *\n * `schema` is the contract (zod, mirrored from the docs); `handler` receives the\n * service's authenticated client and the validated input and returns a value that\n * conforms to `schema.output`.\n */\nexport type Operation<Client, In extends z.ZodObject, Out extends z.ZodObject> = {\n description: string;\n schema: { input: In; output: Out };\n handler: (client: Client, args: z.infer<In>) => Promise<z.infer<Out>>;\n /** Irreversible (send, permanent delete) or a standing side effect (a forwarding filter); surfaced as MCP `destructiveHint`. */\n destructive?: boolean;\n};\n\n/**\n * An operation with its schemas erased; the shape the registry and server hold.\n * The handler's args are widened to `never` so any concrete `Operation` is\n * assignable here (a handler taking a specific input is assignable to one taking\n * `never` by contravariance; under zod 4, `z.infer<z.ZodType>` is `unknown`, which\n * would break that, so `never` restores it).\n */\nexport type AnyOperation<Client> = {\n description: string;\n schema: { input: z.ZodObject; output: z.ZodObject };\n handler: (client: Client, args: never) => Promise<unknown>;\n destructive?: boolean;\n};\n\n/**\n * Define an operation. A no-op at runtime (it returns its argument); its job is\n * type inference (`Client` from the handler's first parameter, `input`/`output`\n * from `schema`) and the front-door check that the handler consumes exactly what\n * the schema declares.\n */\nexport const operation = <Client, In extends z.ZodObject, Out extends z.ZodObject>(\n def: Operation<Client, In, Out>,\n): Operation<Client, In, Out> => def;\n\n/**\n * Merge operation groups (e.g. a service's tools and methods) into the single\n * registry the server dispatches. Throws on a duplicate wire name: two operations\n * cannot answer to the same key, and a silent `{ ...a, ...b }` spread would let\n * one shadow the other and vanish from the wire with no error.\n */\nexport function mergeOperations<Client>(\n ...groups: Record<string, AnyOperation<Client>>[]\n): Record<string, AnyOperation<Client>> {\n const merged: Record<string, AnyOperation<Client>> = {};\n for (const group of groups) {\n for (const [name, op] of Object.entries(group)) {\n if (Object.hasOwn(merged, name)) {\n throw new Error(`Duplicate operation name: ${name}`);\n }\n merged[name] = op;\n }\n }\n return merged;\n}\n"]}
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../src/lib/operation.ts"],"names":[],"mappings":"AA4EA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,GAA+B,EACH,EAAE,CAAC,GAAG,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,GAAG,MAA8C;IAEjD,MAAM,MAAM,GAAyC,EAAE,CAAC;IACxD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/C,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;YACvD,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { z } from 'zod';\n\n/**\n * The four MCP tool-behavior hints, all required: every operation declares its\n * full annotation quad explicitly, the same way Google's MCP reference pages\n * present them (each page ends with a Tool Annotations section listing all\n * four). Structurally a strict subset of the SDK's `ToolAnnotations`, whose\n * fields are all optional with dangerous defaults (an absent `destructiveHint`\n * means true on the wire); requiring all four here keeps an unclassified\n * operation from compiling and keeps the emitted payload free of default\n * ambiguity. Do not abstract the quads into named profiles or category\n * constants; the explicit flags are the transcription.\n *\n * Design provenance:\n * - Field semantics: the MCP specification's `ToolAnnotations`,\n * https://modelcontextprotocol.io/specification/2025-06-18/schema\n * - Classification: tools transcribe their Google MCP reference page's\n * Tool Annotations section verbatim; methods follow the rubric those pages\n * establish (EXTENDING.md, \"Annotations\")\n * - Per the spec, annotations are hints, not guarantees; clients treat them\n * as untrusted\n */\nexport type OperationAnnotations = {\n /** True when the operation does not modify its environment (a pure read). */\n readOnlyHint: boolean;\n /**\n * True when the operation may perform non-additive updates: removals\n * (delete, clear, trash, unlabel, unsubscribe), sends, and standing side\n * effects. Updates and additive modifications are false, per Google's own\n * `update_event` classification.\n */\n destructiveHint: boolean;\n /**\n * True when repeating the call with the same arguments has no additional\n * effect (reads, updates, removals); false for creates and sends, which\n * duplicate their effect.\n */\n idempotentHint: boolean;\n /**\n * True when the operation reaches arbitrary external entities (Gmail's\n * sends); false for everything bound to the account's own data.\n */\n openWorldHint: boolean;\n};\n\n/**\n * A single operation: its documented I/O contract plus the work that fulfills it.\n * Every tool and method is an `Operation`; they differ only by which Google\n * reference the folder mirrors (MCP toolset vs REST), never by type.\n *\n * `schema` is the contract (zod, mirrored from the docs); `handler` receives the\n * service's authenticated client and the validated input and returns a value that\n * conforms to `schema.output`.\n */\nexport type Operation<Client, In extends z.ZodObject, Out extends z.ZodObject> = {\n description: string;\n schema: { input: In; output: Out };\n handler: (client: Client, args: z.infer<In>) => Promise<z.infer<Out>>;\n /** The four MCP behavior hints, emitted verbatim in `tools/list`; see {@link OperationAnnotations}. */\n annotations: OperationAnnotations;\n};\n\n/**\n * An operation with its schemas erased; the shape the registry and server hold.\n * The handler's args are widened to `never` so any concrete `Operation` is\n * assignable here (a handler taking a specific input is assignable to one taking\n * `never` by contravariance; under zod 4, `z.infer<z.ZodType>` is `unknown`, which\n * would break that, so `never` restores it).\n */\nexport type AnyOperation<Client> = {\n description: string;\n schema: { input: z.ZodObject; output: z.ZodObject };\n handler: (client: Client, args: never) => Promise<unknown>;\n annotations: OperationAnnotations;\n};\n\n/**\n * Define an operation. A no-op at runtime (it returns its argument); its job is\n * type inference (`Client` from the handler's first parameter, `input`/`output`\n * from `schema`) and the front-door check that the handler consumes exactly what\n * the schema declares.\n */\nexport const operation = <Client, In extends z.ZodObject, Out extends z.ZodObject>(\n def: Operation<Client, In, Out>,\n): Operation<Client, In, Out> => def;\n\n/**\n * Merge operation groups (e.g. a service's tools and methods) into the single\n * registry the server dispatches. Throws on a duplicate wire name: two operations\n * cannot answer to the same key, and a silent `{ ...a, ...b }` spread would let\n * one shadow the other and vanish from the wire with no error.\n */\nexport function mergeOperations<Client>(\n ...groups: Record<string, AnyOperation<Client>>[]\n): Record<string, AnyOperation<Client>> {\n const merged: Record<string, AnyOperation<Client>> = {};\n for (const group of groups) {\n for (const [name, op] of Object.entries(group)) {\n if (Object.hasOwn(merged, name)) {\n throw new Error(`Duplicate operation name: ${name}`);\n }\n merged[name] = op;\n }\n }\n return merged;\n}\n"]}
@@ -20,13 +20,11 @@ export type ServerOptions<Client> = {
20
20
  * every operation is a "tool" (MCP has no other word). Pure; exported for tests.
21
21
  */
22
22
  export declare function toolDefinitions<Client>(operations: Record<string, AnyOperation<Client>>): {
23
- annotations?: {
24
- destructiveHint: boolean;
25
- };
26
23
  name: string;
27
24
  description: string;
28
25
  inputSchema: Record<string, unknown>;
29
26
  outputSchema: Record<string, unknown>;
27
+ annotations: import("./operation.js").OperationAnnotations;
30
28
  }[];
31
29
  /** A labeled set of operations for the capability table: its provenance + the ops. */
32
30
  export type CapabilityGroup<Client> = {
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/lib/server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI;IAClC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,gFAAgF;IAChF,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,+DAA+D;IAC/D,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,qEAAqE;IACrE,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAMF;;;;GAI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AE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBlF"}
@@ -17,7 +17,7 @@ export function toolDefinitions(operations) {
17
17
  description: op.description,
18
18
  inputSchema: z.toJSONSchema(op.schema.input, { io: 'input' }),
19
19
  outputSchema: z.toJSONSchema(op.schema.output, { io: 'output' }),
20
- ...(op.destructive ? { annotations: { destructiveHint: true } } : {}),
20
+ annotations: op.annotations,
21
21
  }));
22
22
  }
23
23
  /** Prose labels for the group kinds; the header sentence is built from these. */
@@ -36,7 +36,7 @@ const KIND_LABELS = {
36
36
  * from this (and a test pins the file to it) so the doc cannot drift from the code.
37
37
  */
38
38
  export function renderCapabilities(title, groups) {
39
- const rows = groups.flatMap(({ kind, operations }) => Object.entries(operations).map(([name, op]) => `| \`${name}\`${op.destructive ? ' ⚠️' : ''} | ${kind} | ${op.description} |`));
39
+ const rows = groups.flatMap(({ kind, operations }) => Object.entries(operations).map(([name, op]) => `| \`${name}\`${op.annotations.destructiveHint ? ' ⚠️' : ''} | ${kind} | ${op.description} |`));
40
40
  // Derived from the groups actually passed in, so a methods-only service
41
41
  // (Sheets) does not claim an MCP toolset it does not have.
42
42
  const labels = groups.map(({ kind }) => KIND_LABELS[kind] ?? `${kind}s`);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/lib/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EACL,qBAAqB,EAErB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,GAAG,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAiB3D,SAAS,WAAW,CAAC,OAAe;IAClC,OAAO,EAAE,OAAO,EAAE,CAA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C,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAE3E,GAAG,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACzD,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC;KACnC,CAAC,CAAC,CAAC;IAEJ,GAAG,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,OAAO,EAAE,EAAE,CACvD,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CACjF,CAAC;IAEF,MAAM,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,oBAAoB,EAAE,CAAC,CAAC;AACrE,CAAC","sourcesContent":["import { Server } from '@modelcontextprotocol/sdk/server/index.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';\nimport {\n CallToolRequestSchema,\n type CallToolResult,\n ListToolsRequestSchema,\n} from '@modelcontextprotocol/sdk/types.js';\nimport { z } from 'zod';\nimport pkg from '../../package.json' with { type: 'json' };\nimport type { AnyOperation } from './operation.js';\n\nexport type ServerOptions<Client> = {\n /** MCP server name (the service, e.g. 'gmail'). */\n name: string;\n version?: string;\n /** Every operation this server exposes, keyed by wire name (tools and methods merged). */\n operations: Record<string, AnyOperation<Client>>;\n /** Build the authenticated client for the account this instance is bound to. */\n client: (account: string | undefined) => Promise<Client>;\n /** Optional consent flow, invoked by the `auth` subcommand. */\n runAuth?: (account: string | undefined) => Promise<void>;\n /** Transport to connect; defaults to stdio. Injectable for tests. */\n transport?: Transport;\n};\n\nfunction errorResult(message: string): CallToolResult {\n return { content: [{ type: 'text', text: `Error: ${message}` }], isError: true };\n}\n\n/**\n * Build the MCP `tools/list` payload from the operations: each one's input and\n * output JSON Schema, plus a destructive hint for irreversible ops. On the wire,\n * every operation is a \"tool\" (MCP has no other word). Pure; exported for tests.\n */\nexport function toolDefinitions<Client>(operations: Record<string, AnyOperation<Client>>) {\n return Object.entries(operations).map(([name, op]) => ({\n name,\n description: op.description,\n inputSchema: z.toJSONSchema(op.schema.input, { io: 'input' }) as Record<string, unknown>,\n outputSchema: z.toJSONSchema(op.schema.output, { io: 'output' }) as Record<string, unknown>,\n ...(op.destructive ? { annotations: { destructiveHint: true } } : {}),\n }));\n}\n\n/** A labeled set of operations for the capability table: its provenance + the ops. */\nexport type CapabilityGroup<Client> = {\n /** Provenance shown in the Source column, e.g. 'MCP Tool' or 'REST Method'. */\n kind: string;\n operations: Record<string, AnyOperation<Client>>;\n};\n\n/** Prose labels for the group kinds; the header sentence is built from these. */\nconst KIND_LABELS: Record<string, string> = {\n 'MCP Tool': 'MCP tools',\n 'REST Method': 'REST methods',\n};\n\n/**\n * Render the operations as a Markdown capability table (name, source, description,\n * and an irreversible marker), derived from the same registries the server\n * dispatches. The Source column makes the provenance explicit: a service is an\n * MCP-toolset wrapper and a REST wrapper (or REST only, where Google publishes\n * no toolset), because MCP's toolset alone cannot fully drive a service. A\n * static mirror; agents that speak MCP discover the live, fully-schema'd\n * surface via `tools/list`. Pure; a service regenerates its CAPABILITIES.md\n * from this (and a test pins the file to it) so the doc cannot drift from the code.\n */\nexport function renderCapabilities<Client>(\n title: string,\n groups: CapabilityGroup<Client>[],\n): string {\n const rows = groups.flatMap(({ kind, operations }) =>\n Object.entries(operations).map(\n ([name, op]) => `| \\`${name}\\`${op.destructive ? ' ⚠️' : ''} | ${kind} | ${op.description} |`,\n ),\n );\n // Derived from the groups actually passed in, so a methods-only service\n // (Sheets) does not claim an MCP toolset it does not have.\n const labels = groups.map(({ kind }) => KIND_LABELS[kind] ?? `${kind}s`);\n const sources = labels.length === 1 ? `, all ${labels[0]}` : ` across ${labels.join(' and ')}`;\n return `${[\n `# ${title}`,\n '',\n '<!-- Generated by `bun run capabilities`; do not edit by hand. -->',\n '',\n `${rows.length} operations${sources}. ⚠️ marks irreversible operations (MCP \\`destructiveHint\\`).`,\n '',\n '| Operation | Source | Description |',\n '| --- | --- | --- |',\n ...rows,\n ].join('\\n')}\\n`;\n}\n\n/**\n * Run one operation by name: resolve it, validate input against its schema, run\n * the handler, validate the output, and return both a structured result and a text\n * rendering (for clients that do not yet read `structuredContent`). All failure\n * paths return an `isError` result rather than throwing. Exported for tests.\n */\nexport async function callOperation<Client>(\n operations: Record<string, AnyOperation<Client>>,\n client: Client,\n name: string,\n rawArgs: unknown,\n): Promise<CallToolResult> {\n // Own-property guard: the registry is a plain object, so a bare `operations[name]`\n // would resolve inherited keys (`__proto__`, `toString`, ...) to truthy non-operations\n // and throw past the error envelope when an agent sends one as a tool name.\n const op = Object.hasOwn(operations, name) ? operations[name] : undefined;\n if (!op) {\n return errorResult(`Unknown tool: ${name}`);\n }\n\n const parsed = op.schema.input.safeParse(rawArgs ?? {});\n if (!parsed.success) {\n return errorResult(`Invalid arguments for ${name}: ${parsed.error.message}`);\n }\n\n try {\n // `parsed.data` was just validated against this op's input schema, so it is\n // the handler's real input shape. The `AnyOperation` boundary types the\n // handler's args as `never` (so any concrete Operation stays assignable; see\n // operation.ts), and `as never` is the only call form. The validation above\n // is what makes this safe: do not call the handler before parsing.\n const result = await op.handler(client, parsed.data as never);\n const validated = op.schema.output.parse(result);\n return {\n content: [{ type: 'text', text: JSON.stringify(validated, null, 2) }],\n structuredContent: validated,\n };\n } catch (error) {\n return errorResult(error instanceof Error ? error.message : String(error));\n }\n}\n\n/**\n * Turn a service's operations into a running stdio MCP server. Identical for every\n * service; only the bound `Client` type and the operations differ. Owns the\n * cross-cutting concerns: the `auth` subcommand, account binding, the `tools/list`\n * payload, dispatch, validation, and error wrapping.\n */\nexport async function server<Client>(options: ServerOptions<Client>): Promise<void> {\n const { name, version = pkg.version, operations, client, runAuth } = options;\n\n if (process.argv[2] === 'auth') {\n if (!runAuth) {\n console.error(`${name}: no auth flow configured.`);\n process.exit(1);\n }\n await runAuth(process.argv[3] ?? process.env['GOOGLE_MCP_ACCOUNT']);\n process.exit(0);\n }\n\n const authed = await client(process.env['GOOGLE_MCP_ACCOUNT']);\n const mcp = new Server({ name, version }, { capabilities: { tools: {} } });\n\n mcp.setRequestHandler(ListToolsRequestSchema, async () => ({\n tools: toolDefinitions(operations),\n }));\n\n mcp.setRequestHandler(CallToolRequestSchema, (request) =>\n callOperation(operations, authed, request.params.name, request.params.arguments),\n );\n\n await mcp.connect(options.transport ?? new StdioServerTransport());\n}\n"]}
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/lib/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EACL,qBAAqB,EAErB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,GAAG,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAiB3D,SAAS,WAAW,CAAC,OAAe;IAClC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACnF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAS,UAAgD;IACtF,OAAO,MAAM,C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EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAE3E,GAAG,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACzD,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC;KACnC,CAAC,CAAC,CAAC;IAEJ,GAAG,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,CAAC,OAAO,EAAE,EAAE,CACvD,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CACjF,CAAC;IAEF,MAAM,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,oBAAoB,EAAE,CAAC,CAAC;AACrE,CAAC","sourcesContent":["import { Server } from '@modelcontextprotocol/sdk/server/index.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';\nimport {\n CallToolRequestSchema,\n type CallToolResult,\n ListToolsRequestSchema,\n} from '@modelcontextprotocol/sdk/types.js';\nimport { z } from 'zod';\nimport pkg from '../../package.json' with { type: 'json' };\nimport type { AnyOperation } from './operation.js';\n\nexport type ServerOptions<Client> = {\n /** MCP server name (the service, e.g. 'gmail'). */\n name: string;\n version?: string;\n /** Every operation this server exposes, keyed by wire name (tools and methods merged). */\n operations: Record<string, AnyOperation<Client>>;\n /** Build the authenticated client for the account this instance is bound to. */\n client: (account: string | undefined) => Promise<Client>;\n /** Optional consent flow, invoked by the `auth` subcommand. */\n runAuth?: (account: string | undefined) => Promise<void>;\n /** Transport to connect; defaults to stdio. Injectable for tests. */\n transport?: Transport;\n};\n\nfunction errorResult(message: string): CallToolResult {\n return { content: [{ type: 'text', text: `Error: ${message}` }], isError: true };\n}\n\n/**\n * Build the MCP `tools/list` payload from the operations: each one's input and\n * output JSON Schema, plus a destructive hint for irreversible ops. On the wire,\n * every operation is a \"tool\" (MCP has no other word). Pure; exported for tests.\n */\nexport function toolDefinitions<Client>(operations: Record<string, AnyOperation<Client>>) {\n return Object.entries(operations).map(([name, op]) => ({\n name,\n description: op.description,\n inputSchema: z.toJSONSchema(op.schema.input, { io: 'input' }) as Record<string, unknown>,\n outputSchema: z.toJSONSchema(op.schema.output, { io: 'output' }) as Record<string, unknown>,\n annotations: op.annotations,\n }));\n}\n\n/** A labeled set of operations for the capability table: its provenance + the ops. */\nexport type CapabilityGroup<Client> = {\n /** Provenance shown in the Source column, e.g. 'MCP Tool' or 'REST Method'. */\n kind: string;\n operations: Record<string, AnyOperation<Client>>;\n};\n\n/** Prose labels for the group kinds; the header sentence is built from these. */\nconst KIND_LABELS: Record<string, string> = {\n 'MCP Tool': 'MCP tools',\n 'REST Method': 'REST methods',\n};\n\n/**\n * Render the operations as a Markdown capability table (name, source, description,\n * and an irreversible marker), derived from the same registries the server\n * dispatches. The Source column makes the provenance explicit: a service is an\n * MCP-toolset wrapper and a REST wrapper (or REST only, where Google publishes\n * no toolset), because MCP's toolset alone cannot fully drive a service. A\n * static mirror; agents that speak MCP discover the live, fully-schema'd\n * surface via `tools/list`. Pure; a service regenerates its CAPABILITIES.md\n * from this (and a test pins the file to it) so the doc cannot drift from the code.\n */\nexport function renderCapabilities<Client>(\n title: string,\n groups: CapabilityGroup<Client>[],\n): string {\n const rows = groups.flatMap(({ kind, operations }) =>\n Object.entries(operations).map(\n ([name, op]) =>\n `| \\`${name}\\`${op.annotations.destructiveHint ? ' ⚠️' : ''} | ${kind} | ${op.description} |`,\n ),\n );\n // Derived from the groups actually passed in, so a methods-only service\n // (Sheets) does not claim an MCP toolset it does not have.\n const labels = groups.map(({ kind }) => KIND_LABELS[kind] ?? `${kind}s`);\n const sources = labels.length === 1 ? `, all ${labels[0]}` : ` across ${labels.join(' and ')}`;\n return `${[\n `# ${title}`,\n '',\n '<!-- Generated by `bun run capabilities`; do not edit by hand. -->',\n '',\n `${rows.length} operations${sources}. ⚠️ marks irreversible operations (MCP \\`destructiveHint\\`).`,\n '',\n '| Operation | Source | Description |',\n '| --- | --- | --- |',\n ...rows,\n ].join('\\n')}\\n`;\n}\n\n/**\n * Run one operation by name: resolve it, validate input against its schema, run\n * the handler, validate the output, and return both a structured result and a text\n * rendering (for clients that do not yet read `structuredContent`). All failure\n * paths return an `isError` result rather than throwing. Exported for tests.\n */\nexport async function callOperation<Client>(\n operations: Record<string, AnyOperation<Client>>,\n client: Client,\n name: string,\n rawArgs: unknown,\n): Promise<CallToolResult> {\n // Own-property guard: the registry is a plain object, so a bare `operations[name]`\n // would resolve inherited keys (`__proto__`, `toString`, ...) to truthy non-operations\n // and throw past the error envelope when an agent sends one as a tool name.\n const op = Object.hasOwn(operations, name) ? operations[name] : undefined;\n if (!op) {\n return errorResult(`Unknown tool: ${name}`);\n }\n\n const parsed = op.schema.input.safeParse(rawArgs ?? {});\n if (!parsed.success) {\n return errorResult(`Invalid arguments for ${name}: ${parsed.error.message}`);\n }\n\n try {\n // `parsed.data` was just validated against this op's input schema, so it is\n // the handler's real input shape. The `AnyOperation` boundary types the\n // handler's args as `never` (so any concrete Operation stays assignable; see\n // operation.ts), and `as never` is the only call form. The validation above\n // is what makes this safe: do not call the handler before parsing.\n const result = await op.handler(client, parsed.data as never);\n const validated = op.schema.output.parse(result);\n return {\n content: [{ type: 'text', text: JSON.stringify(validated, null, 2) }],\n structuredContent: validated,\n };\n } catch (error) {\n return errorResult(error instanceof Error ? error.message : String(error));\n }\n}\n\n/**\n * Turn a service's operations into a running stdio MCP server. Identical for every\n * service; only the bound `Client` type and the operations differ. Owns the\n * cross-cutting concerns: the `auth` subcommand, account binding, the `tools/list`\n * payload, dispatch, validation, and error wrapping.\n */\nexport async function server<Client>(options: ServerOptions<Client>): Promise<void> {\n const { name, version = pkg.version, operations, client, runAuth } = options;\n\n if (process.argv[2] === 'auth') {\n if (!runAuth) {\n console.error(`${name}: no auth flow configured.`);\n process.exit(1);\n }\n await runAuth(process.argv[3] ?? process.env['GOOGLE_MCP_ACCOUNT']);\n process.exit(0);\n }\n\n const authed = await client(process.env['GOOGLE_MCP_ACCOUNT']);\n const mcp = new Server({ name, version }, { capabilities: { tools: {} } });\n\n mcp.setRequestHandler(ListToolsRequestSchema, async () => ({\n tools: toolDefinitions(operations),\n }));\n\n mcp.setRequestHandler(CallToolRequestSchema, (request) =>\n callOperation(operations, authed, request.params.name, request.params.arguments),\n );\n\n await mcp.connect(options.transport ?? new StdioServerTransport());\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/append_values/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAKxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/append_values/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAWxB,CAAC"}
@@ -9,6 +9,12 @@ import { schema } from './schema.js';
9
9
  */
10
10
  export const append_values = sheetsOperation({
11
11
  description: 'Append rows of values after the logical table found at a range; the range is searched for a table, and the data lands after its last row.',
12
+ annotations: {
13
+ readOnlyHint: false,
14
+ destructiveHint: false,
15
+ idempotentHint: false,
16
+ openWorldHint: false,
17
+ },
12
18
  schema,
13
19
  handler,
14
20
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/append_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;IAC3C,WAAW,EACT,2IAA2I;IAC7I,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/append\n *\n * The range is where the API searches for an existing table, not where the\n * data lands: values are appended to the first row after that table.\n */\nexport const append_values = sheetsOperation({\n description:\n 'Append rows of values after the logical table found at a range; the range is searched for a table, and the data lands after its last row.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/append_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;IAC3C,WAAW,EACT,2IAA2I;IAC7I,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/append\n *\n * The range is where the API searches for an existing table, not where the\n * data lands: values are appended to the first row after that table.\n */\nexport const append_values = sheetsOperation({\n description:\n 'Append rows of values after the logical table found at a range; the range is searched for a table, and the data lands after its last row.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;iCAM7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;iCAW7B,CAAC"}
@@ -9,8 +9,13 @@ import { schema } from './schema.js';
9
9
  */
10
10
  export const batch_clear_values = sheetsOperation({
11
11
  description: 'Clear the values in multiple ranges in one call, irreversibly; formatting and data validation are kept.',
12
+ annotations: {
13
+ readOnlyHint: false,
14
+ destructiveHint: true,
15
+ idempotentHint: true,
16
+ openWorldHint: false,
17
+ },
12
18
  schema,
13
19
  handler,
14
- destructive: true,
15
20
  });
16
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAChD,WAAW,EACT,yGAAyG;IAC3G,MAAM;IACN,OAAO;IACP,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClear\n *\n * Destructive: cleared values are unrecoverable through the API. Formatting,\n * data validation, and the cells themselves are kept; only values go.\n */\nexport const batch_clear_values = sheetsOperation({\n description:\n 'Clear the values in multiple ranges in one call, irreversibly; formatting and data validation are kept.',\n schema,\n handler,\n destructive: true,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAChD,WAAW,EACT,yGAAyG;IAC3G,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClear\n *\n * Destructive: cleared values are unrecoverable through the API. Formatting,\n * data validation, and the cells themselves are kept; only values go.\n */\nexport const batch_clear_values = sheetsOperation({\n description:\n 'Clear the values in multiple ranges in one call, irreversibly; formatting and data validation are kept.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values_by_data_filter/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAM5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values_by_data_filter/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW5C,CAAC"}
@@ -9,8 +9,13 @@ import { schema } from './schema.js';
9
9
  */
10
10
  export const batch_clear_values_by_data_filter = sheetsOperation({
11
11
  description: 'Clear the values in every range matched by data filters, irreversibly; formatting and data validation are kept.',
12
+ annotations: {
13
+ readOnlyHint: false,
14
+ destructiveHint: true,
15
+ idempotentHint: true,
16
+ openWorldHint: false,
17
+ },
12
18
  schema,
13
19
  handler,
14
- destructive: true,
15
20
  });
16
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values_by_data_filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,eAAe,CAAC;IAC/D,WAAW,EACT,iHAAiH;IACnH,MAAM;IACN,OAAO;IACP,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClearByDataFilter\n *\n * Destructive: cleared values are unrecoverable through the API. Formatting,\n * data validation, and the cells themselves are kept; only values go.\n */\nexport const batch_clear_values_by_data_filter = sheetsOperation({\n description:\n 'Clear the values in every range matched by data filters, irreversibly; formatting and data validation are kept.',\n schema,\n handler,\n destructive: true,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_clear_values_by_data_filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,eAAe,CAAC;IAC/D,WAAW,EACT,iHAAiH;IACnH,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClearByDataFilter\n *\n * Destructive: cleared values are unrecoverable through the API. Formatting,\n * data validation, and the cells themselves are kept; only values go.\n */\nexport const batch_clear_values_by_data_filter = sheetsOperation({\n description:\n 'Clear the values in every range matched by data filters, irreversibly; formatting and data validation are kept.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values/index.ts"],"names":[],"mappings":"AAIA,gHAAgH;AAChH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;iCAK3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values/index.ts"],"names":[],"mappings":"AAIA,gHAAgH;AAChH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW3B,CAAC"}
@@ -4,6 +4,12 @@ import { schema } from './schema.js';
4
4
  /** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGet */
5
5
  export const batch_get_values = sheetsOperation({
6
6
  description: 'Read multiple ranges of values from a spreadsheet in one call; results come back in request order.',
7
+ annotations: {
8
+ readOnlyHint: true,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ },
7
13
  schema,
8
14
  handler,
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,gHAAgH;AAChH,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC9C,WAAW,EACT,oGAAoG;IACtG,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGet */\nexport const batch_get_values = sheetsOperation({\n description:\n 'Read multiple ranges of values from a spreadsheet in one call; results come back in request order.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,gHAAgH;AAChH,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAC9C,WAAW,EACT,oGAAoG;IACtG,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGet */\nexport const batch_get_values = sheetsOperation({\n description:\n 'Read multiple ranges of values from a spreadsheet in one call; results come back in request order.',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values_by_data_filter/index.ts"],"names":[],"mappings":"AAIA,4HAA4H;AAC5H,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAK1C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values_by_data_filter/index.ts"],"names":[],"mappings":"AAIA,4HAA4H;AAC5H,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW1C,CAAC"}
@@ -4,6 +4,12 @@ import { schema } from './schema.js';
4
4
  /** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter */
5
5
  export const batch_get_values_by_data_filter = sheetsOperation({
6
6
  description: 'Read the ranges of values matched by data filters (A1 ranges, grid ranges, or developer-metadata lookups), with the filters that matched each range.',
7
+ annotations: {
8
+ readOnlyHint: true,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ },
7
13
  schema,
8
14
  handler,
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values_by_data_filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,4HAA4H;AAC5H,MAAM,CAAC,MAAM,+BAA+B,GAAG,eAAe,CAAC;IAC7D,WAAW,EACT,sJAAsJ;IACxJ,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter */\nexport const batch_get_values_by_data_filter = sheetsOperation({\n description:\n 'Read the ranges of values matched by data filters (A1 ranges, grid ranges, or developer-metadata lookups), with the filters that matched each range.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_get_values_by_data_filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,4HAA4H;AAC5H,MAAM,CAAC,MAAM,+BAA+B,GAAG,eAAe,CAAC;IAC7D,WAAW,EACT,sJAAsJ;IACxJ,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter */\nexport const batch_get_values_by_data_filter = sheetsOperation({\n description:\n 'Read the ranges of values matched by data filters (A1 ranges, grid ranges, or developer-metadata lookups), with the filters that matched each range.',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values/index.ts"],"names":[],"mappings":"AAIA,mHAAmH;AACnH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAK9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values/index.ts"],"names":[],"mappings":"AAIA,mHAAmH;AACnH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW9B,CAAC"}
@@ -4,6 +4,12 @@ import { schema } from './schema.js';
4
4
  /** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate */
5
5
  export const batch_update_values = sheetsOperation({
6
6
  description: 'Write values into multiple ranges of a spreadsheet in one call; one ValueRange per target range.',
7
+ annotations: {
8
+ readOnlyHint: false,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ },
7
13
  schema,
8
14
  handler,
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,mHAAmH;AACnH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,WAAW,EACT,kGAAkG;IACpG,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate */\nexport const batch_update_values = sheetsOperation({\n description:\n 'Write values into multiple ranges of a spreadsheet in one call; one ValueRange per target range.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,mHAAmH;AACnH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,WAAW,EACT,kGAAkG;IACpG,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate */\nexport const batch_update_values = sheetsOperation({\n description:\n 'Write values into multiple ranges of a spreadsheet in one call; one ValueRange per target range.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values_by_data_filter/index.ts"],"names":[],"mappings":"AAIA,+HAA+H;AAC/H,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAK7C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values_by_data_filter/index.ts"],"names":[],"mappings":"AAIA,+HAA+H;AAC/H,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW7C,CAAC"}
@@ -4,6 +4,12 @@ import { schema } from './schema.js';
4
4
  /** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter */
5
5
  export const batch_update_values_by_data_filter = sheetsOperation({
6
6
  description: 'Write values into the ranges matched by data filters; when a filter matches multiple ranges, the values apply to all of them.',
7
+ annotations: {
8
+ readOnlyHint: false,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ },
7
13
  schema,
8
14
  handler,
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values_by_data_filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,+HAA+H;AAC/H,MAAM,CAAC,MAAM,kCAAkC,GAAG,eAAe,CAAC;IAChE,WAAW,EACT,+HAA+H;IACjI,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter */\nexport const batch_update_values_by_data_filter = sheetsOperation({\n description:\n 'Write values into the ranges matched by data filters; when a filter matches multiple ranges, the values apply to all of them.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/batch_update_values_by_data_filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,+HAA+H;AAC/H,MAAM,CAAC,MAAM,kCAAkC,GAAG,eAAe,CAAC;IAChE,WAAW,EACT,+HAA+H;IACjI,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter */\nexport const batch_update_values_by_data_filter = sheetsOperation({\n description:\n 'Write values into the ranges matched by data filters; when a filter matches multiple ranges, the values apply to all of them.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/clear_values/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;iCAMvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/clear_values/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;iCAWvB,CAAC"}
@@ -9,8 +9,13 @@ import { schema } from './schema.js';
9
9
  */
10
10
  export const clear_values = sheetsOperation({
11
11
  description: 'Clear the values in a range, irreversibly; formatting and data validation are kept.',
12
+ annotations: {
13
+ readOnlyHint: false,
14
+ destructiveHint: true,
15
+ idempotentHint: true,
16
+ openWorldHint: false,
17
+ },
12
18
  schema,
13
19
  handler,
14
- destructive: true,
15
20
  });
16
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/clear_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;IAC1C,WAAW,EACT,qFAAqF;IACvF,MAAM;IACN,OAAO;IACP,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/clear\n *\n * Destructive: cleared values are unrecoverable through the API. Formatting,\n * data validation, and the cells themselves are kept; only values go.\n */\nexport const clear_values = sheetsOperation({\n description:\n 'Clear the values in a range, irreversibly; formatting and data validation are kept.',\n schema,\n handler,\n destructive: true,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/clear_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC;IAC1C,WAAW,EACT,qFAAqF;IACvF,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/clear\n *\n * Destructive: cleared values are unrecoverable through the API. Formatting,\n * data validation, and the cells themselves are kept; only values go.\n */\nexport const clear_values = sheetsOperation({\n description:\n 'Clear the values in a range, irreversibly; formatting and data validation are kept.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/copy_sheet/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;iCAKrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/copy_sheet/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;iCAWrB,CAAC"}
@@ -9,6 +9,12 @@ import { schema } from './schema.js';
9
9
  */
10
10
  export const copy_sheet = sheetsOperation({
11
11
  description: 'Copy a single sheet (tab) from a spreadsheet to another spreadsheet (or the same one); returns the properties of the new sheet.',
12
+ annotations: {
13
+ readOnlyHint: false,
14
+ destructiveHint: false,
15
+ idempotentHint: false,
16
+ openWorldHint: false,
17
+ },
12
18
  schema,
13
19
  handler,
14
20
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/copy_sheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,WAAW,EACT,iIAAiI;IACnI,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo\n *\n * Returns the properties of the newly created sheet; in the destination its\n * title arrives as \"Copy of <source title>\".\n */\nexport const copy_sheet = sheetsOperation({\n description:\n 'Copy a single sheet (tab) from a spreadsheet to another spreadsheet (or the same one); returns the properties of the new sheet.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/copy_sheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,WAAW,EACT,iIAAiI;IACnI,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo\n *\n * Returns the properties of the newly created sheet; in the destination its\n * title arrives as \"Copy of <source title>\".\n */\nexport const copy_sheet = sheetsOperation({\n description:\n 'Copy a single sheet (tab) from a spreadsheet to another spreadsheet (or the same one); returns the properties of the new sheet.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/create_spreadsheet/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAK7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/create_spreadsheet/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW7B,CAAC"}
@@ -10,6 +10,12 @@ import { schema } from './schema.js';
10
10
  */
11
11
  export const create_spreadsheet = sheetsOperation({
12
12
  description: 'Create a spreadsheet with a title and optionally named sheets (tabs); returns the new spreadsheet and its id.',
13
+ annotations: {
14
+ readOnlyHint: false,
15
+ destructiveHint: false,
16
+ idempotentHint: false,
17
+ openWorldHint: false,
18
+ },
13
19
  schema,
14
20
  handler,
15
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/create_spreadsheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAChD,WAAW,EACT,+GAA+G;IACjH,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/create\n *\n * The new spreadsheet lands in the account's Drive root. The Sheets API has no\n * delete: removing a spreadsheet is Drive's `files.delete`, outside this\n * server's surface.\n */\nexport const create_spreadsheet = sheetsOperation({\n description:\n 'Create a spreadsheet with a title and optionally named sheets (tabs); returns the new spreadsheet and its id.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/create_spreadsheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAChD,WAAW,EACT,+GAA+G;IACjH,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,KAAK;QACrB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/create\n *\n * The new spreadsheet lands in the account's Drive root. The Sheets API has no\n * delete: removing a spreadsheet is Drive's `files.delete`, outside this\n * server's surface.\n */\nexport const create_spreadsheet = sheetsOperation({\n description:\n 'Create a spreadsheet with a title and optionally named sheets (tabs); returns the new spreadsheet and its id.',\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/get_developer_metadata/index.ts"],"names":[],"mappings":"AAIA,sHAAsH;AACtH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAIjC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/get_developer_metadata/index.ts"],"names":[],"mappings":"AAIA,sHAAsH;AACtH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAUjC,CAAC"}
@@ -4,6 +4,12 @@ import { schema } from './schema.js';
4
4
  /** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata/get */
5
5
  export const get_developer_metadata = sheetsOperation({
6
6
  description: 'Get one developer metadata entry by its spreadsheet-scoped id.',
7
+ annotations: {
8
+ readOnlyHint: true,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ },
7
13
  schema,
8
14
  handler,
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/get_developer_metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,sHAAsH;AACtH,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC;IACpD,WAAW,EAAE,gEAAgE;IAC7E,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata/get */\nexport const get_developer_metadata = sheetsOperation({\n description: 'Get one developer metadata entry by its spreadsheet-scoped id.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/get_developer_metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,sHAAsH;AACtH,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC;IACpD,WAAW,EAAE,gEAAgE;IAC7E,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata/get */\nexport const get_developer_metadata = sheetsOperation({\n description: 'Get one developer metadata entry by its spreadsheet-scoped id.',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/get_spreadsheet/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAK1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/get_spreadsheet/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAW1B,CAAC"}
@@ -11,6 +11,12 @@ import { schema } from './schema.js';
11
11
  */
12
12
  export const get_spreadsheet = sheetsOperation({
13
13
  description: 'Get a spreadsheet by id: its properties (title, locale, time zone) and the properties of every sheet (tab). Cell data is read with the values operations.',
14
+ annotations: {
15
+ readOnlyHint: true,
16
+ destructiveHint: false,
17
+ idempotentHint: true,
18
+ openWorldHint: false,
19
+ },
14
20
  schema,
15
21
  handler,
16
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/get_spreadsheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC7C,WAAW,EACT,2JAA2J;IAC7J,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/get\n *\n * Metadata only by design: the projection carries identity, spreadsheet\n * properties, and per-sheet properties; grid data (per-cell formatting,\n * validation, notes) is not exposed (issue #28). Cell contents are read with\n * the values operations.\n */\nexport const get_spreadsheet = sheetsOperation({\n description:\n 'Get a spreadsheet by id: its properties (title, locale, time zone) and the properties of every sheet (tab). Cell data is read with the values operations.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/get_spreadsheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC7C,WAAW,EACT,2JAA2J;IAC7J,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/**\n * Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/get\n *\n * Metadata only by design: the projection carries identity, spreadsheet\n * properties, and per-sheet properties; grid data (per-cell formatting,\n * validation, notes) is not exposed (issue #28). Cell contents are read with\n * the values operations.\n */\nexport const get_spreadsheet = sheetsOperation({\n description:\n 'Get a spreadsheet by id: its properties (title, locale, time zone) and the properties of every sheet (tab). Cell data is read with the values operations.',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/get_values/index.ts"],"names":[],"mappings":"AAIA,2GAA2G;AAC3G,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;iCAIrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sheets/methods/get_values/index.ts"],"names":[],"mappings":"AAIA,2GAA2G;AAC3G,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;iCAUrB,CAAC"}
@@ -4,6 +4,12 @@ import { schema } from './schema.js';
4
4
  /** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get */
5
5
  export const get_values = sheetsOperation({
6
6
  description: 'Read a range of values from a spreadsheet as a 2D array, addressed in A1 notation.',
7
+ annotations: {
8
+ readOnlyHint: true,
9
+ destructiveHint: false,
10
+ idempotentHint: true,
11
+ openWorldHint: false,
12
+ },
7
13
  schema,
8
14
  handler,
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/get_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,2GAA2G;AAC3G,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,WAAW,EAAE,oFAAoF;IACjG,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get */\nexport const get_values = sheetsOperation({\n description: 'Read a range of values from a spreadsheet as a 2D array, addressed in A1 notation.',\n schema,\n handler,\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sheets/methods/get_values/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,2GAA2G;AAC3G,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,WAAW,EAAE,oFAAoF;IACjG,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,MAAM;IACN,OAAO;CACR,CAAC,CAAC","sourcesContent":["import { sheetsOperation } from '../../operation.js';\nimport { handler } from './handler.js';\nimport { schema } from './schema.js';\n\n/** Source: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get */\nexport const get_values = sheetsOperation({\n description: 'Read a range of values from a spreadsheet as a 2D array, addressed in A1 notation.',\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n schema,\n handler,\n});\n"]}