@commandable/integration-data 0.0.5 → 0.0.6

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 (183) hide show
  1. package/dist/credentials-index.d.ts.map +1 -1
  2. package/dist/credentials-index.js +64 -0
  3. package/dist/credentials-index.js.map +1 -1
  4. package/integrations/github/__tests__/get_handlers.test.ts +202 -7
  5. package/integrations/github/__tests__/write_handlers.test.ts +171 -21
  6. package/integrations/github/handlers/create_commit.js +10 -2
  7. package/integrations/github/handlers/create_pull_request_review.js +10 -0
  8. package/integrations/github/handlers/create_release.js +14 -0
  9. package/integrations/github/handlers/delete_branch.js +8 -0
  10. package/integrations/github/handlers/delete_file.js +9 -0
  11. package/integrations/github/handlers/fork_repo.js +10 -0
  12. package/integrations/github/handlers/get_commit.js +8 -0
  13. package/integrations/github/handlers/get_file_contents.js +21 -0
  14. package/integrations/github/handlers/get_job_logs.js +6 -0
  15. package/integrations/github/handlers/get_latest_release.js +4 -0
  16. package/integrations/github/handlers/get_me.js +4 -0
  17. package/integrations/github/handlers/get_pull_request.js +4 -0
  18. package/integrations/github/handlers/get_pull_request_diff.js +8 -0
  19. package/integrations/github/handlers/get_repo_tree.js +12 -0
  20. package/integrations/github/handlers/get_workflow_run.js +4 -0
  21. package/integrations/github/handlers/list_branches.js +6 -1
  22. package/integrations/github/handlers/list_commits.js +5 -6
  23. package/integrations/github/handlers/list_issue_comments.js +8 -0
  24. package/integrations/github/handlers/list_issues.js +5 -6
  25. package/integrations/github/handlers/list_labels.js +8 -0
  26. package/integrations/github/handlers/list_pull_request_comments.js +8 -0
  27. package/integrations/github/handlers/list_pull_request_files.js +8 -0
  28. package/integrations/github/handlers/list_pull_requests.js +7 -2
  29. package/integrations/github/handlers/list_releases.js +8 -0
  30. package/integrations/github/handlers/list_tags.js +8 -0
  31. package/integrations/github/handlers/list_workflow_runs.js +11 -0
  32. package/integrations/github/handlers/request_pull_request_reviewers.js +10 -0
  33. package/integrations/github/handlers/search_code.js +8 -0
  34. package/integrations/github/handlers/search_issues.js +8 -0
  35. package/integrations/github/handlers/search_pull_requests.js +8 -0
  36. package/integrations/github/handlers/search_repos.js +10 -0
  37. package/integrations/github/handlers/update_pull_request.js +13 -0
  38. package/integrations/github/manifest.json +58 -20
  39. package/integrations/github/schemas/create_pull_request_review.json +17 -0
  40. package/integrations/github/schemas/create_release.json +16 -0
  41. package/integrations/github/schemas/delete_branch.json +10 -0
  42. package/integrations/github/schemas/delete_file.json +13 -0
  43. package/integrations/github/schemas/fork_repo.json +11 -0
  44. package/integrations/github/schemas/get_commit.json +12 -0
  45. package/integrations/github/schemas/get_file_contents.json +11 -0
  46. package/integrations/github/schemas/get_job_logs.json +10 -0
  47. package/integrations/github/schemas/get_pull_request.json +10 -0
  48. package/integrations/github/schemas/get_pull_request_diff.json +10 -0
  49. package/integrations/github/schemas/get_repo_tree.json +12 -0
  50. package/integrations/github/schemas/get_workflow_run.json +10 -0
  51. package/integrations/github/schemas/list_branches.json +12 -0
  52. package/integrations/github/schemas/list_commits.json +5 -3
  53. package/integrations/github/schemas/list_issue_comments.json +12 -0
  54. package/integrations/github/schemas/list_issues.json +4 -2
  55. package/integrations/github/schemas/list_labels.json +11 -0
  56. package/integrations/github/schemas/list_pull_request_comments.json +12 -0
  57. package/integrations/github/schemas/list_pull_request_files.json +12 -0
  58. package/integrations/github/schemas/list_pull_requests.json +7 -1
  59. package/integrations/github/schemas/list_releases.json +11 -0
  60. package/integrations/github/schemas/list_tags.json +11 -0
  61. package/integrations/github/schemas/list_workflow_runs.json +18 -0
  62. package/integrations/github/schemas/request_pull_request_reviewers.json +20 -0
  63. package/integrations/github/schemas/search_code.json +10 -0
  64. package/integrations/github/schemas/search_issues.json +10 -0
  65. package/integrations/github/schemas/search_pull_requests.json +10 -0
  66. package/integrations/github/schemas/search_repos.json +12 -0
  67. package/integrations/github/schemas/update_pull_request.json +15 -0
  68. package/integrations/google-calendar/__tests__/write_and_admin_handlers.test.ts +0 -13
  69. package/integrations/google-calendar/handlers/get_event.js +5 -1
  70. package/integrations/google-calendar/handlers/list_events.js +2 -0
  71. package/integrations/google-calendar/manifest.json +17 -18
  72. package/integrations/google-calendar/prompt.md +68 -0
  73. package/integrations/google-calendar/schemas/id_calendar_event.json +4 -2
  74. package/integrations/google-calendar/schemas/list_events.json +10 -8
  75. package/integrations/google-docs/__tests__/get_handlers.test.ts +4 -19
  76. package/integrations/google-docs/__tests__/write_handlers.test.ts +31 -48
  77. package/integrations/google-docs/handlers/read_document.js +189 -0
  78. package/integrations/google-docs/manifest.json +16 -31
  79. package/integrations/google-docs/prompt.md +49 -0
  80. package/integrations/google-docs/schemas/{get_document_text.json → read_document.json} +5 -2
  81. package/integrations/google-docs/todo.md +18 -0
  82. package/integrations/google-drive/__tests__/handlers.test.ts +43 -0
  83. package/integrations/google-drive/__tests__/usage_parity.test.ts +9 -0
  84. package/integrations/google-drive/handlers/get_file.js +2 -4
  85. package/integrations/google-drive/handlers/get_file_content.js +41 -0
  86. package/integrations/google-drive/handlers/list_files.js +15 -0
  87. package/integrations/google-drive/handlers/search_files.js +20 -0
  88. package/integrations/google-drive/handlers/share_file.js +20 -0
  89. package/integrations/google-drive/manifest.json +37 -10
  90. package/integrations/google-drive/prompt.md +59 -0
  91. package/integrations/google-drive/schemas/get_file.json +2 -2
  92. package/integrations/google-drive/schemas/get_file_content.json +11 -0
  93. package/integrations/google-drive/schemas/list_files.json +12 -0
  94. package/integrations/google-drive/schemas/search_files.json +14 -0
  95. package/integrations/google-drive/schemas/share_file.json +23 -0
  96. package/integrations/google-gmail/__tests__/get_handlers.test.ts +134 -0
  97. package/integrations/google-gmail/__tests__/usage_parity.test.ts +9 -0
  98. package/integrations/google-gmail/__tests__/write_and_admin_handlers.test.ts +211 -0
  99. package/integrations/google-gmail/credentials.json +57 -0
  100. package/integrations/google-gmail/credentials_hint_oauth_token.md +8 -0
  101. package/integrations/google-gmail/credentials_hint_service_account.md +10 -0
  102. package/integrations/google-gmail/handlers/create_draft_email.js +27 -0
  103. package/integrations/google-gmail/handlers/create_label.js +12 -0
  104. package/integrations/google-gmail/handlers/delete_draft.js +13 -0
  105. package/integrations/google-gmail/handlers/delete_label.js +13 -0
  106. package/integrations/google-gmail/handlers/delete_message.js +13 -0
  107. package/integrations/google-gmail/handlers/delete_thread.js +13 -0
  108. package/integrations/google-gmail/handlers/get_draft.js +6 -0
  109. package/integrations/google-gmail/handlers/get_label.js +6 -0
  110. package/integrations/google-gmail/handlers/get_message.js +14 -0
  111. package/integrations/google-gmail/handlers/get_profile.js +5 -0
  112. package/integrations/google-gmail/handlers/get_thread.js +14 -0
  113. package/integrations/google-gmail/handlers/list_drafts.js +15 -0
  114. package/integrations/google-gmail/handlers/list_labels.js +5 -0
  115. package/integrations/google-gmail/handlers/list_messages.js +19 -0
  116. package/integrations/google-gmail/handlers/list_threads.js +19 -0
  117. package/integrations/google-gmail/handlers/modify_message.js +11 -0
  118. package/integrations/google-gmail/handlers/modify_thread.js +11 -0
  119. package/integrations/google-gmail/handlers/read_email.js +56 -0
  120. package/integrations/google-gmail/handlers/send_draft.js +15 -0
  121. package/integrations/google-gmail/handlers/send_email.js +22 -0
  122. package/integrations/google-gmail/handlers/trash_message.js +6 -0
  123. package/integrations/google-gmail/handlers/trash_thread.js +6 -0
  124. package/integrations/google-gmail/handlers/untrash_message.js +6 -0
  125. package/integrations/google-gmail/handlers/untrash_thread.js +6 -0
  126. package/integrations/google-gmail/handlers/update_label.js +15 -0
  127. package/integrations/google-gmail/manifest.json +33 -0
  128. package/integrations/google-gmail/prompt.md +52 -0
  129. package/integrations/google-gmail/schemas/create_draft_email.json +16 -0
  130. package/integrations/google-gmail/schemas/create_label.json +26 -0
  131. package/integrations/google-gmail/schemas/get_message.json +20 -0
  132. package/integrations/{google-docs/schemas/get_document_structured.json → google-gmail/schemas/get_profile.json} +4 -2
  133. package/integrations/google-gmail/schemas/get_thread.json +20 -0
  134. package/integrations/google-gmail/schemas/id_draft.json +16 -0
  135. package/integrations/google-gmail/schemas/id_label.json +16 -0
  136. package/integrations/google-gmail/schemas/id_message.json +16 -0
  137. package/integrations/google-gmail/schemas/id_thread.json +16 -0
  138. package/integrations/google-gmail/schemas/list_drafts.json +30 -0
  139. package/integrations/{google-sheet/schemas/get_developer_metadata.json → google-gmail/schemas/list_labels.json} +4 -3
  140. package/integrations/google-gmail/schemas/list_messages.json +35 -0
  141. package/integrations/google-gmail/schemas/list_threads.json +35 -0
  142. package/integrations/google-gmail/schemas/modify_message.json +24 -0
  143. package/integrations/google-gmail/schemas/modify_thread.json +24 -0
  144. package/integrations/google-gmail/schemas/read_email.json +10 -0
  145. package/integrations/google-gmail/schemas/send_draft.json +29 -0
  146. package/integrations/google-gmail/schemas/send_email.json +17 -0
  147. package/integrations/google-gmail/schemas/update_label.json +33 -0
  148. package/integrations/google-sheet/__tests__/get_handlers.test.ts +6 -52
  149. package/integrations/google-sheet/__tests__/write_handlers.test.ts +0 -20
  150. package/integrations/google-sheet/handlers/get_spreadsheet.js +2 -0
  151. package/integrations/google-sheet/handlers/read_sheet.js +75 -0
  152. package/integrations/google-sheet/manifest.json +13 -62
  153. package/integrations/google-sheet/prompt.md +49 -0
  154. package/integrations/google-sheet/schemas/get_spreadsheet.json +5 -4
  155. package/integrations/google-sheet/schemas/read_sheet.json +21 -0
  156. package/integrations/google-slides/__tests__/get_handlers.test.ts +12 -9
  157. package/integrations/google-slides/handlers/read_presentation.js +51 -0
  158. package/integrations/google-slides/manifest.json +13 -13
  159. package/integrations/google-slides/prompt.md +56 -0
  160. package/integrations/new_integration_prompt.md +5 -1
  161. package/package.json +1 -1
  162. package/integrations/google-calendar/handlers/update_event.js +0 -5
  163. package/integrations/google-calendar/schemas/update_event.json +0 -10
  164. package/integrations/google-docs/handlers/get_document.js +0 -12
  165. package/integrations/google-docs/handlers/get_document_structured.js +0 -6
  166. package/integrations/google-docs/handlers/get_document_text.js +0 -17
  167. package/integrations/google-docs/schemas/get_document.json +0 -11
  168. package/integrations/google-sheet/handlers/batch_clear_values_by_data_filter.js +0 -6
  169. package/integrations/google-sheet/handlers/batch_get_values.js +0 -16
  170. package/integrations/google-sheet/handlers/batch_update_values_by_data_filter.js +0 -16
  171. package/integrations/google-sheet/handlers/get_developer_metadata.js +0 -6
  172. package/integrations/google-sheet/handlers/get_spreadsheet_by_data_filter.js +0 -10
  173. package/integrations/google-sheet/handlers/get_values.js +0 -14
  174. package/integrations/google-sheet/handlers/get_values_by_data_filter.js +0 -14
  175. package/integrations/google-sheet/handlers/search_developer_metadata.js +0 -7
  176. package/integrations/google-sheet/schemas/batch_clear_values_by_data_filter.json +0 -10
  177. package/integrations/google-sheet/schemas/batch_get_values.json +0 -13
  178. package/integrations/google-sheet/schemas/batch_update_values_by_data_filter.json +0 -25
  179. package/integrations/google-sheet/schemas/get_spreadsheet_by_data_filter.json +0 -11
  180. package/integrations/google-sheet/schemas/get_values.json +0 -13
  181. package/integrations/google-sheet/schemas/get_values_by_data_filter.json +0 -17
  182. package/integrations/google-sheet/schemas/search_developer_metadata.json +0 -14
  183. package/integrations/google-slides/handlers/get_presentation.js +0 -6
