@commandable/integration-data 0.0.4 → 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 (187) 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/airtable/__tests__/get_handlers.test.ts +25 -16
  5. package/integrations/github/__tests__/get_handlers.test.ts +202 -7
  6. package/integrations/github/__tests__/write_handlers.test.ts +178 -24
  7. package/integrations/github/handlers/create_commit.js +5 -12
  8. package/integrations/github/handlers/create_pull_request_review.js +10 -0
  9. package/integrations/github/handlers/create_release.js +14 -0
  10. package/integrations/github/handlers/delete_branch.js +8 -0
  11. package/integrations/github/handlers/delete_file.js +9 -0
  12. package/integrations/github/handlers/fork_repo.js +10 -0
  13. package/integrations/github/handlers/get_commit.js +8 -0
  14. package/integrations/github/handlers/get_file_contents.js +21 -0
  15. package/integrations/github/handlers/get_job_logs.js +6 -0
  16. package/integrations/github/handlers/get_latest_release.js +4 -0
  17. package/integrations/github/handlers/get_me.js +4 -0
  18. package/integrations/github/handlers/get_pull_request.js +4 -0
  19. package/integrations/github/handlers/get_pull_request_diff.js +8 -0
  20. package/integrations/github/handlers/get_repo_tree.js +12 -0
  21. package/integrations/github/handlers/get_workflow_run.js +4 -0
  22. package/integrations/github/handlers/list_branches.js +6 -1
  23. package/integrations/github/handlers/list_commits.js +5 -6
  24. package/integrations/github/handlers/list_issue_comments.js +8 -0
  25. package/integrations/github/handlers/list_issues.js +5 -6
  26. package/integrations/github/handlers/list_labels.js +8 -0
  27. package/integrations/github/handlers/list_pull_request_comments.js +8 -0
  28. package/integrations/github/handlers/list_pull_request_files.js +8 -0
  29. package/integrations/github/handlers/list_pull_requests.js +7 -2
  30. package/integrations/github/handlers/list_releases.js +8 -0
  31. package/integrations/github/handlers/list_tags.js +8 -0
  32. package/integrations/github/handlers/list_workflow_runs.js +11 -0
  33. package/integrations/github/handlers/request_pull_request_reviewers.js +10 -0
  34. package/integrations/github/handlers/search_code.js +8 -0
  35. package/integrations/github/handlers/search_issues.js +8 -0
  36. package/integrations/github/handlers/search_pull_requests.js +8 -0
  37. package/integrations/github/handlers/search_repos.js +10 -0
  38. package/integrations/github/handlers/update_pull_request.js +13 -0
  39. package/integrations/github/manifest.json +58 -20
  40. package/integrations/github/schemas/create_pull_request_review.json +17 -0
  41. package/integrations/github/schemas/create_release.json +16 -0
  42. package/integrations/github/schemas/delete_branch.json +10 -0
  43. package/integrations/github/schemas/delete_file.json +13 -0
  44. package/integrations/github/schemas/fork_repo.json +11 -0
  45. package/integrations/github/schemas/get_commit.json +12 -0
  46. package/integrations/github/schemas/get_file_contents.json +11 -0
  47. package/integrations/github/schemas/get_job_logs.json +10 -0
  48. package/integrations/github/schemas/get_pull_request.json +10 -0
  49. package/integrations/github/schemas/get_pull_request_diff.json +10 -0
  50. package/integrations/github/schemas/get_repo_tree.json +12 -0
  51. package/integrations/github/schemas/get_workflow_run.json +10 -0
  52. package/integrations/github/schemas/list_branches.json +12 -0
  53. package/integrations/github/schemas/list_commits.json +5 -3
  54. package/integrations/github/schemas/list_issue_comments.json +12 -0
  55. package/integrations/github/schemas/list_issues.json +4 -2
  56. package/integrations/github/schemas/list_labels.json +11 -0
  57. package/integrations/github/schemas/list_pull_request_comments.json +12 -0
  58. package/integrations/github/schemas/list_pull_request_files.json +12 -0
  59. package/integrations/github/schemas/list_pull_requests.json +7 -1
  60. package/integrations/github/schemas/list_releases.json +11 -0
  61. package/integrations/github/schemas/list_tags.json +11 -0
  62. package/integrations/github/schemas/list_workflow_runs.json +18 -0
  63. package/integrations/github/schemas/request_pull_request_reviewers.json +20 -0
  64. package/integrations/github/schemas/search_code.json +10 -0
  65. package/integrations/github/schemas/search_issues.json +10 -0
  66. package/integrations/github/schemas/search_pull_requests.json +10 -0
  67. package/integrations/github/schemas/search_repos.json +12 -0
  68. package/integrations/github/schemas/update_pull_request.json +15 -0
  69. package/integrations/google-calendar/__tests__/write_and_admin_handlers.test.ts +0 -13
  70. package/integrations/google-calendar/handlers/get_event.js +5 -1
  71. package/integrations/google-calendar/handlers/list_events.js +2 -0
  72. package/integrations/google-calendar/manifest.json +17 -18
  73. package/integrations/google-calendar/prompt.md +68 -0
  74. package/integrations/google-calendar/schemas/id_calendar_event.json +4 -2
  75. package/integrations/google-calendar/schemas/list_events.json +10 -8
  76. package/integrations/google-docs/__tests__/get_handlers.test.ts +5 -20
  77. package/integrations/google-docs/__tests__/write_handlers.test.ts +38 -52
  78. package/integrations/google-docs/handlers/insert_inline_image_after_first_match.js +1 -1
  79. package/integrations/google-docs/handlers/read_document.js +189 -0
  80. package/integrations/google-docs/manifest.json +16 -31
  81. package/integrations/google-docs/prompt.md +49 -0
  82. package/integrations/google-docs/schemas/insert_inline_image_after_first_match.json +0 -1
  83. package/integrations/google-docs/schemas/{get_document_text.json → read_document.json} +5 -2
  84. package/integrations/google-docs/todo.md +18 -0
  85. package/integrations/google-drive/__tests__/handlers.test.ts +145 -0
  86. package/integrations/google-drive/__tests__/usage_parity.test.ts +9 -0
  87. package/integrations/google-drive/handlers/get_file.js +2 -4
  88. package/integrations/google-drive/handlers/get_file_content.js +41 -0
  89. package/integrations/google-drive/handlers/list_files.js +15 -0
  90. package/integrations/google-drive/handlers/search_files.js +20 -0
  91. package/integrations/google-drive/handlers/share_file.js +20 -0
  92. package/integrations/google-drive/manifest.json +37 -10
  93. package/integrations/google-drive/prompt.md +59 -0
  94. package/integrations/google-drive/schemas/get_file.json +2 -2
  95. package/integrations/google-drive/schemas/get_file_content.json +11 -0
  96. package/integrations/google-drive/schemas/list_files.json +12 -0
  97. package/integrations/google-drive/schemas/search_files.json +14 -0
  98. package/integrations/google-drive/schemas/share_file.json +23 -0
  99. package/integrations/google-gmail/__tests__/get_handlers.test.ts +134 -0
  100. package/integrations/google-gmail/__tests__/usage_parity.test.ts +9 -0
  101. package/integrations/google-gmail/__tests__/write_and_admin_handlers.test.ts +211 -0
  102. package/integrations/google-gmail/credentials.json +57 -0
  103. package/integrations/google-gmail/credentials_hint_oauth_token.md +8 -0
  104. package/integrations/google-gmail/credentials_hint_service_account.md +10 -0
  105. package/integrations/google-gmail/handlers/create_draft_email.js +27 -0
  106. package/integrations/google-gmail/handlers/create_label.js +12 -0
  107. package/integrations/google-gmail/handlers/delete_draft.js +13 -0
  108. package/integrations/google-gmail/handlers/delete_label.js +13 -0
  109. package/integrations/google-gmail/handlers/delete_message.js +13 -0
  110. package/integrations/google-gmail/handlers/delete_thread.js +13 -0
  111. package/integrations/google-gmail/handlers/get_draft.js +6 -0
  112. package/integrations/google-gmail/handlers/get_label.js +6 -0
  113. package/integrations/google-gmail/handlers/get_message.js +14 -0
  114. package/integrations/google-gmail/handlers/get_profile.js +5 -0
  115. package/integrations/google-gmail/handlers/get_thread.js +14 -0
  116. package/integrations/google-gmail/handlers/list_drafts.js +15 -0
  117. package/integrations/google-gmail/handlers/list_labels.js +5 -0
  118. package/integrations/google-gmail/handlers/list_messages.js +19 -0
  119. package/integrations/google-gmail/handlers/list_threads.js +19 -0
  120. package/integrations/google-gmail/handlers/modify_message.js +11 -0
  121. package/integrations/google-gmail/handlers/modify_thread.js +11 -0
  122. package/integrations/google-gmail/handlers/read_email.js +56 -0
  123. package/integrations/google-gmail/handlers/send_draft.js +15 -0
  124. package/integrations/google-gmail/handlers/send_email.js +22 -0
  125. package/integrations/google-gmail/handlers/trash_message.js +6 -0
  126. package/integrations/google-gmail/handlers/trash_thread.js +6 -0
  127. package/integrations/google-gmail/handlers/untrash_message.js +6 -0
  128. package/integrations/google-gmail/handlers/untrash_thread.js +6 -0
  129. package/integrations/google-gmail/handlers/update_label.js +15 -0
  130. package/integrations/google-gmail/manifest.json +33 -0
  131. package/integrations/google-gmail/prompt.md +52 -0
  132. package/integrations/google-gmail/schemas/create_draft_email.json +16 -0
  133. package/integrations/google-gmail/schemas/create_label.json +26 -0
  134. package/integrations/google-gmail/schemas/get_message.json +20 -0
  135. package/integrations/{google-docs/schemas/get_document_structured.json → google-gmail/schemas/get_profile.json} +4 -2
  136. package/integrations/google-gmail/schemas/get_thread.json +20 -0
  137. package/integrations/google-gmail/schemas/id_draft.json +16 -0
  138. package/integrations/google-gmail/schemas/id_label.json +16 -0
  139. package/integrations/google-gmail/schemas/id_message.json +16 -0
  140. package/integrations/google-gmail/schemas/id_thread.json +16 -0
  141. package/integrations/google-gmail/schemas/list_drafts.json +30 -0
  142. package/integrations/{google-sheet/schemas/get_developer_metadata.json → google-gmail/schemas/list_labels.json} +4 -3
  143. package/integrations/google-gmail/schemas/list_messages.json +35 -0
  144. package/integrations/google-gmail/schemas/list_threads.json +35 -0
  145. package/integrations/google-gmail/schemas/modify_message.json +24 -0
  146. package/integrations/google-gmail/schemas/modify_thread.json +24 -0
  147. package/integrations/google-gmail/schemas/read_email.json +10 -0
  148. package/integrations/google-gmail/schemas/send_draft.json +29 -0
  149. package/integrations/google-gmail/schemas/send_email.json +17 -0
  150. package/integrations/google-gmail/schemas/update_label.json +33 -0
  151. package/integrations/google-sheet/__tests__/get_handlers.test.ts +7 -52
  152. package/integrations/google-sheet/__tests__/write_handlers.test.ts +1 -20
  153. package/integrations/google-sheet/handlers/get_spreadsheet.js +2 -0
  154. package/integrations/google-sheet/handlers/read_sheet.js +75 -0
  155. package/integrations/google-sheet/manifest.json +13 -62
  156. package/integrations/google-sheet/prompt.md +49 -0
  157. package/integrations/google-sheet/schemas/get_spreadsheet.json +5 -4
  158. package/integrations/google-sheet/schemas/read_sheet.json +21 -0
  159. package/integrations/google-slides/__tests__/get_handlers.test.ts +13 -9
  160. package/integrations/google-slides/__tests__/write_handlers.test.ts +4 -5
  161. package/integrations/google-slides/handlers/read_presentation.js +51 -0
  162. package/integrations/google-slides/manifest.json +13 -13
  163. package/integrations/google-slides/prompt.md +56 -0
  164. package/integrations/new_integration_prompt.md +5 -1
  165. package/package.json +1 -1
  166. package/integrations/google-calendar/handlers/update_event.js +0 -5
  167. package/integrations/google-calendar/schemas/update_event.json +0 -10
  168. package/integrations/google-docs/handlers/get_document.js +0 -12
  169. package/integrations/google-docs/handlers/get_document_structured.js +0 -6
  170. package/integrations/google-docs/handlers/get_document_text.js +0 -17
  171. package/integrations/google-docs/schemas/get_document.json +0 -11
  172. package/integrations/google-sheet/handlers/batch_clear_values_by_data_filter.js +0 -6
  173. package/integrations/google-sheet/handlers/batch_get_values.js +0 -16
  174. package/integrations/google-sheet/handlers/batch_update_values_by_data_filter.js +0 -16
  175. package/integrations/google-sheet/handlers/get_developer_metadata.js +0 -6
  176. package/integrations/google-sheet/handlers/get_spreadsheet_by_data_filter.js +0 -10
  177. package/integrations/google-sheet/handlers/get_values.js +0 -14
  178. package/integrations/google-sheet/handlers/get_values_by_data_filter.js +0 -14
  179. package/integrations/google-sheet/handlers/search_developer_metadata.js +0 -7
  180. package/integrations/google-sheet/schemas/batch_clear_values_by_data_filter.json +0 -10
  181. package/integrations/google-sheet/schemas/batch_get_values.json +0 -13
  182. package/integrations/google-sheet/schemas/batch_update_values_by_data_filter.json +0 -25
  183. package/integrations/google-sheet/schemas/get_spreadsheet_by_data_filter.json +0 -11
  184. package/integrations/google-sheet/schemas/get_values.json +0 -13
  185. package/integrations/google-sheet/schemas/get_values_by_data_filter.json +0 -17
  186. package/integrations/google-sheet/schemas/search_developer_metadata.json +0 -14
  187. package/integrations/google-slides/handlers/get_presentation.js +0 -6
