@mindstone/mcp-server-google-workspace 0.1.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 (514) hide show
  1. package/LICENSE +97 -0
  2. package/README.md +71 -0
  3. package/SECURITY.md +38 -0
  4. package/dist/__fixtures__/accounts.d.ts +47 -0
  5. package/dist/__fixtures__/accounts.d.ts.map +1 -0
  6. package/dist/__fixtures__/accounts.js +56 -0
  7. package/dist/__fixtures__/accounts.js.map +1 -0
  8. package/dist/api/handler.d.ts +16 -0
  9. package/dist/api/handler.d.ts.map +1 -0
  10. package/dist/api/handler.js +68 -0
  11. package/dist/api/handler.js.map +1 -0
  12. package/dist/api/request.d.ts +13 -0
  13. package/dist/api/request.d.ts.map +1 -0
  14. package/dist/api/request.js +111 -0
  15. package/dist/api/request.js.map +1 -0
  16. package/dist/api/validators/endpoint.d.ts +8 -0
  17. package/dist/api/validators/endpoint.d.ts.map +1 -0
  18. package/dist/api/validators/endpoint.js +115 -0
  19. package/dist/api/validators/endpoint.js.map +1 -0
  20. package/dist/api/validators/parameter.d.ts +12 -0
  21. package/dist/api/validators/parameter.d.ts.map +1 -0
  22. package/dist/api/validators/parameter.js +155 -0
  23. package/dist/api/validators/parameter.js.map +1 -0
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +28 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/modules/accounts/index.d.ts +12 -0
  29. package/dist/modules/accounts/index.d.ts.map +1 -0
  30. package/dist/modules/accounts/index.js +41 -0
  31. package/dist/modules/accounts/index.js.map +1 -0
  32. package/dist/modules/accounts/manager.d.ts +40 -0
  33. package/dist/modules/accounts/manager.d.ts.map +1 -0
  34. package/dist/modules/accounts/manager.js +359 -0
  35. package/dist/modules/accounts/manager.js.map +1 -0
  36. package/dist/modules/accounts/oauth.d.ts +36 -0
  37. package/dist/modules/accounts/oauth.d.ts.map +1 -0
  38. package/dist/modules/accounts/oauth.js +112 -0
  39. package/dist/modules/accounts/oauth.js.map +1 -0
  40. package/dist/modules/accounts/token.d.ts +32 -0
  41. package/dist/modules/accounts/token.d.ts.map +1 -0
  42. package/dist/modules/accounts/token.js +305 -0
  43. package/dist/modules/accounts/token.js.map +1 -0
  44. package/dist/modules/accounts/types.d.ts +47 -0
  45. package/dist/modules/accounts/types.d.ts.map +1 -0
  46. package/dist/modules/accounts/types.js +16 -0
  47. package/dist/modules/accounts/types.js.map +1 -0
  48. package/dist/modules/accounts/unauthorized.d.ts +3 -0
  49. package/dist/modules/accounts/unauthorized.d.ts.map +1 -0
  50. package/dist/modules/accounts/unauthorized.js +44 -0
  51. package/dist/modules/accounts/unauthorized.js.map +1 -0
  52. package/dist/modules/attachments/cleanup-service.d.ts +44 -0
  53. package/dist/modules/attachments/cleanup-service.d.ts.map +1 -0
  54. package/dist/modules/attachments/cleanup-service.js +118 -0
  55. package/dist/modules/attachments/cleanup-service.js.map +1 -0
  56. package/dist/modules/attachments/index-service.d.ts +57 -0
  57. package/dist/modules/attachments/index-service.d.ts.map +1 -0
  58. package/dist/modules/attachments/index-service.js +110 -0
  59. package/dist/modules/attachments/index-service.js.map +1 -0
  60. package/dist/modules/attachments/response-transformer.d.ts +28 -0
  61. package/dist/modules/attachments/response-transformer.d.ts.map +1 -0
  62. package/dist/modules/attachments/response-transformer.js +64 -0
  63. package/dist/modules/attachments/response-transformer.js.map +1 -0
  64. package/dist/modules/attachments/service.d.ts +47 -0
  65. package/dist/modules/attachments/service.d.ts.map +1 -0
  66. package/dist/modules/attachments/service.js +362 -0
  67. package/dist/modules/attachments/service.js.map +1 -0
  68. package/dist/modules/attachments/transformer.d.ts +28 -0
  69. package/dist/modules/attachments/transformer.d.ts.map +1 -0
  70. package/dist/modules/attachments/transformer.js +31 -0
  71. package/dist/modules/attachments/transformer.js.map +1 -0
  72. package/dist/modules/attachments/types.d.ts +33 -0
  73. package/dist/modules/attachments/types.d.ts.map +1 -0
  74. package/dist/modules/attachments/types.js +9 -0
  75. package/dist/modules/attachments/types.js.map +1 -0
  76. package/dist/modules/calendar/index.d.ts +48 -0
  77. package/dist/modules/calendar/index.d.ts.map +1 -0
  78. package/dist/modules/calendar/index.js +61 -0
  79. package/dist/modules/calendar/index.js.map +1 -0
  80. package/dist/modules/calendar/scopes.d.ts +17 -0
  81. package/dist/modules/calendar/scopes.d.ts.map +1 -0
  82. package/dist/modules/calendar/scopes.js +39 -0
  83. package/dist/modules/calendar/scopes.js.map +1 -0
  84. package/dist/modules/calendar/service.d.ts +75 -0
  85. package/dist/modules/calendar/service.d.ts.map +1 -0
  86. package/dist/modules/calendar/service.js +705 -0
  87. package/dist/modules/calendar/service.js.map +1 -0
  88. package/dist/modules/calendar/types.d.ts +154 -0
  89. package/dist/modules/calendar/types.d.ts.map +1 -0
  90. package/dist/modules/calendar/types.js +11 -0
  91. package/dist/modules/calendar/types.js.map +1 -0
  92. package/dist/modules/comments/index.d.ts +12 -0
  93. package/dist/modules/comments/index.d.ts.map +1 -0
  94. package/dist/modules/comments/index.js +23 -0
  95. package/dist/modules/comments/index.js.map +1 -0
  96. package/dist/modules/comments/service.d.ts +39 -0
  97. package/dist/modules/comments/service.d.ts.map +1 -0
  98. package/dist/modules/comments/service.js +227 -0
  99. package/dist/modules/comments/service.js.map +1 -0
  100. package/dist/modules/comments/types.d.ts +67 -0
  101. package/dist/modules/comments/types.d.ts.map +1 -0
  102. package/dist/modules/comments/types.js +2 -0
  103. package/dist/modules/comments/types.js.map +1 -0
  104. package/dist/modules/contacts/index.d.ts +12 -0
  105. package/dist/modules/contacts/index.d.ts.map +1 -0
  106. package/dist/modules/contacts/index.js +18 -0
  107. package/dist/modules/contacts/index.js.map +1 -0
  108. package/dist/modules/contacts/scopes.d.ts +4 -0
  109. package/dist/modules/contacts/scopes.d.ts.map +1 -0
  110. package/dist/modules/contacts/scopes.js +11 -0
  111. package/dist/modules/contacts/scopes.js.map +1 -0
  112. package/dist/modules/contacts/types.d.ts +55 -0
  113. package/dist/modules/contacts/types.d.ts.map +1 -0
  114. package/dist/modules/contacts/types.js +14 -0
  115. package/dist/modules/contacts/types.js.map +1 -0
  116. package/dist/modules/docs/formatters.d.ts +30 -0
  117. package/dist/modules/docs/formatters.d.ts.map +1 -0
  118. package/dist/modules/docs/formatters.js +76 -0
  119. package/dist/modules/docs/formatters.js.map +1 -0
  120. package/dist/modules/docs/index.d.ts +9 -0
  121. package/dist/modules/docs/index.d.ts.map +1 -0
  122. package/dist/modules/docs/index.js +23 -0
  123. package/dist/modules/docs/index.js.map +1 -0
  124. package/dist/modules/docs/scopes.d.ts +17 -0
  125. package/dist/modules/docs/scopes.d.ts.map +1 -0
  126. package/dist/modules/docs/scopes.js +39 -0
  127. package/dist/modules/docs/scopes.js.map +1 -0
  128. package/dist/modules/docs/service.d.ts +58 -0
  129. package/dist/modules/docs/service.d.ts.map +1 -0
  130. package/dist/modules/docs/service.js +421 -0
  131. package/dist/modules/docs/service.js.map +1 -0
  132. package/dist/modules/docs/types.d.ts +75 -0
  133. package/dist/modules/docs/types.d.ts.map +1 -0
  134. package/dist/modules/docs/types.js +2 -0
  135. package/dist/modules/docs/types.js.map +1 -0
  136. package/dist/modules/drive/index.d.ts +9 -0
  137. package/dist/modules/drive/index.d.ts.map +1 -0
  138. package/dist/modules/drive/index.js +28 -0
  139. package/dist/modules/drive/index.js.map +1 -0
  140. package/dist/modules/drive/scopes.d.ts +19 -0
  141. package/dist/modules/drive/scopes.d.ts.map +1 -0
  142. package/dist/modules/drive/scopes.js +44 -0
  143. package/dist/modules/drive/scopes.js.map +1 -0
  144. package/dist/modules/drive/service.d.ts +33 -0
  145. package/dist/modules/drive/service.d.ts.map +1 -0
  146. package/dist/modules/drive/service.js +467 -0
  147. package/dist/modules/drive/service.js.map +1 -0
  148. package/dist/modules/drive/types.d.ts +55 -0
  149. package/dist/modules/drive/types.d.ts.map +1 -0
  150. package/dist/modules/drive/types.js +2 -0
  151. package/dist/modules/drive/types.js.map +1 -0
  152. package/dist/modules/forms/index.d.ts +13 -0
  153. package/dist/modules/forms/index.d.ts.map +1 -0
  154. package/dist/modules/forms/index.js +24 -0
  155. package/dist/modules/forms/index.js.map +1 -0
  156. package/dist/modules/forms/scopes.d.ts +21 -0
  157. package/dist/modules/forms/scopes.d.ts.map +1 -0
  158. package/dist/modules/forms/scopes.js +36 -0
  159. package/dist/modules/forms/scopes.js.map +1 -0
  160. package/dist/modules/forms/service.d.ts +52 -0
  161. package/dist/modules/forms/service.d.ts.map +1 -0
  162. package/dist/modules/forms/service.js +284 -0
  163. package/dist/modules/forms/service.js.map +1 -0
  164. package/dist/modules/forms/types.d.ts +399 -0
  165. package/dist/modules/forms/types.d.ts.map +1 -0
  166. package/dist/modules/forms/types.js +6 -0
  167. package/dist/modules/forms/types.js.map +1 -0
  168. package/dist/modules/gmail/constants.d.ts +69 -0
  169. package/dist/modules/gmail/constants.d.ts.map +1 -0
  170. package/dist/modules/gmail/constants.js +100 -0
  171. package/dist/modules/gmail/constants.js.map +1 -0
  172. package/dist/modules/gmail/index.d.ts +7 -0
  173. package/dist/modules/gmail/index.d.ts.map +1 -0
  174. package/dist/modules/gmail/index.js +16 -0
  175. package/dist/modules/gmail/index.js.map +1 -0
  176. package/dist/modules/gmail/scopes.d.ts +17 -0
  177. package/dist/modules/gmail/scopes.d.ts.map +1 -0
  178. package/dist/modules/gmail/scopes.js +39 -0
  179. package/dist/modules/gmail/scopes.js.map +1 -0
  180. package/dist/modules/gmail/service.d.ts +2 -0
  181. package/dist/modules/gmail/service.d.ts.map +1 -0
  182. package/dist/modules/gmail/service.js +2 -0
  183. package/dist/modules/gmail/service.js.map +1 -0
  184. package/dist/modules/gmail/services/attachment.d.ts +41 -0
  185. package/dist/modules/gmail/services/attachment.d.ts.map +1 -0
  186. package/dist/modules/gmail/services/attachment.js +143 -0
  187. package/dist/modules/gmail/services/attachment.js.map +1 -0
  188. package/dist/modules/gmail/services/base.d.ts +79 -0
  189. package/dist/modules/gmail/services/base.d.ts.map +1 -0
  190. package/dist/modules/gmail/services/base.js +124 -0
  191. package/dist/modules/gmail/services/base.js.map +1 -0
  192. package/dist/modules/gmail/services/draft.d.ts +104 -0
  193. package/dist/modules/gmail/services/draft.d.ts.map +1 -0
  194. package/dist/modules/gmail/services/draft.js +239 -0
  195. package/dist/modules/gmail/services/draft.js.map +1 -0
  196. package/dist/modules/gmail/services/email.d.ts +82 -0
  197. package/dist/modules/gmail/services/email.d.ts.map +1 -0
  198. package/dist/modules/gmail/services/email.js +462 -0
  199. package/dist/modules/gmail/services/email.js.map +1 -0
  200. package/dist/modules/gmail/services/label.d.ts +62 -0
  201. package/dist/modules/gmail/services/label.d.ts.map +1 -0
  202. package/dist/modules/gmail/services/label.js +501 -0
  203. package/dist/modules/gmail/services/label.js.map +1 -0
  204. package/dist/modules/gmail/services/mime-builder.d.ts +26 -0
  205. package/dist/modules/gmail/services/mime-builder.d.ts.map +1 -0
  206. package/dist/modules/gmail/services/mime-builder.js +83 -0
  207. package/dist/modules/gmail/services/mime-builder.js.map +1 -0
  208. package/dist/modules/gmail/services/search.d.ts +8 -0
  209. package/dist/modules/gmail/services/search.d.ts.map +1 -0
  210. package/dist/modules/gmail/services/search.js +76 -0
  211. package/dist/modules/gmail/services/search.js.map +1 -0
  212. package/dist/modules/gmail/services/settings.d.ts +14 -0
  213. package/dist/modules/gmail/services/settings.d.ts.map +1 -0
  214. package/dist/modules/gmail/services/settings.js +104 -0
  215. package/dist/modules/gmail/services/settings.js.map +1 -0
  216. package/dist/modules/gmail/types.d.ts +279 -0
  217. package/dist/modules/gmail/types.d.ts.map +1 -0
  218. package/dist/modules/gmail/types.js +11 -0
  219. package/dist/modules/gmail/types.js.map +1 -0
  220. package/dist/modules/sheets/a1Utils.d.ts +20 -0
  221. package/dist/modules/sheets/a1Utils.d.ts.map +1 -0
  222. package/dist/modules/sheets/a1Utils.js +252 -0
  223. package/dist/modules/sheets/a1Utils.js.map +1 -0
  224. package/dist/modules/sheets/cellShape.d.ts +48 -0
  225. package/dist/modules/sheets/cellShape.d.ts.map +1 -0
  226. package/dist/modules/sheets/cellShape.js +418 -0
  227. package/dist/modules/sheets/cellShape.js.map +1 -0
  228. package/dist/modules/sheets/errorRewriter.d.ts +6 -0
  229. package/dist/modules/sheets/errorRewriter.d.ts.map +1 -0
  230. package/dist/modules/sheets/errorRewriter.js +120 -0
  231. package/dist/modules/sheets/errorRewriter.js.map +1 -0
  232. package/dist/modules/sheets/formatters.d.ts +54 -0
  233. package/dist/modules/sheets/formatters.d.ts.map +1 -0
  234. package/dist/modules/sheets/formatters.js +270 -0
  235. package/dist/modules/sheets/formatters.js.map +1 -0
  236. package/dist/modules/sheets/index.d.ts +9 -0
  237. package/dist/modules/sheets/index.d.ts.map +1 -0
  238. package/dist/modules/sheets/index.js +23 -0
  239. package/dist/modules/sheets/index.js.map +1 -0
  240. package/dist/modules/sheets/scopes.d.ts +17 -0
  241. package/dist/modules/sheets/scopes.d.ts.map +1 -0
  242. package/dist/modules/sheets/scopes.js +39 -0
  243. package/dist/modules/sheets/scopes.js.map +1 -0
  244. package/dist/modules/sheets/service.d.ts +102 -0
  245. package/dist/modules/sheets/service.d.ts.map +1 -0
  246. package/dist/modules/sheets/service.js +1650 -0
  247. package/dist/modules/sheets/service.js.map +1 -0
  248. package/dist/modules/sheets/types.d.ts +271 -0
  249. package/dist/modules/sheets/types.d.ts.map +1 -0
  250. package/dist/modules/sheets/types.js +2 -0
  251. package/dist/modules/sheets/types.js.map +1 -0
  252. package/dist/modules/sheets/writeGuards.d.ts +31 -0
  253. package/dist/modules/sheets/writeGuards.d.ts.map +1 -0
  254. package/dist/modules/sheets/writeGuards.js +254 -0
  255. package/dist/modules/sheets/writeGuards.js.map +1 -0
  256. package/dist/modules/slides/formatters.d.ts +35 -0
  257. package/dist/modules/slides/formatters.d.ts.map +1 -0
  258. package/dist/modules/slides/formatters.js +96 -0
  259. package/dist/modules/slides/formatters.js.map +1 -0
  260. package/dist/modules/slides/index.d.ts +9 -0
  261. package/dist/modules/slides/index.d.ts.map +1 -0
  262. package/dist/modules/slides/index.js +23 -0
  263. package/dist/modules/slides/index.js.map +1 -0
  264. package/dist/modules/slides/scopes.d.ts +17 -0
  265. package/dist/modules/slides/scopes.d.ts.map +1 -0
  266. package/dist/modules/slides/scopes.js +39 -0
  267. package/dist/modules/slides/scopes.js.map +1 -0
  268. package/dist/modules/slides/service.d.ts +67 -0
  269. package/dist/modules/slides/service.d.ts.map +1 -0
  270. package/dist/modules/slides/service.js +394 -0
  271. package/dist/modules/slides/service.js.map +1 -0
  272. package/dist/modules/slides/types.d.ts +63 -0
  273. package/dist/modules/slides/types.d.ts.map +1 -0
  274. package/dist/modules/slides/types.js +2 -0
  275. package/dist/modules/slides/types.js.map +1 -0
  276. package/dist/modules/tasks/index.d.ts +13 -0
  277. package/dist/modules/tasks/index.d.ts.map +1 -0
  278. package/dist/modules/tasks/index.js +24 -0
  279. package/dist/modules/tasks/index.js.map +1 -0
  280. package/dist/modules/tasks/scopes.d.ts +18 -0
  281. package/dist/modules/tasks/scopes.d.ts.map +1 -0
  282. package/dist/modules/tasks/scopes.js +28 -0
  283. package/dist/modules/tasks/scopes.js.map +1 -0
  284. package/dist/modules/tasks/service.d.ts +72 -0
  285. package/dist/modules/tasks/service.d.ts.map +1 -0
  286. package/dist/modules/tasks/service.js +319 -0
  287. package/dist/modules/tasks/service.js.map +1 -0
  288. package/dist/modules/tasks/types.d.ts +118 -0
  289. package/dist/modules/tasks/types.d.ts.map +1 -0
  290. package/dist/modules/tasks/types.js +6 -0
  291. package/dist/modules/tasks/types.js.map +1 -0
  292. package/dist/modules/tools/registry.d.ts +28 -0
  293. package/dist/modules/tools/registry.d.ts.map +1 -0
  294. package/dist/modules/tools/registry.js +229 -0
  295. package/dist/modules/tools/registry.js.map +1 -0
  296. package/dist/modules/tools/scope-registry.d.ts +31 -0
  297. package/dist/modules/tools/scope-registry.d.ts.map +1 -0
  298. package/dist/modules/tools/scope-registry.js +52 -0
  299. package/dist/modules/tools/scope-registry.js.map +1 -0
  300. package/dist/oauth/client.d.ts +15 -0
  301. package/dist/oauth/client.d.ts.map +1 -0
  302. package/dist/oauth/client.js +136 -0
  303. package/dist/oauth/client.js.map +1 -0
  304. package/dist/resources/compose-email-template.d.ts +2 -0
  305. package/dist/resources/compose-email-template.d.ts.map +1 -0
  306. package/dist/resources/compose-email-template.js +711 -0
  307. package/dist/resources/compose-email-template.js.map +1 -0
  308. package/dist/scripts/health-check.d.ts +3 -0
  309. package/dist/scripts/health-check.d.ts.map +1 -0
  310. package/dist/scripts/health-check.js +22 -0
  311. package/dist/scripts/health-check.js.map +1 -0
  312. package/dist/scripts/setup-environment.d.ts +3 -0
  313. package/dist/scripts/setup-environment.d.ts.map +1 -0
  314. package/dist/scripts/setup-environment.js +91 -0
  315. package/dist/scripts/setup-environment.js.map +1 -0
  316. package/dist/scripts/setup-google-env.d.ts +3 -0
  317. package/dist/scripts/setup-google-env.d.ts.map +1 -0
  318. package/dist/scripts/setup-google-env.js +78 -0
  319. package/dist/scripts/setup-google-env.js.map +1 -0
  320. package/dist/services/base/BaseGoogleService.d.ts +52 -0
  321. package/dist/services/base/BaseGoogleService.d.ts.map +1 -0
  322. package/dist/services/base/BaseGoogleService.js +155 -0
  323. package/dist/services/base/BaseGoogleService.js.map +1 -0
  324. package/dist/services/calendar/index.d.ts +27 -0
  325. package/dist/services/calendar/index.d.ts.map +1 -0
  326. package/dist/services/calendar/index.js +146 -0
  327. package/dist/services/calendar/index.js.map +1 -0
  328. package/dist/services/contacts/index.d.ts +40 -0
  329. package/dist/services/contacts/index.d.ts.map +1 -0
  330. package/dist/services/contacts/index.js +137 -0
  331. package/dist/services/contacts/index.js.map +1 -0
  332. package/dist/services/docs/index.d.ts +4 -0
  333. package/dist/services/docs/index.d.ts.map +1 -0
  334. package/dist/services/docs/index.js +6 -0
  335. package/dist/services/docs/index.js.map +1 -0
  336. package/dist/services/drive/index.d.ts +4 -0
  337. package/dist/services/drive/index.d.ts.map +1 -0
  338. package/dist/services/drive/index.js +6 -0
  339. package/dist/services/drive/index.js.map +1 -0
  340. package/dist/services/gmail/index.d.ts +39 -0
  341. package/dist/services/gmail/index.d.ts.map +1 -0
  342. package/dist/services/gmail/index.js +337 -0
  343. package/dist/services/gmail/index.js.map +1 -0
  344. package/dist/services/sheets/index.d.ts +4 -0
  345. package/dist/services/sheets/index.d.ts.map +1 -0
  346. package/dist/services/sheets/index.js +6 -0
  347. package/dist/services/sheets/index.js.map +1 -0
  348. package/dist/services/slides/index.d.ts +4 -0
  349. package/dist/services/slides/index.d.ts.map +1 -0
  350. package/dist/services/slides/index.js +6 -0
  351. package/dist/services/slides/index.js.map +1 -0
  352. package/dist/tools/account-handlers.d.ts +28 -0
  353. package/dist/tools/account-handlers.d.ts.map +1 -0
  354. package/dist/tools/account-handlers.js +105 -0
  355. package/dist/tools/account-handlers.js.map +1 -0
  356. package/dist/tools/arg-aliases.d.ts +6 -0
  357. package/dist/tools/arg-aliases.d.ts.map +1 -0
  358. package/dist/tools/arg-aliases.js +22 -0
  359. package/dist/tools/arg-aliases.js.map +1 -0
  360. package/dist/tools/calendar-handlers.d.ts +83 -0
  361. package/dist/tools/calendar-handlers.d.ts.map +1 -0
  362. package/dist/tools/calendar-handlers.js +658 -0
  363. package/dist/tools/calendar-handlers.js.map +1 -0
  364. package/dist/tools/comments-handlers.d.ts +59 -0
  365. package/dist/tools/comments-handlers.d.ts.map +1 -0
  366. package/dist/tools/comments-handlers.js +138 -0
  367. package/dist/tools/comments-handlers.js.map +1 -0
  368. package/dist/tools/contacts-handlers.d.ts +36 -0
  369. package/dist/tools/contacts-handlers.d.ts.map +1 -0
  370. package/dist/tools/contacts-handlers.js +128 -0
  371. package/dist/tools/contacts-handlers.js.map +1 -0
  372. package/dist/tools/definitions/account.d.ts +3 -0
  373. package/dist/tools/definitions/account.d.ts.map +1 -0
  374. package/dist/tools/definitions/account.js +77 -0
  375. package/dist/tools/definitions/account.js.map +1 -0
  376. package/dist/tools/definitions/calendar.d.ts +3 -0
  377. package/dist/tools/definitions/calendar.d.ts.map +1 -0
  378. package/dist/tools/definitions/calendar.js +565 -0
  379. package/dist/tools/definitions/calendar.js.map +1 -0
  380. package/dist/tools/definitions/comments.d.ts +3 -0
  381. package/dist/tools/definitions/comments.d.ts.map +1 -0
  382. package/dist/tools/definitions/comments.js +207 -0
  383. package/dist/tools/definitions/comments.js.map +1 -0
  384. package/dist/tools/definitions/contacts.d.ts +3 -0
  385. package/dist/tools/definitions/contacts.d.ts.map +1 -0
  386. package/dist/tools/definitions/contacts.js +93 -0
  387. package/dist/tools/definitions/contacts.js.map +1 -0
  388. package/dist/tools/definitions/destructive-overrides.json +106 -0
  389. package/dist/tools/definitions/docs.d.ts +3 -0
  390. package/dist/tools/definitions/docs.d.ts.map +1 -0
  391. package/dist/tools/definitions/docs.js +416 -0
  392. package/dist/tools/definitions/docs.js.map +1 -0
  393. package/dist/tools/definitions/drive.d.ts +3 -0
  394. package/dist/tools/definitions/drive.d.ts.map +1 -0
  395. package/dist/tools/definitions/drive.js +587 -0
  396. package/dist/tools/definitions/drive.js.map +1 -0
  397. package/dist/tools/definitions/forms.d.ts +14 -0
  398. package/dist/tools/definitions/forms.d.ts.map +1 -0
  399. package/dist/tools/definitions/forms.js +189 -0
  400. package/dist/tools/definitions/forms.js.map +1 -0
  401. package/dist/tools/definitions/gmail.d.ts +3 -0
  402. package/dist/tools/definitions/gmail.d.ts.map +1 -0
  403. package/dist/tools/definitions/gmail.js +962 -0
  404. package/dist/tools/definitions/gmail.js.map +1 -0
  405. package/dist/tools/definitions/index.d.ts +33 -0
  406. package/dist/tools/definitions/index.d.ts.map +1 -0
  407. package/dist/tools/definitions/index.js +77 -0
  408. package/dist/tools/definitions/index.js.map +1 -0
  409. package/dist/tools/definitions/labels.d.ts +3 -0
  410. package/dist/tools/definitions/labels.d.ts.map +1 -0
  411. package/dist/tools/definitions/labels.js +662 -0
  412. package/dist/tools/definitions/labels.js.map +1 -0
  413. package/dist/tools/definitions/open-world-overrides.json +106 -0
  414. package/dist/tools/definitions/sheets.d.ts +3 -0
  415. package/dist/tools/definitions/sheets.d.ts.map +1 -0
  416. package/dist/tools/definitions/sheets.js +833 -0
  417. package/dist/tools/definitions/sheets.js.map +1 -0
  418. package/dist/tools/definitions/slides.d.ts +3 -0
  419. package/dist/tools/definitions/slides.d.ts.map +1 -0
  420. package/dist/tools/definitions/slides.js +383 -0
  421. package/dist/tools/definitions/slides.js.map +1 -0
  422. package/dist/tools/definitions/tasks.d.ts +11 -0
  423. package/dist/tools/definitions/tasks.d.ts.map +1 -0
  424. package/dist/tools/definitions/tasks.js +259 -0
  425. package/dist/tools/definitions/tasks.js.map +1 -0
  426. package/dist/tools/definitions.d.ts +8 -0
  427. package/dist/tools/definitions.d.ts.map +1 -0
  428. package/dist/tools/definitions.js +9 -0
  429. package/dist/tools/definitions.js.map +1 -0
  430. package/dist/tools/docs-handlers.d.ts +96 -0
  431. package/dist/tools/docs-handlers.d.ts.map +1 -0
  432. package/dist/tools/docs-handlers.js +250 -0
  433. package/dist/tools/docs-handlers.js.map +1 -0
  434. package/dist/tools/drive-handlers.d.ts +95 -0
  435. package/dist/tools/drive-handlers.d.ts.map +1 -0
  436. package/dist/tools/drive-handlers.js +506 -0
  437. package/dist/tools/drive-handlers.js.map +1 -0
  438. package/dist/tools/forms-handlers.d.ts +72 -0
  439. package/dist/tools/forms-handlers.d.ts.map +1 -0
  440. package/dist/tools/forms-handlers.js +435 -0
  441. package/dist/tools/forms-handlers.js.map +1 -0
  442. package/dist/tools/gmail-handlers.d.ts +320 -0
  443. package/dist/tools/gmail-handlers.d.ts.map +1 -0
  444. package/dist/tools/gmail-handlers.js +1040 -0
  445. package/dist/tools/gmail-handlers.js.map +1 -0
  446. package/dist/tools/param-normalizer.d.ts +2 -0
  447. package/dist/tools/param-normalizer.d.ts.map +1 -0
  448. package/dist/tools/param-normalizer.js +96 -0
  449. package/dist/tools/param-normalizer.js.map +1 -0
  450. package/dist/tools/server.d.ts +14 -0
  451. package/dist/tools/server.d.ts.map +1 -0
  452. package/dist/tools/server.js +733 -0
  453. package/dist/tools/server.js.map +1 -0
  454. package/dist/tools/sheets-handlers.d.ts +230 -0
  455. package/dist/tools/sheets-handlers.d.ts.map +1 -0
  456. package/dist/tools/sheets-handlers.js +589 -0
  457. package/dist/tools/sheets-handlers.js.map +1 -0
  458. package/dist/tools/slides-handlers.d.ts +90 -0
  459. package/dist/tools/slides-handlers.d.ts.map +1 -0
  460. package/dist/tools/slides-handlers.js +281 -0
  461. package/dist/tools/slides-handlers.js.map +1 -0
  462. package/dist/tools/tasks-handlers.d.ts +85 -0
  463. package/dist/tools/tasks-handlers.d.ts.map +1 -0
  464. package/dist/tools/tasks-handlers.js +265 -0
  465. package/dist/tools/tasks-handlers.js.map +1 -0
  466. package/dist/tools/type-guards.d.ts +491 -0
  467. package/dist/tools/type-guards.d.ts.map +1 -0
  468. package/dist/tools/type-guards.js +1325 -0
  469. package/dist/tools/type-guards.js.map +1 -0
  470. package/dist/tools/types.d.ts +298 -0
  471. package/dist/tools/types.d.ts.map +1 -0
  472. package/dist/tools/types.js +2 -0
  473. package/dist/tools/types.js.map +1 -0
  474. package/dist/types.d.ts +70 -0
  475. package/dist/types.d.ts.map +1 -0
  476. package/dist/types.js +12 -0
  477. package/dist/types.js.map +1 -0
  478. package/dist/utils/atomicCredentialWrite.d.ts +5 -0
  479. package/dist/utils/atomicCredentialWrite.d.ts.map +1 -0
  480. package/dist/utils/atomicCredentialWrite.js +120 -0
  481. package/dist/utils/atomicCredentialWrite.js.map +1 -0
  482. package/dist/utils/emfileRetry.d.ts +3 -0
  483. package/dist/utils/emfileRetry.d.ts.map +1 -0
  484. package/dist/utils/emfileRetry.js +24 -0
  485. package/dist/utils/emfileRetry.js.map +1 -0
  486. package/dist/utils/logger.d.ts +8 -0
  487. package/dist/utils/logger.d.ts.map +1 -0
  488. package/dist/utils/logger.js +67 -0
  489. package/dist/utils/logger.js.map +1 -0
  490. package/dist/utils/request-timeout.d.ts +5 -0
  491. package/dist/utils/request-timeout.d.ts.map +1 -0
  492. package/dist/utils/request-timeout.js +27 -0
  493. package/dist/utils/request-timeout.js.map +1 -0
  494. package/dist/utils/safe-filename.d.ts +2 -0
  495. package/dist/utils/safe-filename.d.ts.map +1 -0
  496. package/dist/utils/safe-filename.js +24 -0
  497. package/dist/utils/safe-filename.js.map +1 -0
  498. package/dist/utils/scope-hierarchy.d.ts +35 -0
  499. package/dist/utils/scope-hierarchy.d.ts.map +1 -0
  500. package/dist/utils/scope-hierarchy.js +123 -0
  501. package/dist/utils/scope-hierarchy.js.map +1 -0
  502. package/dist/utils/service-initializer.d.ts +12 -0
  503. package/dist/utils/service-initializer.d.ts.map +1 -0
  504. package/dist/utils/service-initializer.js +87 -0
  505. package/dist/utils/service-initializer.js.map +1 -0
  506. package/dist/utils/untrusted-content.d.ts +3 -0
  507. package/dist/utils/untrusted-content.d.ts.map +1 -0
  508. package/dist/utils/untrusted-content.js +20 -0
  509. package/dist/utils/untrusted-content.js.map +1 -0
  510. package/dist/utils/workspace.d.ts +43 -0
  511. package/dist/utils/workspace.d.ts.map +1 -0
  512. package/dist/utils/workspace.js +98 -0
  513. package/dist/utils/workspace.js.map +1 -0
  514. package/package.json +61 -0