@@ -4,119 +4,70 @@
4
4
  "tools": [
5
5
  {
6
6
  "name": "get_spreadsheet",
7
- "description": "Retrieve spreadsheet metadata and optionally grid data.",
7
+ "description": "Retrieve spreadsheet metadata including all sheet names, IDs, and properties. Set includeGridData=false (the default) to get only metadata without cell values. Use read_sheet for cell content. Use the 'fields' parameter to limit the response (e.g. fields='sheets.properties' to get only sheet names and IDs). The spreadsheetId appears in the URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/.",
8
8
  "inputSchema": "schemas/get_spreadsheet.json",
9
9
  "handler": "handlers/get_spreadsheet.js",
10
10
  "scope": "read"
11
11
  },
12
12
  {
13
- "name": "get_spreadsheet_by_data_filter",
14
- "description": "Retrieve spreadsheet metadata using DataFilters.",
15
- "inputSchema": "schemas/get_spreadsheet_by_data_filter.json",
16
- "handler": "handlers/get_spreadsheet_by_data_filter.js",
17
- "scope": "read"
18
- },
19
- {
20
- "name": "get_values",
21
- "description": "Get values from a single A1 range.",
22
- "inputSchema": "schemas/get_values.json",
23
- "handler": "handlers/get_values.js",
24
- "scope": "read"
25
- },
26
- {
27
- "name": "batch_get_values",
28
- "description": "Batch get values for multiple A1 ranges.",
29
- "inputSchema": "schemas/batch_get_values.json",
30
- "handler": "handlers/batch_get_values.js",
31
- "scope": "read"
32
- },
33
- {
34
- "name": "get_values_by_data_filter",
35
- "description": "Batch get values using DataFilters.",
36
- "inputSchema": "schemas/get_values_by_data_filter.json",
37
- "handler": "handlers/get_values_by_data_filter.js",
38
- "scope": "read"
39
- },
40
- {
41
- "name": "search_developer_metadata",
42
- "description": "Search developer metadata in a spreadsheet.",
43
- "inputSchema": "schemas/search_developer_metadata.json",
44
- "handler": "handlers/search_developer_metadata.js",
45
- "scope": "read"
46
- },
47
- {
48
- "name": "get_developer_metadata",
49
- "description": "Get a developer metadata entry by ID.",
50
- "inputSchema": "schemas/get_developer_metadata.json",
51
- "handler": "handlers/get_developer_metadata.js",
13
+ "name": "read_sheet",
14
+ "description": "Read cell values from a sheet range and return as a Markdown table with A1 column headers and row numbers. Use this to read and understand spreadsheet data -- the coordinates in the output can be used directly with update_values and append_values for writes. Supports optional valueRenderOption for formulas or raw numbers. Use get_spreadsheet first to discover sheet names.",
15
+ "inputSchema": "schemas/read_sheet.json",
16
+ "handler": "handlers/read_sheet.js",
52
17
  "scope": "read"
53
18
  },
54
19
  {
55
20
  "name": "create_spreadsheet",
56
- "description": "Create a new spreadsheet.",
21
+ "description": "Create a new Google Spreadsheet. Accepts a full spreadsheet resource body, allowing you to specify the title, initial sheets, and cell data. Minimum: provide {title: 'My Spreadsheet'}. Returns the created spreadsheet including its spreadsheetId.",
57
22
  "inputSchema": "schemas/create_spreadsheet.json",
58
23
  "handler": "handlers/create_spreadsheet.js",
59
24
  "scope": "write"
60
25
  },
61
26
  {
62
27
  "name": "update_values",
63
- "description": "Update values in a range (PUT).",
28
+ "description": "Write values to a specific A1 range, replacing existing content. Use valueInputOption='USER_ENTERED' to parse values as the user would type them (supports formulas, dates, currency). Use 'RAW' to store values as literal strings. Provide values as a 2D array (rows of columns).",
64
29
  "inputSchema": "schemas/update_values.json",
65
30
  "handler": "handlers/update_values.js",
66
31
  "scope": "write"
67
32
  },
68
33
  {
69
34
  "name": "append_values",
70
- "description": "Append values after the last row of a range.",
35
+ "description": "Append rows of values after the last row of existing data in a range. Useful for adding new rows to a table without knowing the exact next row number. Uses USER_ENTERED valueInputOption by default. The range determines which sheet to append to.",
71
36
  "inputSchema": "schemas/append_values.json",
72
37
  "handler": "handlers/append_values.js",
73
38
  "scope": "write"
74
39
  },
75
40
  {
76
41
  "name": "batch_update_values",
77
- "description": "Batch update values across multiple ranges.",
42
+ "description": "Write values to multiple A1 ranges in a single API call. More efficient than calling update_values multiple times. Provide a data array where each item has range and values. Use valueInputOption='USER_ENTERED' for formulas and dates.",
78
43
  "inputSchema": "schemas/batch_update_values.json",
79
44
  "handler": "handlers/batch_update_values.js",
80
45
  "scope": "write"
81
46
  },
82
- {
83
- "name": "batch_update_values_by_data_filter",
84
- "description": "Batch update values using DataFilters.",
85
- "inputSchema": "schemas/batch_update_values_by_data_filter.json",
86
- "handler": "handlers/batch_update_values_by_data_filter.js",
87
- "scope": "write"
88
- },
89
47
  {
90
48
  "name": "clear_values",
91
- "description": "Clear values in the specified range.",
49
+ "description": "Clear all values (but not formatting) in the specified A1 range. The cells remain but their content is removed. To clear formatting as well, use batch_update with a repeatCell request.",
92
50
  "inputSchema": "schemas/clear_values.json",
93
51
  "handler": "handlers/clear_values.js",
94
52
  "scope": "write"
95
53
  },
96
54
  {
97
55
  "name": "batch_clear_values",
98
- "description": "Batch clear values across multiple ranges.",
56
+ "description": "Clear values from multiple A1 ranges in a single API call. More efficient than calling clear_values multiple times.",
99
57
  "inputSchema": "schemas/batch_clear_values.json",
100
58
  "handler": "handlers/batch_clear_values.js",
101
59
  "scope": "write"
102
60
  },
103
- {
104
- "name": "batch_clear_values_by_data_filter",
105
- "description": "Batch clear values using DataFilters.",
106
- "inputSchema": "schemas/batch_clear_values_by_data_filter.json",
107
- "handler": "handlers/batch_clear_values_by_data_filter.js",
108
- "scope": "write"
109
- },
110
61
  {
111
62
  "name": "batch_update",
112
- "description": "Send a batchUpdate request (addSheet, deleteSheet, etc).",
63
+ "description": "Send a spreadsheets.batchUpdate request for structural changes such as addSheet, deleteSheet, duplicateSheet, insertDimension, deleteDimension, mergeCells, sortRange, addConditionalFormatRule, and more. Accepts a requests array. Use update_values or batch_update_values for writing cell data.",
113
64
  "inputSchema": "schemas/batch_update.json",
114
65
  "handler": "handlers/batch_update.js",
115
66
  "scope": "write"
116
67
  },
117
68
  {
118
69
  "name": "copy_to_spreadsheet",
119
- "description": "Copy a sheet to another spreadsheet.",
70
+ "description": "Copy a specific sheet (tab) from one spreadsheet to another. Provide the source spreadsheetId, the sheetId (integer, from get_spreadsheet), and the destination spreadsheetId. Returns the copied sheet's properties in the destination spreadsheet.",
120
71
  "inputSchema": "schemas/copy_to_spreadsheet.json",
121
72
  "handler": "handlers/copy_to_spreadsheet.js",
122
73
  "scope": "write"
@@ -0,0 +1,49 @@
1
+ ## A1 notation
2
+
3
+ Ranges use A1 notation: `SheetName!StartCell:EndCell`
4
+
5
+ Examples:
6
+ - `Sheet1!A1:D10` — cells A1 to D10 on Sheet1
7
+ - `Sheet1!A:A` — entire column A
8
+ - `Sheet1!1:5` — rows 1 through 5
9
+ - `Sheet1` — entire sheet (all data)
10
+ - `A1:D10` — if the spreadsheet has only one sheet, sheet name can be omitted
11
+ - `'My Sheet'!A1:B5` — sheet names with spaces must be quoted with single quotes
12
+
13
+ Use `get_spreadsheet` with `fields='sheets.properties'` first to discover all sheet names and their IDs.
14
+
15
+ ## valueInputOption
16
+
17
+ Controls how input values are interpreted in `update_values`, `append_values`, and `batch_update_values`:
18
+
19
+ - `USER_ENTERED` *(recommended)* — values are parsed as if a user typed them. Supports formulas (`=SUM(A1:A10)`), dates (`1/15/2024`), currency (`$1,234.56`), and percentages (`50%`)
20
+ - `RAW` — values are stored as literal strings, no parsing. Use when you want exact string storage
21
+
22
+ ## valueRenderOption
23
+
24
+ Controls how values are returned in `read_sheet`:
25
+
26
+ - `FORMATTED_VALUE` *(default)* — returns values as displayed in the UI (e.g. `"$1,234.56"`, `"50%"`)
27
+ - `UNFORMATTED_VALUE` — returns raw numbers (e.g. `1234.56`, `0.5`)
28
+ - `FORMULA` — returns formulas as strings (e.g. `"=SUM(A1:A10)"`)
29
+
30
+ ## Recommended workflow
31
+
32
+ 1. Call `get_spreadsheet` with `fields='sheets.properties'` to get sheet names and sheetIds
33
+ 2. Use `read_sheet` with an A1 range to read data as markdown plus explicit row/column coordinates
34
+ 3. Use the coordinates from `read_sheet` output (e.g. `B3`) with `update_values` or `append_values` for writes
35
+
36
+ ## Structural changes
37
+
38
+ For adding/removing sheets, inserting/deleting rows or columns, or formatting cells, use `batch_update` with the appropriate request types:
39
+ - `addSheet` — add a new tab
40
+ - `deleteSheet` — remove a tab (requires sheetId, not name)
41
+ - `insertDimension` — insert rows or columns
42
+ - `deleteDimension` — delete rows or columns
43
+ - `repeatCell` — apply formatting to a range
44
+
45
+ ## Large spreadsheets
46
+
47
+ Avoid calling `get_spreadsheet` with `includeGridData=true` on large spreadsheets -- it can return megabytes of data. Instead:
48
+ - Use `read_sheet` with specific ranges
49
+ - Use `get_spreadsheet` with `fields='sheets.properties'` to get sheet metadata only
@@ -3,13 +3,14 @@
3
3
  "type": "object",
4
4
  "required": ["spreadsheetId"],
5
5
  "properties": {
6
- "spreadsheetId": { "type": "string", "description": "ID of the spreadsheet" },
7
- "includeGridData": { "type": "boolean", "description": "Whether to include grid data" },
6
+ "spreadsheetId": { "type": "string", "description": "Spreadsheet ID. Found in the spreadsheet URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/." },
7
+ "includeGridData": { "type": "boolean", "description": "Whether to include cell grid data. Defaults to false. Set to true only when you need cell values -- use get_values or batch_get_values for targeted range reads instead." },
8
8
  "ranges": {
9
9
  "type": "array",
10
10
  "items": { "type": "string" },
11
- "description": "Optional A1 ranges to include"
12
- }
11
+ "description": "Optional A1 notation ranges to include when includeGridData is true. Example: ['Sheet1!A1:D10', 'Sheet2!A:A']."
12
+ },
13
+ "fields": { "type": "string", "description": "Partial response fields selector to reduce response size. Example: 'sheets.properties' to get only sheet names and IDs without cell data. See Sheets API fields reference." }
13
14
  },
14
15
  "additionalProperties": false
15
16
  }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "required": ["spreadsheetId"],