@@ -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.4",
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
- }
@@ -1,7 +0,0 @@
1
- async (input) => {
2
- const { spreadsheetId, dataFilters } = input
3
- // Correct endpoint per Sheets API: /spreadsheets/{spreadsheetId}/developerMetadata:search
4
- const path = `/spreadsheets/${encodeURIComponent(spreadsheetId)}/developerMetadata:search`
5
- const res = await integration.fetch(path, { method: 'POST', body: { dataFilters } })
6
- return await res.json()
7
- }
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId", "dataFilters"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "dataFilters": { "type": "array", "items": { "type": "object" } }
8
- },
9
- "additionalProperties": false
10
- }
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId", "ranges"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "ranges": { "type": "array", "items": { "type": "string" } },
8
- "majorDimension": { "type": "string", "enum": ["ROWS", "COLUMNS"] },
9
- "valueRenderOption": { "type": "string", "enum": ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"] },
10
- "dateTimeRenderOption": { "type": "string", "enum": ["SERIAL_NUMBER", "FORMATTED_STRING"] }
11
- },
12
- "additionalProperties": false
13
- }
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId", "data"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "data": {
8
- "type": "array",
9
- "items": {
10
- "type": "object",
11
- "required": ["dataFilter", "values"],
12
- "properties": {
13
- "dataFilter": { "type": "object" },
14
- "values": { "type": "array", "items": { "type": "array", "items": {} } },
15
- "majorDimension": { "type": "string", "enum": ["ROWS", "COLUMNS"] }
16
- }
17
- }
18
- },
19
- "valueInputOption": { "type": "string", "enum": ["RAW", "USER_ENTERED"] },
20
- "includeValuesInResponse": { "type": "boolean" },
21
- "responseValueRenderOption": { "type": "string", "enum": ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"] },
22
- "responseDateTimeRenderOption": { "type": "string", "enum": ["SERIAL_NUMBER", "FORMATTED_STRING"] }
23
- },
24
- "additionalProperties": false
25
- }
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "dataFilters": { "type": "array", "items": { "type": "object" } },
8
- "includeGridData": { "type": "boolean" }
9
- },
10
- "additionalProperties": true
11
- }
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId", "range"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "range": { "type": "string", "description": "A1 notation range" },
8
- "majorDimension": { "type": "string", "enum": ["ROWS", "COLUMNS"], "description": "Return values by rows or columns" },
9
- "valueRenderOption": { "type": "string", "enum": ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"] },
10
- "dateTimeRenderOption": { "type": "string", "enum": ["SERIAL_NUMBER", "FORMATTED_STRING"] }
11
- },
12
- "additionalProperties": false
13
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId", "dataFilters"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "dataFilters": {
8
- "type": "array",
9
- "items": { "type": "object" },
10
- "description": "Array of DataFilter objects per Sheets API"
11
- },
12
- "majorDimension": { "type": "string", "enum": ["ROWS", "COLUMNS"] },
13
- "valueRenderOption": { "type": "string", "enum": ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"] },
14
- "dateTimeRenderOption": { "type": "string", "enum": ["SERIAL_NUMBER", "FORMATTED_STRING"] }
15
- },
16
- "additionalProperties": false
17
- }
@@ -1,14 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "required": ["spreadsheetId", "dataFilters"],
5
- "properties": {
6
- "spreadsheetId": { "type": "string" },
7
- "dataFilters": {
8
- "type": "array",
9
- "items": { "type": "object" },
10
- "description": "DeveloperMetadataLookup wrapped in DataFilter objects"
11
- }
12
- },
13
- "additionalProperties": false
14
- }
@@ -1,6 +0,0 @@
1
- async (input) => {
2
- const { presentationId } = input
3
- const path = `/presentations/${encodeURIComponent(presentationId)}`
4
- const res = await integration.fetch(path)
5
- return await res.json()
6
- }