@@ -0,0 +1,833 @@
1
+ // Google Sheets Tools
2
+ export const sheetsTools = [
3
+ {
4
+ name: 'read_workspace_spreadsheet',
5
+ category: 'Sheets/Spreadsheets',
6
+ description: `Read metadata and optionally values from a Google Sheets spreadsheet.
7
+
8
+ Returns human-readable text by default. Use return_json: true for the raw Google Sheets API response.
9
+ If you intend to write back to this range, call with value_view: 'shaped' first to see formulas — overwriting formulas with computed values is silently destructive.
10
+ For large or unbounded reads, returns an anchor envelope (first 50 + last 10 rows + summary). Pass anchor_mode: 'never' for legacy first-N truncation. Use continuation_token to page through the middle.
11
+
12
+ Usage examples:
13
+
14
+ 1. Get spreadsheet info (sheets list):
15
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz" }
16
+
17
+ 2. Read specific range:
18
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A1:D10" }
19
+
20
+ 3. With row/column limits:
21
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1", "max_rows": 100, "max_cols": 10 }
22
+
23
+ 4. Get raw JSON:
24
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "return_json": true }
25
+
26
+ Response includes:
27
+ - Spreadsheet title and URL
28
+ - List of sheets with dimensions
29
+ - Data values (if range specified)
30
+ - Truncation indicator if data exceeds limits`,
31
+ aliases: ['read_spreadsheet', 'get_spreadsheet', 'view_spreadsheet'],
32
+ annotations: { readOnlyHint: true },
33
+ inputSchema: {
34
+ type: 'object',
35
+ properties: {
36
+ email: {
37
+ type: 'string',
38
+ description: 'Email address of the Google account'
39
+ },
40
+ spreadsheet_id: {
41
+ type: 'string',
42
+ description: 'Google Sheets spreadsheet ID (from URL or extract_workspace_spreadsheet_id)'
43
+ },
44
+ range: {
45
+ type: 'string',
46
+ description: 'Optional A1 notation range to read (e.g., "Sheet1!A1:D10"). If omitted, returns metadata only.'
47
+ },
48
+ max_rows: {
49
+ type: 'number',
50
+ description: 'Maximum rows to return (default: 1000)'
51
+ },
52
+ max_cols: {
53
+ type: 'number',
54
+ description: 'Maximum columns to return (default: 26)'
55
+ },
56
+ return_json: {
57
+ type: 'boolean',
58
+ description: 'Return raw Google Sheets API JSON instead of formatted text (default: false)'
59
+ },
60
+ value_view: {
61
+ type: 'string',
62
+ enum: ['formatted', 'shaped', 'formula', 'unformatted'],
63
+ description: `How to render cells. 'shaped' (recommended for write-back planning) surfaces formulas alongside computed values, infers headers/column types, and flags structural anomalies. 'formatted' returns display values only (legacy default). 'formula' returns formula strings. 'unformatted' returns raw values.`
64
+ },
65
+ anchor_mode: {
66
+ type: 'string',
67
+ enum: ['auto', 'always', 'never'],
68
+ description: `How to handle large or unbounded reads. 'auto' (default) returns an anchor envelope (first 50 + last 10 rows + summary + continuation token) when the range is unbounded or >= 1000 rows. 'always' forces the envelope regardless of size. 'never' returns the legacy first-N truncation. Note: JSON callers default to legacy shape; use 'always' to receive the envelope in JSON mode.`
69
+ },
70
+ continuation_token: {
71
+ type: 'string',
72
+ description: `Opaque token from a previous anchor envelope's continuationToken field. Returns the rows between the first and last windows of the original read. Tokens are spreadsheet-scoped and time-bounded; stale tokens (sheet changed materially) are refused.`
73
+ }
74
+ },
75
+ required: ['spreadsheet_id']
76
+ }
77
+ },
78
+ {
79
+ name: 'read_workspace_spreadsheet_values',
80
+ category: 'Sheets/Data',
81
+ description: `Read values from a specific range in a Google Sheets spreadsheet.
82
+
83
+ Use this for focused data extraction. For spreadsheet metadata, use read_workspace_spreadsheet.
84
+ If you intend to write back to this range, call with value_view: 'shaped' first to see formulas — overwriting formulas with computed values is silently destructive.
85
+ For large or unbounded reads, returns an anchor envelope (first 50 + last 10 rows + summary). Pass anchor_mode: 'never' for legacy first-N truncation. Use continuation_token to page through the middle.
86
+
87
+ Usage examples:
88
+
89
+ 1. Read a range:
90
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A1:D10" }
91
+
92
+ 2. Read entire sheet:
93
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1" }
94
+
95
+ 3. Read by columns:
96
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A:D", "major_dimension": "COLUMNS" }
97
+
98
+ A1 notation examples:
99
+ - "Sheet1!A1:D10" - specific range
100
+ - "Sheet1" - entire sheet
101
+ - "A1:D10" - range in first sheet
102
+ - "Sheet1!A:D" - columns A through D`,
103
+ aliases: ['read_sheet_values', 'get_sheet_data', 'get_spreadsheet_values'],
104
+ annotations: { readOnlyHint: true },
105
+ inputSchema: {
106
+ type: 'object',
107
+ properties: {
108
+ email: {
109
+ type: 'string',
110
+ description: 'Email address of the Google account'
111
+ },
112
+ spreadsheet_id: {
113
+ type: 'string',
114
+ description: 'Google Sheets spreadsheet ID'
115
+ },
116
+ range: {
117
+ type: 'string',
118
+ description: 'A1 notation range to read (e.g., "Sheet1!A1:D10")'
119
+ },
120
+ major_dimension: {
121
+ type: 'string',
122
+ enum: ['ROWS', 'COLUMNS'],
123
+ description: 'How to group values - by ROWS (default) or COLUMNS'
124
+ },
125
+ return_json: {
126
+ type: 'boolean',
127
+ description: 'Return raw ValueRange JSON instead of formatted text (default: false)'
128
+ },
129
+ value_view: {
130
+ type: 'string',
131
+ enum: ['formatted', 'shaped', 'formula', 'unformatted'],
132
+ description: `How to render cells. 'shaped' (recommended for write-back planning) surfaces formulas alongside computed values, infers headers/column types, and flags structural anomalies. 'formatted' returns display values only (legacy default). 'formula' returns formula strings. 'unformatted' returns raw values.`
133
+ },
134
+ anchor_mode: {
135
+ type: 'string',
136
+ enum: ['auto', 'always', 'never'],
137
+ description: `How to handle large or unbounded reads. 'auto' (default) returns an anchor envelope (first 50 + last 10 rows + summary + continuation token) when the range is unbounded or >= 1000 rows. 'always' forces the envelope regardless of size. 'never' returns the legacy first-N truncation. Note: JSON callers default to legacy shape; use 'always' to receive the envelope in JSON mode.`
138
+ },
139
+ continuation_token: {
140
+ type: 'string',
141
+ description: `Opaque token from a previous anchor envelope's continuationToken field. Returns the rows between the first and last windows of the original read. Tokens are spreadsheet-scoped and time-bounded; stale tokens (sheet changed materially) are refused.`
142
+ }
143
+ },
144
+ required: ['spreadsheet_id', 'range']
145
+ }
146
+ },
147
+ {
148
+ name: 'create_workspace_spreadsheet',
149
+ category: 'Sheets/Spreadsheets',
150
+ description: `Create a new Google Sheets spreadsheet.
151
+
152
+ Usage examples:
153
+
154
+ 1. Create empty spreadsheet:
155
+ { "email": "user@example.com", "title": "Q1 Budget" }
156
+
157
+ 2. Create with named sheets:
158
+ { "email": "user@example.com", "title": "Project Tracker", "sheetTitles": ["Tasks", "Timeline", "Resources"] }
159
+
160
+ Returns the new spreadsheet's ID and URL.`,
161
+ aliases: ['create_spreadsheet', 'new_spreadsheet', 'make_spreadsheet'],
162
+ annotations: { readOnlyHint: false, destructiveHint: false },
163
+ inputSchema: {
164
+ type: 'object',
165
+ properties: {
166
+ email: {
167
+ type: 'string',
168
+ description: 'Email address of the Google account'
169
+ },
170
+ title: {
171
+ type: 'string',
172
+ description: 'Title for the new spreadsheet'
173
+ },
174
+ sheetTitles: {
175
+ type: 'array',
176
+ items: { type: 'string' },
177
+ description: 'Optional names for initial sheets (otherwise creates one "Sheet1")'
178
+ }
179
+ },
180
+ required: ['title']
181
+ }
182
+ },
183
+ {
184
+ name: 'append_to_workspace_spreadsheet',
185
+ category: 'Sheets/Data',
186
+ description: `Append rows of data to a Google Sheets spreadsheet.
187
+
188
+ Data is added after the last row containing data in the specified range.
189
+ Values are interpreted by Google Sheets (formulas, dates, etc.) by default.
190
+ If the target column ends with a fill-down formula, this tool warns that the append breaks the pattern. Use overwrite_formulas: true to acknowledge and suppress the warning.
191
+
192
+ Usage examples:
193
+
194
+ 1. Append single row:
195
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A:D", "values": [["John", "Doe", "john@example.com", "2024-01-15"]] }
196
+
197
+ 2. Append multiple rows:
198
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1", "values": [["Name", "Score"], ["Alice", 95], ["Bob", 87]] }
199
+
200
+ 3. Append raw values (no formula interpretation):
201
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A:B", "values": [["=SUM(A1:A10)"]], "value_input_option": "RAW" }
202
+
203
+ value_input_option:
204
+ - USER_ENTERED (default): Values parsed as if typed by user (formulas work)
205
+ - RAW: Values stored exactly as provided (formulas stored as text)`,
206
+ aliases: ['append_spreadsheet', 'add_rows', 'append_sheet_data'],
207
+ annotations: { readOnlyHint: false, destructiveHint: false },
208
+ inputSchema: {
209
+ type: 'object',
210
+ properties: {
211
+ email: {
212
+ type: 'string',
213
+ description: 'Email address of the Google account'
214
+ },
215
+ spreadsheet_id: {
216
+ type: 'string',
217
+ description: 'Google Sheets spreadsheet ID'
218
+ },
219
+ range: {
220
+ type: 'string',
221
+ description: 'A1 notation range for where to append (e.g., "Sheet1!A:D" or "Sheet1")'
222
+ },
223
+ values: {
224
+ type: 'array',
225
+ items: {
226
+ type: 'array',
227
+ items: {
228
+ oneOf: [
229
+ { type: 'string' },
230
+ { type: 'number' },
231
+ { type: 'boolean' },
232
+ { type: 'null' }
233
+ ]
234
+ }
235
+ },
236
+ description: '2D array of values to append (rows of cells)'
237
+ },
238
+ value_input_option: {
239
+ type: 'string',
240
+ enum: ['RAW', 'USER_ENTERED'],
241
+ description: 'How to interpret values: RAW (literal) or USER_ENTERED (parse formulas/dates, default)'
242
+ },
243
+ overwrite_formulas: {
244
+ type: 'boolean',
245
+ description: "If false (default), this tool performs a best-effort formula-safety pre-read and warns when append data appears to break fill-down formula patterns. Set to true to skip the formula-safety pre-read and authorize appending without that warning pre-check."
246
+ }
247
+ },
248
+ required: ['spreadsheet_id', 'range', 'values']
249
+ }
250
+ },
251
+ {
252
+ name: 'update_workspace_spreadsheet_values',
253
+ category: 'Sheets/Data',
254
+ description: `Update values in a specific range of a Google Sheets spreadsheet.
255
+
256
+ Overwrites existing data in the specified range. Use append_to_workspace_spreadsheet to add data without overwriting.
257
+ Prefer formulas over computed values. By default this tool refuses to overwrite cells that currently contain formulas; pass overwrite_formulas: true to force, or write to non-formula cells. Best-effort: protects against formula overwrite absent concurrent edits to the same range during the call. Sheets has no transactional write API; under concurrent edits the guard cannot guarantee zero overwrites. value_input_option defaults to USER_ENTERED so '=SUM(...)' is parsed as a formula; use RAW only when literally storing '=' as text.
258
+
259
+ Usage examples:
260
+
261
+ 1. Update specific cells:
262
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A1:B2", "values": [["Name", "Score"], ["Alice", 100]] }
263
+
264
+ 2. Update single cell:
265
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A1", "values": [["Updated Value"]] }
266
+
267
+ 3. Update with raw values:
268
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A1", "values": [["=SUM(B1:B10)"]], "value_input_option": "RAW" }`,
269
+ aliases: ['update_spreadsheet', 'update_sheet_values', 'write_spreadsheet'],
270
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
271
+ inputSchema: {
272
+ type: 'object',
273
+ properties: {
274
+ email: {
275
+ type: 'string',
276
+ description: 'Email address of the Google account'
277
+ },
278
+ spreadsheet_id: {
279
+ type: 'string',
280
+ description: 'Google Sheets spreadsheet ID'
281
+ },
282
+ range: {
283
+ type: 'string',
284
+ description: 'A1 notation range to update (e.g., "Sheet1!A1:D10")'
285
+ },
286
+ values: {
287
+ type: 'array',
288
+ items: {
289
+ type: 'array',
290
+ items: {
291
+ oneOf: [
292
+ { type: 'string' },
293
+ { type: 'number' },
294
+ { type: 'boolean' },
295
+ { type: 'null' }
296
+ ]
297
+ }
298
+ },
299
+ description: '2D array of values to write (rows of cells)'
300
+ },
301
+ value_input_option: {
302
+ type: 'string',
303
+ enum: ['RAW', 'USER_ENTERED'],
304
+ description: 'How to interpret values: RAW (literal) or USER_ENTERED (parse formulas/dates, default)'
305
+ },
306
+ overwrite_formulas: {
307
+ type: 'boolean',
308
+ description: "If false (default), this tool refuses to overwrite cells that currently contain formulas. Best-effort: protects against formula overwrite absent concurrent edits during the call. Set to true to skip the formula-safety pre-read and authorize overwriting unconditionally."
309
+ }
310
+ },
311
+ required: ['spreadsheet_id', 'range', 'values']
312
+ }
313
+ },
314
+ {
315
+ name: 'clear_workspace_spreadsheet_values',
316
+ category: 'Sheets/Data',
317
+ description: `Clear values from a range in a Google Sheets spreadsheet.
318
+
319
+ Removes cell contents (formulas and values); preserves formatting. Destructive — consider creating a backup via Drive copy_file before clearing important data. Does NOT refuse to clear formulas.
320
+ For complete cell removal, use the Sheets UI.
321
+
322
+ Usage examples:
323
+
324
+ 1. Clear a range:
325
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1!A1:D10" }
326
+
327
+ 2. Clear entire sheet:
328
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "range": "Sheet1" }`,
329
+ aliases: ['clear_spreadsheet', 'clear_sheet_values', 'erase_spreadsheet'],
330
+ annotations: { readOnlyHint: false, destructiveHint: true },
331
+ inputSchema: {
332
+ type: 'object',
333
+ properties: {
334
+ email: {
335
+ type: 'string',
336
+ description: 'Email address of the Google account'
337
+ },
338
+ spreadsheet_id: {
339
+ type: 'string',
340
+ description: 'Google Sheets spreadsheet ID'
341
+ },
342
+ range: {
343
+ type: 'string',
344
+ description: 'A1 notation range to clear (e.g., "Sheet1!A1:D10")'
345
+ }
346
+ },
347
+ required: ['spreadsheet_id', 'range']
348
+ }
349
+ },
350
+ {
351
+ name: 'list_workspace_spreadsheet_sheets',
352
+ category: 'Sheets/Spreadsheets',
353
+ description: `List all sheets (tabs) in a Google Sheets spreadsheet.
354
+
355
+ Returns sheet names, IDs, and dimensions.
356
+
357
+ Usage example:
358
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz" }
359
+
360
+ Use the returned sheetId (numeric) when calling delete_workspace_spreadsheet_sheet with the snake_case parameter sheet_id.`,
361
+ aliases: ['list_sheets', 'get_sheets', 'show_sheets'],
362
+ annotations: { readOnlyHint: true },
363
+ inputSchema: {
364
+ type: 'object',
365
+ properties: {
366
+ email: {
367
+ type: 'string',
368
+ description: 'Email address of the Google account'
369
+ },
370
+ spreadsheet_id: {
371
+ type: 'string',
372
+ description: 'Google Sheets spreadsheet ID'
373
+ }
374
+ },
375
+ required: ['spreadsheet_id']
376
+ }
377
+ },
378
+ {
379
+ name: 'add_workspace_spreadsheet_sheet',
380
+ category: 'Sheets/Spreadsheets',
381
+ description: `Add a new sheet (tab) to an existing Google Sheets spreadsheet.
382
+
383
+ Usage examples:
384
+
385
+ 1. Add sheet with default size:
386
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "title": "Q2 Data" }
387
+
388
+ 2. Add sheet with custom dimensions:
389
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "title": "Large Dataset", "row_count": 5000, "column_count": 52 }`,
390
+ aliases: ['add_sheet', 'create_sheet', 'new_sheet'],
391
+ annotations: { readOnlyHint: false, destructiveHint: false },
392
+ inputSchema: {
393
+ type: 'object',
394
+ properties: {
395
+ email: {
396
+ type: 'string',
397
+ description: 'Email address of the Google account'
398
+ },
399
+ spreadsheet_id: {
400
+ type: 'string',
401
+ description: 'Google Sheets spreadsheet ID'
402
+ },
403
+ title: {
404
+ type: 'string',
405
+ description: 'Name for the new sheet'
406
+ },
407
+ row_count: {
408
+ type: 'number',
409
+ description: 'Initial row count (default: 1000)'
410
+ },
411
+ column_count: {
412
+ type: 'number',
413
+ description: 'Initial column count (default: 26)'
414
+ }
415
+ },
416
+ required: ['spreadsheet_id', 'title']
417
+ }
418
+ },
419
+ {
420
+ name: 'delete_workspace_spreadsheet_sheet',
421
+ category: 'Sheets/Spreadsheets',
422
+ description: `Delete a sheet (tab) from a Google Sheets spreadsheet.
423
+
424
+ WARNING: This permanently deletes the sheet and all its data. Destructive — cannot be undone via API. Read the sheet's contents (read_workspace_spreadsheet_values) before deletion if uncertain.
425
+
426
+ Usage example:
427
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "sheet_id": 123456789 }
428
+
429
+ Get the numeric sheetId from list_workspace_spreadsheet_sheets and pass it as sheet_id.
430
+ Note: Cannot delete the last remaining sheet in a spreadsheet.`,
431
+ aliases: ['delete_sheet', 'remove_sheet'],
432
+ annotations: { readOnlyHint: false, destructiveHint: true },
433
+ inputSchema: {
434
+ type: 'object',
435
+ properties: {
436
+ email: {
437
+ type: 'string',
438
+ description: 'Email address of the Google account'
439
+ },
440
+ spreadsheet_id: {
441
+ type: 'string',
442
+ description: 'Google Sheets spreadsheet ID'
443
+ },
444
+ sheet_id: {
445
+ type: 'number',
446
+ description: 'Numeric sheet ID (from list_workspace_spreadsheet_sheets, NOT the sheet name)'
447
+ }
448
+ },
449
+ required: ['spreadsheet_id', 'sheet_id']
450
+ }
451
+ },
452
+ {
453
+ name: 'extract_workspace_spreadsheet_id',
454
+ category: 'Sheets/Utility',
455
+ description: `Extract a Google Sheets spreadsheet ID from a URL or validate an existing ID.
456
+
457
+ This is a utility tool that helps parse various Google Sheets URL formats.
458
+
459
+ Supported formats:
460
+ - https://docs.google.com/spreadsheets/d/{id}/edit
461
+ - https://docs.google.com/spreadsheets/d/{id}/edit#gid=0
462
+ - https://docs.google.com/spreadsheets/d/{id}
463
+ - Just the spreadsheet ID itself
464
+
465
+ Usage examples:
466
+
467
+ 1. Extract from URL:
468
+ { "input": "https://docs.google.com/spreadsheets/d/1ABC123xyz/edit#gid=0" }
469
+
470
+ 2. Validate existing ID:
471
+ { "input": "1ABC123xyz" }
472
+
473
+ Returns the extracted/validated spreadsheet ID.`,
474
+ aliases: ['parse_spreadsheet_url', 'get_spreadsheet_id', 'spreadsheet_id_from_url'],
475
+ annotations: { readOnlyHint: true },
476
+ inputSchema: {
477
+ type: 'object',
478
+ properties: {
479
+ input: {
480
+ type: 'string',
481
+ description: 'Google Sheets URL or spreadsheet ID to parse'
482
+ }
483
+ },
484
+ required: ['input']
485
+ }
486
+ },
487
+ {
488
+ name: 'batch_read_workspace_spreadsheet_values',
489
+ category: 'Sheets/Data',
490
+ description: `Read values from multiple ranges in a single API call.
491
+
492
+ More efficient than multiple read_workspace_spreadsheet_values calls - uses 1 API request instead of N.
493
+ Ideal for reading from multiple sheets or non-contiguous ranges.
494
+ If you intend to write back to these ranges, call with value_view: 'shaped' first to see formulas — overwriting formulas with computed values is silently destructive.
495
+ For large or unbounded reads, returns an anchor envelope (first 50 + last 10 rows + summary). Pass anchor_mode: 'never' for legacy first-N truncation. Use continuation_token to page through the middle.
496
+
497
+ Usage examples:
498
+
499
+ 1. Read from multiple sheets:
500
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "ranges": ["Sheet1!A1:D10", "Sheet2!A1:B5"] }
501
+
502
+ 2. Read multiple ranges from same sheet:
503
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "ranges": ["Sheet1!A1:C10", "Sheet1!E1:E10", "Sheet1!G1:H10"] }
504
+
505
+ 3. Read by columns:
506
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "ranges": ["Sheet1!A:A", "Sheet1!D:D"], "major_dimension": "COLUMNS" }
507
+
508
+ Returns data for each range in the same order as requested.
509
+
510
+ Performance: Reduces API quota usage significantly for multi-range operations.`,
511
+ aliases: ['batch_read_spreadsheet', 'multi_range_read', 'batch_get_values'],
512
+ annotations: { readOnlyHint: true },
513
+ inputSchema: {
514
+ type: 'object',
515
+ properties: {
516
+ email: {
517
+ type: 'string',
518
+ description: 'Email address of the Google account'
519
+ },
520
+ spreadsheet_id: {
521
+ type: 'string',
522
+ description: 'Google Sheets spreadsheet ID'
523
+ },
524
+ ranges: {
525
+ type: 'array',
526
+ items: { type: 'string' },
527
+ description: 'Array of A1 notation ranges to read (e.g., ["Sheet1!A1:D10", "Sheet2!A1:B5"])'
528
+ },
529
+ major_dimension: {
530
+ type: 'string',
531
+ enum: ['ROWS', 'COLUMNS'],
532
+ description: 'How to group values - by ROWS (default) or COLUMNS'
533
+ },
534
+ return_json: {
535
+ type: 'boolean',
536
+ description: 'Return raw JSON instead of formatted text (default: false)'
537
+ },
538
+ value_view: {
539
+ type: 'string',
540
+ enum: ['formatted', 'shaped', 'formula', 'unformatted'],
541
+ description: `How to render cells. 'shaped' (recommended for write-back planning) surfaces formulas alongside computed values, infers headers/column types, and flags structural anomalies. 'formatted' returns display values only (legacy default). 'formula' returns formula strings. 'unformatted' returns raw values.`
542
+ },
543
+ anchor_mode: {
544
+ type: 'string',
545
+ enum: ['auto', 'always', 'never'],
546
+ description: `How to handle large or unbounded reads. 'auto' (default) returns an anchor envelope (first 50 + last 10 rows + summary + continuation token) when the range is unbounded or >= 1000 rows. 'always' forces the envelope regardless of size. 'never' returns the legacy first-N truncation. Note: JSON callers default to legacy shape; use 'always' to receive the envelope in JSON mode.`
547
+ },
548
+ continuation_token: {
549
+ type: 'string',
550
+ description: `Opaque token from a previous anchor envelope's continuationToken field. Returns the rows between the first and last windows of the original read. Tokens are spreadsheet-scoped and time-bounded; stale tokens (sheet changed materially) are refused. Batch continuation is not supported in Phase 1.`
551
+ }
552
+ },
553
+ required: ['spreadsheet_id', 'ranges']
554
+ }
555
+ },
556
+ {
557
+ name: 'batch_update_workspace_spreadsheet_values',
558
+ category: 'Sheets/Data',
559
+ description: `Update values in multiple ranges in a single API call.
560
+
561
+ More efficient than multiple update_workspace_spreadsheet_values calls - uses 1 API request instead of N.
562
+ Ideal for writing to multiple sheets or non-contiguous ranges atomically.
563
+ Prefer formulas over computed values. By default this tool refuses to overwrite cells that currently contain formulas; pass overwrite_formulas: true to force, or write to non-formula cells. Best-effort: protects against formula overwrite absent concurrent edits to the same range during the call. Sheets has no transactional write API; under concurrent edits the guard cannot guarantee zero overwrites. value_input_option defaults to USER_ENTERED so '=SUM(...)' is parsed as a formula; use RAW only when literally storing '=' as text.
564
+
565
+ Usage examples:
566
+
567
+ 1. Update multiple sheets:
568
+ {
569
+ "email": "user@example.com",
570
+ "spreadsheet_id": "1ABC123xyz",
571
+ "data": [
572
+ { "range": "Sheet1!A1:B2", "values": [["Name", "Score"], ["Alice", 95]] },
573
+ { "range": "Sheet2!A1:B1", "values": [["Summary", "Total"]] }
574
+ ]
575
+ }
576
+
577
+ 2. Update scattered ranges:
578
+ {
579
+ "email": "user@example.com",
580
+ "spreadsheet_id": "1ABC123xyz",
581
+ "data": [
582
+ { "range": "Sheet1!A1", "values": [["Updated Header"]] },
583
+ { "range": "Sheet1!D5", "values": [[100]] },
584
+ { "range": "Sheet1!F10:G11", "values": [["X", "Y"], [1, 2]] }
585
+ ]
586
+ }
587
+
588
+ Performance: Reduces API quota usage significantly. All updates are applied atomically.`,
589
+ aliases: ['batch_update_spreadsheet', 'multi_range_update', 'batch_write_values'],
590
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
591
+ inputSchema: {
592
+ type: 'object',
593
+ properties: {
594
+ email: {
595
+ type: 'string',
596
+ description: 'Email address of the Google account'
597
+ },
598
+ spreadsheet_id: {
599
+ type: 'string',
600
+ description: 'Google Sheets spreadsheet ID'
601
+ },
602
+ data: {
603
+ type: 'array',
604
+ items: {
605
+ type: 'object',
606
+ properties: {
607
+ range: {
608
+ type: 'string',
609
+ description: 'A1 notation range (e.g., "Sheet1!A1:B2")'
610
+ },
611
+ values: {
612
+ type: 'array',
613
+ items: {
614
+ type: 'array',
615
+ items: {
616
+ oneOf: [
617
+ { type: 'string' },
618
+ { type: 'number' },
619
+ { type: 'boolean' },
620
+ { type: 'null' }
621
+ ]
622
+ }
623
+ },
624
+ description: '2D array of values for this range'
625
+ }
626
+ },
627
+ required: ['range', 'values']
628
+ },
629
+ description: 'Array of {range, values} objects to update'
630
+ },
631
+ value_input_option: {
632
+ type: 'string',
633
+ enum: ['RAW', 'USER_ENTERED'],
634
+ description: 'How to interpret values: RAW (literal) or USER_ENTERED (parse formulas/dates, default)'
635
+ },
636
+ overwrite_formulas: {
637
+ type: 'boolean',
638
+ description: "If false (default), this tool refuses to overwrite cells that currently contain formulas. Best-effort: protects against formula overwrite absent concurrent edits during the call. Set to true to skip the formula-safety pre-read and authorize overwriting unconditionally."
639
+ }
640
+ },
641
+ required: ['spreadsheet_id', 'data']
642
+ }
643
+ },
644
+ {
645
+ name: 'find_and_replace_workspace_spreadsheet',
646
+ category: 'Sheets/Data',
647
+ description: `Find and replace text throughout a Google Sheets spreadsheet.
648
+
649
+ Can search entire spreadsheet or limit to a specific sheet.
650
+ Supports regex, case-sensitive matching, and formula search.
651
+ WARNING: include_formulas: true will rewrite formula text, not just values. Use sparingly and never with regex unless you've verified the pattern won't match formula syntax (=, ., etc.).
652
+
653
+ Usage examples:
654
+
655
+ 1. Simple find/replace in all sheets:
656
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "find": "old text", "replacement": "new text" }
657
+
658
+ 2. Replace in specific sheet only:
659
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "find": "TODO", "replacement": "DONE", "sheet_id": 0 }
660
+
661
+ 3. Case-sensitive with regex:
662
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "find": "^[A-Z]+$", "replacement": "UPPERCASE", "match_case": true, "search_by_regex": true }
663
+
664
+ 4. Match entire cell only:
665
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "find": "Yes", "replacement": "No", "match_entire_cell": true }
666
+
667
+ Returns count of occurrences changed.
668
+ Note: Get the numeric sheetId from list_workspace_spreadsheet_sheets and pass it as sheet_id (numeric ID, not name).`,
669
+ aliases: ['find_replace_spreadsheet', 'search_replace_sheet', 'spreadsheet_find_replace'],
670
+ annotations: { readOnlyHint: false, destructiveHint: false },
671
+ inputSchema: {
672
+ type: 'object',
673
+ properties: {
674
+ email: {
675
+ type: 'string',
676
+ description: 'Email address of the Google account'
677
+ },
678
+ spreadsheet_id: {
679
+ type: 'string',
680
+ description: 'Google Sheets spreadsheet ID'
681
+ },
682
+ find: {
683
+ type: 'string',
684
+ description: 'Text to find (or regex pattern if search_by_regex is true)'
685
+ },
686
+ replacement: {
687
+ type: 'string',
688
+ description: 'Text to replace with'
689
+ },
690
+ sheet_id: {
691
+ type: 'number',
692
+ description: 'Numeric sheet ID to limit search (omit for all sheets)'
693
+ },
694
+ match_case: {
695
+ type: 'boolean',
696
+ description: 'Case-sensitive matching (default: false)'
697
+ },
698
+ match_entire_cell: {
699
+ type: 'boolean',
700
+ description: 'Only match if entire cell equals find text (default: false)'
701
+ },
702
+ search_by_regex: {
703
+ type: 'boolean',
704
+ description: 'Treat find as regex pattern (default: false)'
705
+ },
706
+ include_formulas: {
707
+ type: 'boolean',
708
+ description: 'Search within formula text, not just values (default: false)'
709
+ }
710
+ },
711
+ required: ['spreadsheet_id', 'find', 'replacement']
712
+ }
713
+ },
714
+ {
715
+ name: 'format_workspace_spreadsheet_cells',
716
+ category: 'Sheets/Formatting',
717
+ description: `Apply formatting to a range of cells in a Google Sheets spreadsheet.
718
+
719
+ Supports text formatting (bold, italic, etc.), colors, and borders.
720
+ Uses 0-based row/column indices with exclusive end indices.
721
+
722
+ Usage examples:
723
+
724
+ 1. Make header row bold:
725
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "sheet_id": 0, "start_row_index": 0, "end_row_index": 1, "start_column_index": 0, "end_column_index": 5, "bold": true }
726
+
727
+ 2. Highlight cells with background color:
728
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "sheet_id": 0, "start_row_index": 0, "end_row_index": 10, "start_column_index": 0, "end_column_index": 3, "background_color": { "red": 1, "green": 0.95, "blue": 0.8 } }
729
+
730
+ 3. Add borders and text color:
731
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "sheet_id": 0, "start_row_index": 0, "end_row_index": 5, "start_column_index": 0, "end_column_index": 4, "border_style": "SOLID", "text_color": { "red": 0, "green": 0, "blue": 0.5 } }
732
+
733
+ 4. Multiple formatting options:
734
+ { "email": "user@example.com", "spreadsheet_id": "1ABC123xyz", "sheet_id": 0, "start_row_index": 0, "end_row_index": 1, "start_column_index": 0, "end_column_index": 10, "bold": true, "font_size": 14, "background_color": { "red": 0.2, "green": 0.2, "blue": 0.4 }, "text_color": { "red": 1, "green": 1, "blue": 1 } }
735
+
736
+ Index conversion from A1 notation:
737
+ - Row 1 = start_row_index: 0, end_row_index: 1
738
+ - Column A = start_column_index: 0, end_column_index: 1
739
+ - Range A1:D10 = start_row_index: 0, end_row_index: 10, start_column_index: 0, end_column_index: 4
740
+
741
+ Color values are floats 0.0 to 1.0 (e.g., { "red": 1, "green": 0, "blue": 0 } = pure red).
742
+ Border styles: NONE, DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE`,
743
+ aliases: ['format_cells', 'style_spreadsheet', 'format_sheet_range'],
744
+ annotations: { readOnlyHint: false, destructiveHint: false },
745
+ inputSchema: {
746
+ type: 'object',
747
+ properties: {
748
+ email: {
749
+ type: 'string',
750
+ description: 'Email address of the Google account'
751
+ },
752
+ spreadsheet_id: {
753
+ type: 'string',
754
+ description: 'Google Sheets spreadsheet ID'
755
+ },
756
+ sheet_id: {
757
+ type: 'number',
758
+ description: 'Numeric sheet ID (from list_workspace_spreadsheet_sheets)'
759
+ },
760
+ start_row_index: {
761
+ type: 'number',
762
+ description: 'Starting row index (0-based, inclusive)'
763
+ },
764
+ end_row_index: {
765
+ type: 'number',
766
+ description: 'Ending row index (0-based, exclusive)'
767
+ },
768
+ start_column_index: {
769
+ type: 'number',
770
+ description: 'Starting column index (0-based, inclusive)'
771
+ },
772
+ end_column_index: {
773
+ type: 'number',
774
+ description: 'Ending column index (0-based, exclusive)'
775
+ },
776
+ bold: {
777
+ type: 'boolean',
778
+ description: 'Apply bold formatting'
779
+ },
780
+ italic: {
781
+ type: 'boolean',
782
+ description: 'Apply italic formatting'
783
+ },
784
+ underline: {
785
+ type: 'boolean',
786
+ description: 'Apply underline formatting'
787
+ },
788
+ strikethrough: {
789
+ type: 'boolean',
790
+ description: 'Apply strikethrough formatting'
791
+ },
792
+ font_size: {
793
+ type: 'number',
794
+ description: 'Font size in points'
795
+ },
796
+ text_color: {
797
+ type: 'object',
798
+ properties: {
799
+ red: { type: 'number', description: '0.0 to 1.0' },
800
+ green: { type: 'number', description: '0.0 to 1.0' },
801
+ blue: { type: 'number', description: '0.0 to 1.0' }
802
+ },
803
+ description: 'Text color (RGB values 0.0-1.0)'
804
+ },
805
+ background_color: {
806
+ type: 'object',
807
+ properties: {
808
+ red: { type: 'number', description: '0.0 to 1.0' },
809
+ green: { type: 'number', description: '0.0 to 1.0' },
810
+ blue: { type: 'number', description: '0.0 to 1.0' }
811
+ },
812
+ description: 'Background color (RGB values 0.0-1.0)'
813
+ },
814
+ border_style: {
815
+ type: 'string',
816
+ enum: ['NONE', 'DOTTED', 'DASHED', 'SOLID', 'SOLID_MEDIUM', 'SOLID_THICK', 'DOUBLE'],
817
+ description: 'Border style to apply to all edges and inner lines'
818
+ },
819
+ border_color: {
820
+ type: 'object',
821
+ properties: {
822
+ red: { type: 'number', description: '0.0 to 1.0' },
823
+ green: { type: 'number', description: '0.0 to 1.0' },
824
+ blue: { type: 'number', description: '0.0 to 1.0' }
825
+ },
826
+ description: 'Border color (RGB values 0.0-1.0, default: black)'
827
+ }
828
+ },
829
+ required: ['spreadsheet_id', 'sheet_id', 'start_row_index', 'end_row_index', 'start_column_index', 'end_column_index']
830
+ }
831
+ }
832
+ ];
833
+ //# sourceMappingURL=sheets.js.map