5
+ "properties": {
6
+ "spreadsheetId": {
7
+ "type": "string",
8
+ "description": "Spreadsheet ID from URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit"
9
+ },
10
+ "range": {
11
+ "type": "string",
12
+ "description": "A1 notation range to read, e.g. 'Sheet1!A1:D20'. Defaults to 'A1:Z1000'."
13
+ },
14
+ "valueRenderOption": {
15
+ "type": "string",
16
+ "enum": ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"],
17
+ "description": "How values should be represented in the output."
18
+ }
19
+ },
20
+ "additionalProperties": false
21
+ }
@@ -47,25 +47,28 @@ suite('google-slides read handlers (live)', () => {
47
47
  await safeCleanup(async () => drive.write('delete_file')({ fileId: folderId }))
48
48
  }, 60000)
49
49
 
50
- it('get_presentation returns metadata', async () => {
50
+ it('read_presentation returns human-readable content', async () => {
51
51
  if (!presentationId)
52
52
  return expect(true).toBe(true)
53
- const handler = slides.read('get_presentation')
53
+ const handler = slides.read('read_presentation')
54
54
  const result = await handler({ presentationId })
55
- expect(result?.presentationId || Array.isArray(result?.slides)).toBeTruthy()
55
+ expect(typeof result).toBe('string')
56
+ expect(String(result)).toContain('Presentation:')
56
57
  }, 30000)
57
58
 
58
59
  it('get_page_thumbnail returns URL data', async () => {
59
60
  if (!presentationId)
60
61
  return expect(true).toBe(true)
61
- // First query the presentation to discover a page id
62
- const getPresentation = slides.read('get_presentation')
63
- const meta = await getPresentation({ presentationId })
64
- const firstSlide = meta?.slides?.[0]
65
- if (!firstSlide?.objectId)
62
+ // Query the readable summary and parse "Slide 1: ID <objectId>, ..."
63
+ const readPresentation = slides.read('read_presentation')
64
+ const summary = await readPresentation({ presentationId })
65
+ const text = String(summary || '')
66
+ const match = text.match(/Slide 1: ID ([^,\n]+)/)
67
+ const firstSlideObjectId = match?.[1]
68
+ if (!firstSlideObjectId)
66
69
  return expect(true).toBe(true)
67
70
  const handler = slides.read('get_page_thumbnail')
68
- const result = await handler({ presentationId, 'pageObjectId': firstSlide.objectId, 'thumbnailProperties.thumbnailSize': 'MEDIUM', 'thumbnailProperties.mimeType': 'PNG' })
71
+ const result = await handler({ presentationId, 'pageObjectId': firstSlideObjectId, 'thumbnailProperties.thumbnailSize': 'MEDIUM', 'thumbnailProperties.mimeType': 'PNG' })
69
72
  expect(typeof result?.contentUrl === 'string' || typeof result?.thumbnailUrl === 'string').toBe(true)
70
73
  }, 30000)
71
74
  })
@@ -0,0 +1,51 @@
1
+ async (input) => {
2
+ const extractSlideText = (slide) => {
3
+ const lines = []
4
+ for (const element of slide?.pageElements || []) {
5
+ const textElements = element?.shape?.text?.textElements || []
6
+ let combined = ''
7
+ for (const t of textElements) {
8
+ combined += t?.textRun?.content || ''
9
+ }
10
+ const trimmed = combined
11
+ .split('\n')
12
+ .map((line) => line.trim())
13
+ .filter(Boolean)
14
+ lines.push(...trimmed)
15
+ }
16
+ return lines
17
+ }
18
+
19
+ const { presentationId } = input
20
+ const path = `/presentations/${encodeURIComponent(presentationId)}`
21
+ const res = await integration.fetch(path)
22
+ const presentation = await res.json()
23
+
24
+ const title = presentation?.title || 'Untitled presentation'
25
+ const deckId = presentation?.presentationId || presentationId
26
+ const slides = presentation?.slides || []
27
+
28
+ const lines = [
29
+ `Presentation: "${title}" (ID: ${deckId})`,
30
+ `URL: https://docs.google.com/presentation/d/${deckId}/edit`,
31
+ `Total Slides: ${slides.length}`,
32
+ '',
33
+ ]
34
+
35
+ for (let i = 0; i < slides.length; i += 1) {
36
+ const slide = slides[i]
37
+ const slideId = slide?.objectId || `slide_${i + 1}`
38
+ const elementCount = (slide?.pageElements || []).length
39
+ lines.push(`Slide ${i + 1}: ID ${slideId}, ${elementCount} element(s)`)
40
+
41
+ const textLines = extractSlideText(slide)
42
+ if (!textLines.length) {
43
+ lines.push(' > (No text content)')
44
+ } else {
45
+ for (const text of textLines) lines.push(` > ${text}`)
46
+ }
47
+ lines.push('')
48
+ }
49
+
50
+ return lines.join('\n').trim()
51
+ }
@@ -3,39 +3,39 @@
3
3
  "version": "0.1.0",
4
4
  "tools": [
5
5
  {
6
- "name": "get_presentation",
7
- "description": "Retrieve presentation metadata, including slides/pages and elements.",
6
+ "name": "read_presentation",
7
+ "description": "Read a Google Slides presentation and return a human-readable summary including the title, slide count, and text content extracted from each slide. Returns the text found in all shapes on each slide with slide IDs for reference. Use this to understand what is in a presentation before editing. For low-level modifications, use batch_update.",
8
8
  "inputSchema": "schemas/get_presentation.json",
9
- "handler": "handlers/get_presentation.js",
9
+ "handler": "handlers/read_presentation.js",
10
10
  "scope": "read"
11
11
  },
12
12
  {
13
13
  "name": "get_page_thumbnail",
14
- "description": "Get a thumbnail image for a page (slide) in a presentation.",
14
+ "description": "Generate a thumbnail image URL for a specific slide (page) in a presentation. Requires the presentation ID and the slide's objectId (page ID from read_presentation). Returns a contentUrl for the thumbnail image. Useful for previewing slides.",
15
15
  "inputSchema": "schemas/get_page_thumbnail.json",
16
16
  "handler": "handlers/get_page_thumbnail.js",
17
17
  "scope": "read"
18
18
  },
19
19
  {
20
20
  "name": "create_presentation",
21
- "description": "Create a new presentation with optional initial title.",
21
+ "description": "Create a new empty Google Slides presentation with an optional title. Returns the created presentation's metadata including its presentationId, which is needed for all subsequent operations.",
22
22
  "inputSchema": "schemas/create_presentation.json",
23
23
  "handler": "handlers/create_presentation.js",
24
24
  "scope": "write"
25
25
  },
26
26
  {
27
27
  "name": "batch_update",
28
- "description": "Send a batchUpdate request to modify presentation structure and content.",
28
+ "description": "Send a presentations.batchUpdate request for low-level slide modifications. Accepts an array of requests (createSlide, deleteObject, insertText, deleteText, createShape, createTable, replaceAllText, updateTextStyle, updateShapeProperties, etc.). For common text and styling operations, prefer the higher-level tools: replace_text_first_match, style_text_first_match, insert_shape_after_first_match, etc.",
29
29
  "inputSchema": "schemas/batch_update.json",
30
30
  "handler": "handlers/batch_update.js",
31
31
  "scope": "write"
32
32
  },
33
- { "name": "append_text_to_title_of_slide_index", "description": "Append text to the title shape of the specified slide (slideIndex, default 0).", "inputSchema": "schemas/append_text_to_title_of_first_slide.json", "handler": "handlers/append_text_to_title_of_first_slide.js", "scope": "write" },
34
- { "name": "replace_text_first_match", "description": "Replace text for the first match anywhere in the presentation.", "inputSchema": "schemas/replace_text_first_match.json", "handler": "handlers/replace_text_first_match.js", "scope": "write" },
35
- { "name": "style_text_first_match", "description": "Apply text style to the first match of given text.", "inputSchema": "schemas/style_text_first_match.json", "handler": "handlers/style_text_first_match.js", "scope": "write" },
36
- { "name": "insert_shape_after_first_match", "description": "Insert a rectangle shape near the first match of text on a slide.", "inputSchema": "schemas/insert_shape_after_first_match.json", "handler": "handlers/insert_shape_after_first_match.js", "scope": "write" },
37
- { "name": "insert_image_after_first_match", "description": "Insert an image near the first match of text on a slide.", "inputSchema": "schemas/insert_image_after_first_match.json", "handler": "handlers/insert_image_after_first_match.js", "scope": "write" },
38
- { "name": "create_slide_after_first_match", "description": "Create a new slide after the slide that contains the first text match.", "inputSchema": "schemas/create_slide_after_first_match.json", "handler": "handlers/create_slide_after_first_match.js", "scope": "write" },
39
- { "name": "set_background_color_for_slide_index", "description": "Set background color for a slide by index.", "inputSchema": "schemas/set_background_color_for_slide_index.json", "handler": "handlers/set_background_color_for_slide_index.js", "scope": "write" }
33
+ { "name": "append_text_to_title_of_slide_index", "description": "Append text to the title shape of a specific slide by its 0-based index (slideIndex=0 is the first slide, default). Fetches the presentation to find the title shape's objectId then inserts text at the end of its content.", "inputSchema": "schemas/append_text_to_title_of_first_slide.json", "handler": "handlers/append_text_to_title_of_first_slide.js", "scope": "write" },
34
+ { "name": "replace_text_first_match", "description": "Replace the first occurrence of text anywhere in the presentation with new text. Note: the Slides API replaceAllText always replaces all occurrences; this tool uses replaceAllText internally. For replacing only one instance, use style_text_first_match to locate and style the match, then follow up with batch_update. Returns the API response.", "inputSchema": "schemas/replace_text_first_match.json", "handler": "handlers/replace_text_first_match.js", "scope": "write" },
35
+ { "name": "style_text_first_match", "description": "Find the first occurrence of text in the presentation and apply a text style to it (bold, italic, fontSize, foregroundColor, etc.). Uses a marker pattern: replaces the text with a unique marker, finds the marker's objectId and range, applies the style, then restores the original text. Returns {applied: true/false}.", "inputSchema": "schemas/style_text_first_match.json", "handler": "handlers/style_text_first_match.js", "scope": "write" },
36
+ { "name": "insert_shape_after_first_match", "description": "Find the first slide containing a text match and insert a rectangle shape on that slide at the specified position. Positions use EMU units (1 inch = 914400 EMU). Returns {applied: true/false}.", "inputSchema": "schemas/insert_shape_after_first_match.json", "handler": "handlers/insert_shape_after_first_match.js", "scope": "write" },
37
+ { "name": "insert_image_after_first_match", "description": "Find the first slide containing a text match and insert an image on that slide from a URL. Position and size use EMU units (1 inch = 914400 EMU). Returns {applied: true/false}.", "inputSchema": "schemas/insert_image_after_first_match.json", "handler": "handlers/insert_image_after_first_match.js", "scope": "write" },
38
+ { "name": "create_slide_after_first_match", "description": "Find the first slide containing a text match and create a new blank slide immediately after it. Useful for inserting slides at a specific position in the deck. Returns {applied: true/false} and the new slide's objectId.", "inputSchema": "schemas/create_slide_after_first_match.json", "handler": "handlers/create_slide_after_first_match.js", "scope": "write" },
39
+ { "name": "set_background_color_for_slide_index", "description": "Set the background color for a specific slide by its 0-based index (slideIndex=0 is the first slide). Provide r, g, b values in 0.0-1.0 range (e.g. r=1.0, g=0.0, b=0.0 for red). Fetches the presentation first to resolve the slide's objectId from the index.", "inputSchema": "schemas/set_background_color_for_slide_index.json", "handler": "handlers/set_background_color_for_slide_index.js", "scope": "write" }
40
40
  ]
41
41
  }
@@ -0,0 +1,56 @@
1
+ ## Presentation and slide IDs
2
+
3
+ The presentationId appears in the Google Slides URL:
4
+ `https://docs.google.com/presentation/d/{presentationId}/edit`
5
+
6
+ Each slide has an `objectId` (a string like `p` or `g12345abcde`). Use `read_presentation` first to discover slide objectIds and extracted text content by slide.
7
+
8
+ ## Slide addressing
9
+
10
+ The higher-level tools use `slideIndex` (0-based integer):
11
+ - `slideIndex=0` — first slide
12
+ - `slideIndex=1` — second slide
13
+
14
+ The lower-level `batch_update` requires `objectId` strings. Use `read_presentation` output to map slide order and IDs before editing.
15
+ If you need raw structure details, call `batch_update` only for the operation you are performing.
16
+
17
+ ## First-match tools
18
+
19
+ The `*_first_match` tools search all slides for text content by JSON-stringifying each slide's content. They use the marker pattern (replace → find → act → restore), making 3 API calls per operation. They return `{applied: true/false}`.
20
+
21
+ ## EMU units
22
+
23
+ Positions and sizes in the `batch_update` API use EMU (English Metric Units):
24
+ - 1 inch = 914400 EMU
25
+ - 1 cm ≈ 360000 EMU
26
+ - Standard slide dimensions: 9144000 × 5143500 EMU (10 × 5.625 inches, 16:9)
27
+
28
+ ## Common batch_update operations
29
+
30
+ ```json
31
+ { "requests": [
32
+ { "createSlide": { "insertionIndex": 1, "slideLayoutReference": { "predefinedLayout": "BLANK" } } },
33
+ { "insertText": { "objectId": "shapeId", "text": "Hello World", "insertionIndex": 0 } },
34
+ { "updateTextStyle": {
35
+ "objectId": "shapeId",
36
+ "style": { "bold": true, "fontSize": { "magnitude": 24, "unit": "PT" } },
37
+ "fields": "bold,fontSize",
38
+ "textRange": { "type": "ALL" }
39
+ }},
40
+ { "replaceAllText": {
41
+ "containsText": { "text": "{{placeholder}}" },
42
+ "replaceText": "New value"
43
+ }}
44
+ ]}
45
+ ```
46
+
47
+ ## Predefined slide layouts
48
+
49
+ Use with `createSlide`: `BLANK`, `CAPTION_ONLY`, `TITLE`, `TITLE_AND_BODY`, `TITLE_AND_TWO_COLUMNS`, `TITLE_ONLY`, `SECTION_HEADER`, `SECTION_TITLE_AND_DESCRIPTION`, `ONE_COLUMN_TEXT`, `MAIN_POINT`, `BIG_NUMBER`
50
+
51
+ ## Colors
52
+
53
+ In `batch_update`, colors use RGB values in 0.0–1.0 range:
54
+ ```json
55
+ { "opaqueColor": { "rgbColor": { "red": 1.0, "green": 0.5, "blue": 0.0 } } }
56
+ ```
@@ -38,4 +38,8 @@ If an endpoint is already clean and self-contained, just proxy it.
38
38
  - `notion/`: clean proxying + optional `prompt.md`
39
39
  - `google-calendar/`: query param building + `read`/`write`/`admin` scopes
40
40
  - `trello/`: query-param credential injection + `displayCards`
41
- - `google-docs/`, `google-slides/`: higher-level write helpers over batchUpdate APIs
41
+ - `google-docs/`, `google-slides/`: higher-level write helpers over batchUpdate APIs
42
+
43
+
44
+
45
+ IMPORTANT: Think through how an AI agent might use an integration and any tweaks to the rest api that might be needed to support actual agentic use cases
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commandable/integration-data",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Integration data (manifests, schemas, handlers, credential configs) for Commandable integrations.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -1,5 +0,0 @@
1
- async (input) => {
2
- const path = `/calendars/${encodeURIComponent(input.calendarId)}/events/${encodeURIComponent(input.eventId)}`
3
- const res = await integration.fetch(path, { method: 'PUT', body: input.body })
4
- return await res.json()
5
- }
@@ -1,10 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "calendarId": { "type": "string" },
5
- "eventId": { "type": "string" },
6
- "body": { "type": "object" }
7
- },
8
- "required": ["calendarId", "eventId", "body"],
9
- "additionalProperties": false
10
- }
@@ -1,12 +0,0 @@
1
- async (input) => {
2
- const { documentId, suggestionsViewMode, includeTabsAndSpaces } = input
3
- const params = new URLSearchParams()
4
- if (suggestionsViewMode)
5
- params.set('suggestionsViewMode', String(suggestionsViewMode))
6
- if (includeTabsAndSpaces !== undefined)
7
- params.set('includeTabsAndSpaces', String(includeTabsAndSpaces))
8
- const qs = params.toString()
9
- const path = `/documents/${encodeURIComponent(documentId)}${qs ? `?${qs}` : ''}`
10
- const res = await integration.fetch(path)
11
- return await res.json()
12
- }
@@ -1,6 +0,0 @@
1
- async (input) => {
2
- const { documentId } = input
3
- const res = await integration.fetch(`/documents/${encodeURIComponent(documentId)}`)
4
- const doc = await res.json()
5
- return { documentId: doc?.documentId || documentId, body: doc?.body }
6
- }
@@ -1,17 +0,0 @@
1
- async (input) => {
2
- const { documentId } = input
3
- const res = await integration.fetch(`/documents/${encodeURIComponent(documentId)}`)
4
- const doc = await res.json()
5
- const content = doc?.body?.content || []
6
- let text = ''
7
- for (const el of content) {
8
- const paragraphs = el.paragraph ? [el.paragraph] : []
9
- for (const p of paragraphs) {
10
- for (const e of p.elements || []) {
11
- text += e.textRun?.content || ''
12
- }
13
- text += '\n'
14
- }
15
- }
16
- return { documentId: doc?.documentId || documentId, text }
17
- }
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "documentId": { "type": "string", "description": "The document ID of the Google Doc." },
6
- "suggestionsViewMode": { "type": "string", "enum": ["DEFAULT_FOR_CURRENT_ACCESS", "SUGGESTIONS_INLINE", "PREVIEW_SUGGESTIONS_ACCEPTED", "PREVIEW_WITHOUT_SUGGESTIONS"], "description": "How to view suggested changes." },
7
- "includeTabsAndSpaces": { "type": "boolean", "description": "Include tabs and spaces in the text content." }
8
- },
9
- "required": ["documentId"],
10
- "additionalProperties": false
11
- }
@@ -1,6 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, dataFilters } = input
3
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchClearByDataFilter`
4
- const res = await integration.fetch(path, { method: 'POST', body: { dataFilters } })
5
- return await res.json()
6
- }
@@ -1,16 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, ranges, majorDimension, valueRenderOption, dateTimeRenderOption } = input
3
- const params = new URLSearchParams()
4
- if (Array.isArray(ranges))
5
- ranges.forEach(r => params.append('ranges', String(r)))
6
- if (majorDimension)
7
- params.set('majorDimension', majorDimension)
8
- if (valueRenderOption)
9
- params.set('valueRenderOption', valueRenderOption)
10
- if (dateTimeRenderOption)
11
- params.set('dateTimeRenderOption', dateTimeRenderOption)
12
- const qs = params.toString()
13
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchGet${qs ? `?${qs}` : ''}`
14
- const res = await integration.fetch(path)
15
- return await res.json()
16
- }
@@ -1,16 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, data, valueInputOption, includeValuesInResponse, responseValueRenderOption, responseDateTimeRenderOption } = input
3
- const params = new URLSearchParams()
4
- if (valueInputOption)
5
- params.set('valueInputOption', valueInputOption)
6
- if (includeValuesInResponse !== undefined)
7
- params.set('includeValuesInResponse', String(includeValuesInResponse))
8
- if (responseValueRenderOption)
9
- params.set('responseValueRenderOption', responseValueRenderOption)
10
- if (responseDateTimeRenderOption)
11
- params.set('responseDateTimeRenderOption', responseDateTimeRenderOption)
12
- const qs = params.toString()
13
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchUpdateByDataFilter${qs ? `?${qs}` : ''}`
14
- const res = await integration.fetch(path, { method: 'POST', body: { data } })
15
- return await res.json()
16
- }
@@ -1,6 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, metadataId } = input
3
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/developerMetadata/${encodeURIComponent(metadataId)}`
4
- const res = await integration.fetch(path)
5
- return await res.json()
6
- }
@@ -1,10 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, dataFilters, includeGridData } = input
3
- const params = new URLSearchParams()
4
- if (includeGridData !== undefined)
5
- params.set('includeGridData', String(includeGridData))
6
- const qs = params.toString()
7
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}:getByDataFilter${qs ? `?${qs}` : ''}`
8
- const res = await integration.fetch(path, { method: 'POST', body: { dataFilters } })
9
- return await res.json()
10
- }
@@ -1,14 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, range, majorDimension, valueRenderOption, dateTimeRenderOption } = input
3
- const params = new URLSearchParams()
4
- if (majorDimension)
5
- params.set('majorDimension', majorDimension)
6
- if (valueRenderOption)
7
- params.set('valueRenderOption', valueRenderOption)
8
- if (dateTimeRenderOption)
9
- params.set('dateTimeRenderOption', dateTimeRenderOption)
10
- const qs = params.toString()
11
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/values/${encodeURIComponent(range)}${qs ? `?${qs}` : ''}`
12
- const res = await integration.fetch(path)
13
- return await res.json()
14
- }
@@ -1,14 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, dataFilters, majorDimension, valueRenderOption, dateTimeRenderOption } = input
3
- const params = new URLSearchParams()
4
- if (majorDimension)
5
- params.set('majorDimension', majorDimension)
6
- if (valueRenderOption)
7
- params.set('valueRenderOption', valueRenderOption)
8
- if (dateTimeRenderOption)
9
- params.set('dateTimeRenderOption', dateTimeRenderOption)
10
- const qs = params.toString()
11
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/values:batchGetByDataFilter${qs ? `?${qs}` : ''}`
12
- const res = await integration.fetch(path, { method: 'POST', body: { dataFilters } })
13
- return await res.json()
14
- }