diff --git a/apps/docs/content/docs/en/tools/github.mdx b/apps/docs/content/docs/en/tools/github.mdx index ef05e6ae91..a97956d3bb 100644 --- a/apps/docs/content/docs/en/tools/github.mdx +++ b/apps/docs/content/docs/en/tools/github.mdx @@ -1535,4 +1535,1433 @@ Delete a GitHub Project V2. This action is permanent and cannot be undone. Requi | `number` | number | Deleted project number | | `url` | string | Deleted project URL | +### `github_search_code` + +Search for code across GitHub repositories. Use qualifiers like repo:owner/name, language:js, path:src, extension:py + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `q` | string | Yes | Search query with optional qualifiers \(repo:, language:, path:, extension:, user:, org:\) | +| `sort` | string | No | Sort by indexed date \(default: best match\) | +| `order` | string | No | Sort order: asc or desc \(default: desc\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `total_count` | number | Total matching results | +| `incomplete_results` | boolean | Whether results are incomplete | +| `items` | array | Array of code matches from GitHub API | +| ↳ `name` | string | Repository name | +| ↳ `path` | string | File path | +| ↳ `sha` | string | Blob SHA | +| ↳ `url` | string | API URL | +| ↳ `git_url` | string | Git blob URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `score` | number | Search relevance score | +| ↳ `repository` | object | Repository containing the code | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `name` | string | Repository name | +| ↳ `full_name` | string | Full name \(owner/repo\) | +| ↳ `private` | boolean | Whether repository is private | +| ↳ `html_url` | string | Profile page URL | +| ↳ `description` | string | Repository description | +| ↳ `fork` | boolean | Whether this is a fork | +| ↳ `url` | string | API URL | +| ↳ `owner` | object | Repository owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `full_name` | string | Full name \(owner/repo\) | +| ↳ `private` | boolean | Whether repository is private | +| ↳ `description` | string | Repository description | +| ↳ `fork` | boolean | Whether this is a fork | +| ↳ `owner` | object | Repository owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `text_matches` | array | Text matches showing context | +| ↳ `object_url` | string | Object URL | +| ↳ `object_type` | string | Object type | +| ↳ `property` | string | Property matched | +| ↳ `fragment` | string | Text fragment with match | +| ↳ `matches` | array | Match indices | +| ↳ `text` | string | Matched text | +| ↳ `indices` | array | Start and end indices | +| ↳ `text` | string | Matched text | +| ↳ `indices` | array | Start and end indices | +| ↳ `object_url` | string | Object URL | +| ↳ `object_type` | string | Object type | +| ↳ `property` | string | Property matched | +| ↳ `fragment` | string | Text fragment with match | +| ↳ `matches` | array | Match indices | +| ↳ `text` | string | Matched text | +| ↳ `indices` | array | Start and end indices | +| ↳ `text` | string | Matched text | +| ↳ `indices` | array | Start and end indices | + +### `github_search_commits` + +Search for commits across GitHub. Use qualifiers like repo:owner/name, author:user, committer:user, author-date:>2023-01-01 + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `q` | string | Yes | Search query with optional qualifiers \(repo:, author:, committer:, author-date:, committer-date:, merge:true/false\) | +| `sort` | string | No | Sort by: author-date or committer-date \(default: best match\) | +| `order` | string | No | Sort order: asc or desc \(default: desc\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `total_count` | number | Total matching results | +| `incomplete_results` | boolean | Whether results are incomplete | +| `items` | array | Array of commit objects from GitHub API | +| ↳ `sha` | string | Parent SHA | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `html_url` | string | Parent web URL | +| ↳ `url` | string | Parent API URL | +| ↳ `comments_url` | string | Comments API URL | +| ↳ `score` | number | Search relevance score | +| ↳ `commit` | object | Core commit data | +| ↳ `url` | string | Tree API URL | +| ↳ `message` | string | Commit message | +| ↳ `comment_count` | number | Number of comments | +| ↳ `author` | object | Git author | +| ↳ `name` | string | Author name | +| ↳ `email` | string | Author email | +| ↳ `date` | string | Author date \(ISO 8601\) | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `committer` | object | Git committer | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `tree` | object | Tree object | +| ↳ `sha` | string | Tree SHA | +| ↳ `url` | string | Tree API URL | +| ↳ `sha` | string | Tree SHA | +| ↳ `message` | string | Commit message | +| ↳ `comment_count` | number | Number of comments | +| ↳ `author` | object | GitHub user \(author\) | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `name` | string | Repository name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `committer` | object | GitHub user \(committer\) | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `tree` | object | Tree object | +| ↳ `sha` | string | Tree SHA | +| ↳ `url` | string | Tree API URL | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `repository` | object | Repository containing the commit | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `name` | string | Repository name | +| ↳ `full_name` | string | Full name \(owner/repo\) | +| ↳ `private` | boolean | Whether repository is private | +| ↳ `html_url` | string | Profile page URL | +| ↳ `description` | string | Repository description | +| ↳ `owner` | object | Repository owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `full_name` | string | Full name \(owner/repo\) | +| ↳ `private` | boolean | Whether repository is private | +| ↳ `description` | string | Repository description | +| ↳ `owner` | object | Repository owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `parents` | array | Parent commits | +| ↳ `sha` | string | Parent SHA | +| ↳ `url` | string | Parent API URL | +| ↳ `html_url` | string | Parent web URL | + +### `github_search_issues` + +Search for issues and pull requests across GitHub. Use qualifiers like repo:owner/name, is:issue, is:pr, state:open, label:bug, author:user + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `q` | string | Yes | Search query with optional qualifiers \(repo:, is:issue, is:pr, state:, label:, author:, assignee:\) | +| `sort` | string | No | Sort by: comments, reactions, created, updated, interactions \(default: best match\) | +| `order` | string | No | Sort order: asc or desc \(default: desc\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `total_count` | number | Total matching results | +| `incomplete_results` | boolean | Whether results are incomplete | +| `items` | array | Array of issue/PR objects from GitHub API | +| ↳ `id` | number | Milestone ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `number` | number | Milestone number | +| ↳ `title` | string | Milestone title | +| ↳ `state` | string | State \(open or closed\) | +| ↳ `locked` | boolean | Whether issue is locked | +| ↳ `html_url` | string | Web URL | +| ↳ `url` | string | API URL | +| ↳ `repository_url` | string | Repository API URL | +| ↳ `comments_url` | string | Comments API URL | +| ↳ `body` | string | Body text | +| ↳ `comments` | number | Number of comments | +| ↳ `score` | number | Search relevance score | +| ↳ `created_at` | string | Creation timestamp | +| ↳ `updated_at` | string | Last update timestamp | +| ↳ `closed_at` | string | Close timestamp | +| ↳ `user` | object | Issue author | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `labels` | array | Issue labels | +| ↳ `id` | number | Label ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `url` | string | API URL | +| ↳ `name` | string | Label name | +| ↳ `description` | string | Label description | +| ↳ `color` | string | Hex color code | +| ↳ `default` | boolean | Whether this is a default label | +| ↳ `name` | string | Label name | +| ↳ `description` | string | Milestone description | +| ↳ `color` | string | Hex color code | +| ↳ `default` | boolean | Whether this is a default label | +| ↳ `assignee` | object | Primary assignee | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `assignees` | array | All assignees | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `milestone` | object | Associated milestone | +| ↳ `id` | number | Milestone ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `number` | number | Milestone number | +| ↳ `title` | string | Milestone title | +| ↳ `description` | string | Milestone description | +| ↳ `state` | string | State \(open or closed\) | +| ↳ `html_url` | string | Web URL | +| ↳ `due_on` | string | Due date | +| ↳ `due_on` | string | Due date | +| ↳ `pull_request` | object | Pull request details \(if this is a PR\) | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Web URL | +| ↳ `diff_url` | string | Diff URL | +| ↳ `patch_url` | string | Patch URL | +| ↳ `diff_url` | string | Diff URL | +| ↳ `patch_url` | string | Patch URL | + +### `github_search_repos` + +Search for repositories across GitHub. Use qualifiers like language:python, stars:>1000, topic:react, user:owner, org:name + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `q` | string | Yes | Search query with optional qualifiers \(language:, stars:, forks:, topic:, user:, org:, in:name,description,readme\) | +| `sort` | string | No | Sort by: stars, forks, help-wanted-issues, updated \(default: best match\) | +| `order` | string | No | Sort order: asc or desc \(default: desc\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `total_count` | number | Total matching results | +| `incomplete_results` | boolean | Whether results are incomplete | +| `items` | array | Array of repository objects from GitHub API | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `name` | string | License name | +| ↳ `full_name` | string | Full name \(owner/repo\) | +| ↳ `private` | boolean | Whether repository is private | +| ↳ `description` | string | Repository description | +| ↳ `html_url` | string | Profile page URL | +| ↳ `url` | string | API URL | +| ↳ `fork` | boolean | Whether this is a fork | +| ↳ `created_at` | string | Creation timestamp | +| ↳ `updated_at` | string | Last update timestamp | +| ↳ `pushed_at` | string | Last push timestamp | +| ↳ `size` | number | Repository size in KB | +| ↳ `stargazers_count` | number | Number of stars | +| ↳ `watchers_count` | number | Number of watchers | +| ↳ `forks_count` | number | Number of forks | +| ↳ `open_issues_count` | number | Number of open issues | +| ↳ `language` | string | Primary programming language | +| ↳ `default_branch` | string | Default branch name | +| ↳ `score` | number | Search relevance score | +| ↳ `topics` | array | Repository topics | +| ↳ `license` | object | License information | +| ↳ `key` | string | License key \(e.g., mit\) | +| ↳ `name` | string | License name | +| ↳ `spdx_id` | string | SPDX identifier | +| ↳ `key` | string | License key \(e.g., mit\) | +| ↳ `spdx_id` | string | SPDX identifier | +| ↳ `owner` | object | Repository owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_search_users` + +Search for users and organizations on GitHub. Use qualifiers like type:user, type:org, followers:>1000, repos:>10, location:city + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `q` | string | Yes | Search query with optional qualifiers \(type:user/org, followers:, repos:, location:, language:, created:\) | +| `sort` | string | No | Sort by: followers, repositories, joined \(default: best match\) | +| `order` | string | No | Sort order: asc or desc \(default: desc\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `total_count` | number | Total matching results | +| `incomplete_results` | boolean | Whether results are incomplete | +| `items` | array | Array of user objects from GitHub API | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `gravatar_id` | string | Gravatar ID | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `followers_url` | string | Followers API URL | +| ↳ `following_url` | string | Following API URL | +| ↳ `gists_url` | string | Gists API URL | +| ↳ `starred_url` | string | Starred API URL | +| ↳ `repos_url` | string | Repos API URL | +| ↳ `organizations_url` | string | Organizations API URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `score` | number | Search relevance score | + +### `github_list_commits` + +List commits in a repository with optional filtering by SHA, path, author, committer, or date range + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `sha` | string | No | SHA or branch to start listing commits from | +| `path` | string | No | Only commits containing this file path | +| `author` | string | No | GitHub login or email address to filter by author | +| `committer` | string | No | GitHub login or email address to filter by committer | +| `since` | string | No | Only commits after this date \(ISO 8601 format\) | +| `until` | string | No | Only commits before this date \(ISO 8601 format\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Array of commit objects from GitHub API | +| ↳ `sha` | string | Parent SHA | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `html_url` | string | Parent web URL | +| ↳ `url` | string | Parent API URL | +| ↳ `comments_url` | string | Comments API URL | +| ↳ `commit` | object | Core commit data | +| ↳ `url` | string | Tree API URL | +| ↳ `message` | string | Commit message | +| ↳ `comment_count` | number | Number of comments | +| ↳ `author` | object | Git author | +| ↳ `name` | string | Author name | +| ↳ `email` | string | Author email | +| ↳ `date` | string | Author date \(ISO 8601\) | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `committer` | object | Git committer | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `tree` | object | Tree object | +| ↳ `sha` | string | Tree SHA | +| ↳ `url` | string | Tree API URL | +| ↳ `sha` | string | Tree SHA | +| ↳ `verification` | object | Signature verification | +| ↳ `verified` | boolean | Whether signature is verified | +| ↳ `reason` | string | Verification reason | +| ↳ `signature` | string | GPG signature | +| ↳ `payload` | string | Signed payload | +| ↳ `verified` | boolean | Whether signature is verified | +| ↳ `reason` | string | Verification reason | +| ↳ `signature` | string | GPG signature | +| ↳ `payload` | string | Signed payload | +| ↳ `message` | string | Commit message | +| ↳ `comment_count` | number | Number of comments | +| ↳ `author` | object | GitHub user \(author\) | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `committer` | object | GitHub user \(committer\) | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `tree` | object | Tree object | +| ↳ `sha` | string | Tree SHA | +| ↳ `url` | string | Tree API URL | +| ↳ `verification` | object | Signature verification | +| ↳ `verified` | boolean | Whether signature is verified | +| ↳ `reason` | string | Verification reason | +| ↳ `signature` | string | GPG signature | +| ↳ `payload` | string | Signed payload | +| ↳ `verified` | boolean | Whether signature is verified | +| ↳ `reason` | string | Verification reason | +| ↳ `signature` | string | GPG signature | +| ↳ `payload` | string | Signed payload | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `parents` | array | Parent commits | +| ↳ `sha` | string | Parent SHA | +| ↳ `url` | string | Parent API URL | +| ↳ `html_url` | string | Parent web URL | +| `count` | number | Number of commits returned | + +### `github_get_commit` + +Get detailed information about a specific commit including files changed and stats + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `ref` | string | Yes | Commit SHA, branch name, or tag name | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sha` | string | Commit SHA | +| `node_id` | string | GraphQL node ID | +| `html_url` | string | GitHub web URL | +| `url` | string | API URL | +| `comments_url` | string | Comments API URL | +| `commit` | object | Core commit data | +| ↳ `url` | string | Tree API URL | +| ↳ `message` | string | Commit message | +| ↳ `comment_count` | number | Number of comments | +| ↳ `author` | object | Git author | +| ↳ `name` | string | Author name | +| ↳ `email` | string | Author email | +| ↳ `date` | string | Author date \(ISO 8601\) | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `committer` | object | Git committer | +| ↳ `name` | string | Committer name | +| ↳ `email` | string | Committer email | +| ↳ `date` | string | Commit date \(ISO 8601\) | +| ↳ `tree` | object | Tree object | +| ↳ `sha` | string | Tree SHA | +| ↳ `url` | string | Tree API URL | +| ↳ `sha` | string | Tree SHA | +| ↳ `verification` | object | Signature verification | +| ↳ `verified` | boolean | Whether signature is verified | +| ↳ `reason` | string | Verification reason | +| ↳ `signature` | string | GPG signature | +| ↳ `payload` | string | Signed payload | +| ↳ `verified` | boolean | Whether signature is verified | +| ↳ `reason` | string | Verification reason | +| ↳ `signature` | string | GPG signature | +| ↳ `payload` | string | Signed payload | +| `author` | object | GitHub user \(author\) | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `html_url` | string | Profile URL | +| ↳ `type` | string | User or Organization | +| `committer` | object | GitHub user \(committer\) | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `avatar_url` | string | Avatar URL | +| ↳ `html_url` | string | Profile URL | +| ↳ `type` | string | User or Organization | +| `stats` | object | Change statistics | +| ↳ `additions` | number | Lines added | +| ↳ `deletions` | number | Lines deleted | +| ↳ `total` | number | Total changes | +| `files` | array | Changed files \(diff entries\) | +| ↳ `sha` | string | Blob SHA | +| ↳ `filename` | string | File path | +| ↳ `status` | string | Change status \(added, removed, modified, renamed, copied, changed, unchanged\) | +| ↳ `additions` | number | Lines added | +| ↳ `deletions` | number | Lines deleted | +| ↳ `changes` | number | Total changes | +| ↳ `blob_url` | string | Blob URL | +| ↳ `raw_url` | string | Raw file URL | +| ↳ `contents_url` | string | Contents API URL | +| ↳ `patch` | string | Diff patch | +| ↳ `previous_filename` | string | Previous filename \(for renames\) | +| `parents` | array | Parent commits | +| ↳ `sha` | string | Parent SHA | +| ↳ `url` | string | Parent API URL | +| ↳ `html_url` | string | Parent web URL | + +### `github_compare_commits` + +Compare two commits or branches to see the diff, commits between them, and changed files + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `base` | string | Yes | Base branch/tag/SHA for comparison | +| `head` | string | Yes | Head branch/tag/SHA for comparison | +| `per_page` | number | No | Results per page for files \(max 100, default: 30\) | +| `page` | number | No | Page number for files \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `url` | string | API URL | +| `html_url` | string | GitHub web URL | +| `permalink_url` | string | Permanent link URL | +| `diff_url` | string | Diff download URL | +| `patch_url` | string | Patch download URL | +| `status` | string | Comparison status \(ahead, behind, identical, diverged\) | +| `ahead_by` | number | Commits head is ahead of base | +| `behind_by` | number | Commits head is behind base | +| `total_commits` | number | Total commits in comparison | +| `base_commit` | object | Base commit object | +| ↳ `sha` | string | Commit SHA | +| ↳ `html_url` | string | Web URL | +| ↳ `commit` | object | Commit data | +| ↳ `message` | string | Commit message | +| ↳ `author` | object | Git author \(name, email, date\) | +| ↳ `committer` | object | Git committer \(name, email, date\) | +| ↳ `message` | string | Commit message | +| ↳ `author` | object | GitHub user \(author\) | +| ↳ `committer` | object | GitHub user \(committer\) | +| `merge_base_commit` | object | Merge base commit object | +| ↳ `sha` | string | Commit SHA | +| ↳ `html_url` | string | Web URL | +| `commits` | array | Commits between base and head | +| ↳ `sha` | string | Commit SHA | +| ↳ `html_url` | string | Web URL | +| ↳ `commit` | object | Commit data | +| ↳ `message` | string | Commit message | +| ↳ `author` | object | Git author \(name, email, date\) | +| ↳ `committer` | object | Git committer \(name, email, date\) | +| ↳ `message` | string | Commit message | +| ↳ `author` | object | GitHub user | +| ↳ `committer` | object | GitHub user | +| `files` | array | Changed files \(diff entries\) | +| ↳ `sha` | string | Blob SHA | +| ↳ `filename` | string | File path | +| ↳ `status` | string | Change status \(added, removed, modified, renamed, copied, changed, unchanged\) | +| ↳ `additions` | number | Lines added | +| ↳ `deletions` | number | Lines deleted | +| ↳ `changes` | number | Total changes | +| ↳ `blob_url` | string | Blob URL | +| ↳ `raw_url` | string | Raw file URL | +| ↳ `contents_url` | string | Contents API URL | +| ↳ `patch` | string | Diff patch | +| ↳ `previous_filename` | string | Previous filename \(for renames\) | + +### `github_create_gist` + +Create a new gist with one or more files + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `description` | string | No | Description of the gist | +| `files` | json | Yes | JSON object with filenames as keys and content as values. Example: \{"file.txt": \{"content": "Hello"\}\} | +| `Example` | string | No | No description | +| `public` | boolean | No | Whether the gist is public \(default: false\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Gist ID | +| `node_id` | string | GraphQL node ID | +| `url` | string | API URL | +| `html_url` | string | Web URL | +| `forks_url` | string | Forks API URL | +| `commits_url` | string | Commits API URL | +| `git_pull_url` | string | Git pull URL | +| `git_push_url` | string | Git push URL | +| `description` | string | Gist description | +| `public` | boolean | Whether gist is public | +| `truncated` | boolean | Whether files are truncated | +| `comments` | number | Number of comments | +| `comments_url` | string | Comments API URL | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Last update timestamp | +| `files` | object | Files in the gist \(object with filenames as keys, each containing filename, type, language, raw_url, size, truncated, content\) | +| `owner` | object | Gist owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_get_gist` + +Get a gist by ID including its file contents + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `gist_id` | string | Yes | The gist ID | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Gist ID | +| `node_id` | string | GraphQL node ID | +| `html_url` | string | GitHub web URL | +| `url` | string | API URL | +| `forks_url` | string | Forks API URL | +| `commits_url` | string | Commits API URL | +| `git_pull_url` | string | Git clone URL | +| `git_push_url` | string | Git push URL | +| `description` | string | Gist description | +| `public` | boolean | Whether gist is public | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Last update timestamp | +| `comments` | number | Number of comments | +| `comments_url` | string | Comments API URL | +| `truncated` | boolean | Whether content is truncated | +| `files` | object | Files in the gist \(keyed by filename\) | +| ↳ `filename` | string | File name | +| ↳ `type` | string | MIME type | +| ↳ `language` | string | Programming language | +| ↳ `raw_url` | string | Raw file URL | +| ↳ `size` | number | File size in bytes | +| ↳ `truncated` | boolean | Whether content is truncated | +| ↳ `content` | string | File content | +| `owner` | object | Gist owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_list_gists` + +List gists for a user or the authenticated user + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `username` | string | No | GitHub username \(omit for authenticated user's gists\) | +| `since` | string | No | Only gists updated after this time \(ISO 8601\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Array of gist objects from GitHub API | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `forks_url` | string | Forks API URL | +| ↳ `commits_url` | string | Commits API URL | +| ↳ `git_pull_url` | string | Git pull URL | +| ↳ `git_push_url` | string | Git push URL | +| ↳ `description` | string | Gist description | +| ↳ `public` | boolean | Whether gist is public | +| ↳ `truncated` | boolean | Whether files are truncated | +| ↳ `comments` | number | Number of comments | +| ↳ `comments_url` | string | Comments API URL | +| ↳ `created_at` | string | Creation timestamp | +| ↳ `updated_at` | string | Last update timestamp | +| ↳ `files` | object | Files in the gist \(object with filenames as keys, each containing filename, type, language, raw_url, size\) | +| ↳ `owner` | object | Gist owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| `count` | number | Number of gists returned | + +### `github_update_gist` + +Update a gist description or files. To delete a file, set its value to null in files object + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `gist_id` | string | Yes | The gist ID to update | +| `description` | string | No | New description for the gist | +| `files` | json | No | JSON object with filenames as keys. Set to null to delete, or provide content to update/add | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Gist ID | +| `node_id` | string | GraphQL node ID | +| `url` | string | API URL | +| `html_url` | string | Web URL | +| `forks_url` | string | Forks API URL | +| `commits_url` | string | Commits API URL | +| `git_pull_url` | string | Git pull URL | +| `git_push_url` | string | Git push URL | +| `description` | string | Gist description | +| `public` | boolean | Whether gist is public | +| `truncated` | boolean | Whether files are truncated | +| `comments` | number | Number of comments | +| `comments_url` | string | Comments API URL | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Last update timestamp | +| `files` | object | Files in the gist \(object with filenames as keys, each containing filename, type, language, raw_url, size, truncated, content\) | +| `owner` | object | Gist owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_delete_gist` + +Delete a gist by ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `gist_id` | string | Yes | The gist ID to delete | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether deletion succeeded | +| `gist_id` | string | The deleted gist ID | + +### `github_fork_gist` + +Fork a gist to create your own copy + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `gist_id` | string | Yes | The gist ID to fork | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | New gist ID | +| `html_url` | string | Web URL | +| `description` | string | Description | +| `public` | boolean | Is public | +| `created_at` | string | Creation date | +| `owner` | object | Owner info | +| `files` | object | Files | + +### `github_star_gist` + +Star a gist + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `gist_id` | string | Yes | The gist ID to star | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `starred` | boolean | Whether starring succeeded | +| `gist_id` | string | The gist ID | + +### `github_unstar_gist` + +Unstar a gist + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `gist_id` | string | Yes | The gist ID to unstar | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `unstarred` | boolean | Whether unstarring succeeded | +| `gist_id` | string | The gist ID | + +### `github_fork_repo` + +Fork a repository to your account or an organization + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner to fork from | +| `repo` | string | Yes | Repository name to fork | +| `organization` | string | No | Organization to fork into \(omit to fork to your account\) | +| `name` | string | No | Custom name for the forked repository | +| `default_branch_only` | boolean | No | Only fork the default branch \(default: false\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | number | Repository ID | +| `node_id` | string | GraphQL node ID | +| `name` | string | Repository name | +| `full_name` | string | Full name \(owner/repo\) | +| `private` | boolean | Whether repository is private | +| `description` | string | Repository description | +| `html_url` | string | GitHub web URL | +| `url` | string | API URL | +| `clone_url` | string | HTTPS clone URL | +| `ssh_url` | string | SSH clone URL | +| `git_url` | string | Git protocol URL | +| `default_branch` | string | Default branch name | +| `fork` | boolean | Whether this is a fork | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Last update timestamp | +| `pushed_at` | string | Last push timestamp | +| `owner` | object | Fork owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| `parent` | object | Parent repository \(source of the fork\) | +| ↳ `id` | number | User ID | +| ↳ `full_name` | string | Full name | +| ↳ `html_url` | string | Web URL | +| ↳ `description` | string | Description | +| ↳ `owner` | object | Parent owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `login` | string | Username | +| `source` | object | Source repository \(ultimate origin\) | +| ↳ `id` | number | Repository ID | +| ↳ `full_name` | string | Full name | +| ↳ `html_url` | string | Web URL | + +### `github_list_forks` + +List forks of a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `sort` | string | No | Sort by: newest, oldest, stargazers, watchers \(default: newest\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Array of fork repository objects from GitHub API | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `name` | string | Repository name | +| ↳ `full_name` | string | Full name \(owner/repo\) | +| ↳ `private` | boolean | Whether repository is private | +| ↳ `description` | string | Repository description | +| ↳ `html_url` | string | Profile page URL | +| ↳ `url` | string | API URL | +| ↳ `fork` | boolean | Whether this is a fork | +| ↳ `created_at` | string | Creation timestamp | +| ↳ `updated_at` | string | Last update timestamp | +| ↳ `pushed_at` | string | Last push timestamp | +| ↳ `size` | number | Repository size in KB | +| ↳ `stargazers_count` | number | Number of stars | +| ↳ `watchers_count` | number | Number of watchers | +| ↳ `forks_count` | number | Number of forks | +| ↳ `open_issues_count` | number | Number of open issues | +| ↳ `language` | string | Primary programming language | +| ↳ `default_branch` | string | Default branch name | +| ↳ `visibility` | string | Repository visibility | +| ↳ `archived` | boolean | Whether repository is archived | +| ↳ `disabled` | boolean | Whether repository is disabled | +| ↳ `owner` | object | Fork owner | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| `count` | number | Number of forks returned | + +### `github_create_milestone` + +Create a milestone in a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `title` | string | Yes | Milestone title | +| `state` | string | No | State: open or closed \(default: open\) | +| `description` | string | No | Milestone description | +| `due_on` | string | No | Due date \(ISO 8601 format, e.g., 2024-12-31T23:59:59Z\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `number` | number | Milestone number | +| `title` | string | Title | +| `description` | string | Description | +| `state` | string | State | +| `html_url` | string | Web URL | +| `due_on` | string | Due date | +| `open_issues` | number | Open issues | +| `closed_issues` | number | Closed issues | +| `creator` | object | Creator | + +### `github_get_milestone` + +Get a specific milestone by number + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `milestone_number` | number | Yes | Milestone number | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | number | Milestone ID | +| `node_id` | string | GraphQL node ID | +| `number` | number | Milestone number | +| `title` | string | Milestone title | +| `description` | string | Milestone description | +| `state` | string | State \(open or closed\) | +| `url` | string | API URL | +| `html_url` | string | GitHub web URL | +| `labels_url` | string | Labels API URL | +| `due_on` | string | Due date \(ISO 8601\) | +| `open_issues` | number | Number of open issues | +| `closed_issues` | number | Number of closed issues | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Last update timestamp | +| `closed_at` | string | Close timestamp | +| `creator` | object | Milestone creator | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_list_milestones` + +List milestones in a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `state` | string | No | Filter by state: open, closed, all \(default: open\) | +| `sort` | string | No | Sort by: due_on or completeness \(default: due_on\) | +| `direction` | string | No | Sort direction: asc or desc \(default: asc\) | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Array of milestone objects from GitHub API | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `number` | number | Milestone number | +| ↳ `title` | string | Milestone title | +| ↳ `description` | string | Milestone description | +| ↳ `state` | string | State \(open or closed\) | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `labels_url` | string | Labels API URL | +| ↳ `due_on` | string | Due date \(ISO 8601\) | +| ↳ `open_issues` | number | Number of open issues | +| ↳ `closed_issues` | number | Number of closed issues | +| ↳ `created_at` | string | Creation timestamp | +| ↳ `updated_at` | string | Last update timestamp | +| ↳ `closed_at` | string | Close timestamp | +| ↳ `creator` | object | Milestone creator | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| ↳ `login` | string | Username | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| `count` | number | Number of milestones returned | + +### `github_update_milestone` + +Update a milestone in a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `milestone_number` | number | Yes | Milestone number to update | +| `title` | string | No | New milestone title | +| `state` | string | No | New state: open or closed | +| `description` | string | No | New description | +| `due_on` | string | No | New due date \(ISO 8601 format\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | number | Milestone ID | +| `node_id` | string | GraphQL node ID | +| `number` | number | Milestone number | +| `title` | string | Milestone title | +| `description` | string | Milestone description | +| `state` | string | State \(open or closed\) | +| `url` | string | API URL | +| `html_url` | string | GitHub web URL | +| `labels_url` | string | Labels API URL | +| `due_on` | string | Due date \(ISO 8601\) | +| `open_issues` | number | Number of open issues | +| `closed_issues` | number | Number of closed issues | +| `created_at` | string | Creation timestamp | +| `updated_at` | string | Last update timestamp | +| `closed_at` | string | Close timestamp | +| `creator` | object | Milestone creator | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_delete_milestone` + +Delete a milestone from a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `milestone_number` | number | Yes | Milestone number to delete | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether deletion succeeded | +| `milestone_number` | number | The deleted milestone number | + +### `github_create_issue_reaction` + +Add a reaction to an issue + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `issue_number` | number | Yes | Issue number | +| `content` | string | Yes | Reaction type: +1 \(thumbs up\), -1 \(thumbs down\), laugh, confused, heart, hooray, rocket, eyes | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | number | Reaction ID | +| `node_id` | string | GraphQL node ID | +| `content` | string | Reaction type \(+1, -1, laugh, confused, heart, hooray, rocket, eyes\) | +| `created_at` | string | Creation timestamp | +| `user` | object | User who reacted | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_delete_issue_reaction` + +Remove a reaction from an issue + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `issue_number` | number | Yes | Issue number | +| `reaction_id` | number | Yes | Reaction ID to delete | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether deletion succeeded | +| `reaction_id` | number | The deleted reaction ID | + +### `github_create_comment_reaction` + +Add a reaction to an issue comment + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `comment_id` | number | Yes | Comment ID | +| `content` | string | Yes | Reaction type: +1 \(thumbs up\), -1 \(thumbs down\), laugh, confused, heart, hooray, rocket, eyes | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | number | Reaction ID | +| `node_id` | string | GraphQL node ID | +| `content` | string | Reaction type \(+1, -1, laugh, confused, heart, hooray, rocket, eyes\) | +| `created_at` | string | Creation timestamp | +| `user` | object | User who reacted | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | + +### `github_delete_comment_reaction` + +Remove a reaction from an issue comment + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `comment_id` | number | Yes | Comment ID | +| `reaction_id` | number | Yes | Reaction ID to delete | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether deletion succeeded | +| `reaction_id` | number | The deleted reaction ID | + +### `github_star_repo` + +Star a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `starred` | boolean | Whether starring succeeded | +| `owner` | string | Repository owner | +| `repo` | string | Repository name | + +### `github_unstar_repo` + +Remove star from a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `unstarred` | boolean | Whether unstarring succeeded | +| `owner` | string | Repository owner | +| `repo` | string | Repository name | + +### `github_check_star` + +Check if you have starred a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `starred` | boolean | Whether you have starred the repo | +| `owner` | string | Repository owner | +| `repo` | string | Repository name | + +### `github_list_stargazers` + +List users who have starred a repository + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `owner` | string | Yes | Repository owner | +| `repo` | string | Yes | Repository name | +| `per_page` | number | No | Results per page \(max 100, default: 30\) | +| `page` | number | No | Page number \(default: 1\) | +| `apiKey` | string | Yes | GitHub API token | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `items` | array | Array of user objects from GitHub API | +| ↳ `login` | string | Username | +| ↳ `id` | number | User ID | +| ↳ `node_id` | string | GraphQL node ID | +| ↳ `avatar_url` | string | Avatar image URL | +| ↳ `gravatar_id` | string | Gravatar ID | +| ↳ `url` | string | API URL | +| ↳ `html_url` | string | Profile page URL | +| ↳ `followers_url` | string | Followers API URL | +| ↳ `following_url` | string | Following API URL | +| ↳ `gists_url` | string | Gists API URL | +| ↳ `starred_url` | string | Starred API URL | +| ↳ `repos_url` | string | Repos API URL | +| ↳ `type` | string | User or Organization | +| ↳ `site_admin` | boolean | GitHub staff indicator | +| `count` | number | Number of stargazers returned | + diff --git a/apps/docs/content/docs/en/tools/google_calendar.mdx b/apps/docs/content/docs/en/tools/google_calendar.mdx index 535c32f678..57d5df9673 100644 --- a/apps/docs/content/docs/en/tools/google_calendar.mdx +++ b/apps/docs/content/docs/en/tools/google_calendar.mdx @@ -119,6 +119,145 @@ Get a specific event from Google Calendar. Returns API-aligned fields only. | `creator` | json | Event creator | | `organizer` | json | Event organizer | +### `google_calendar_update` + +Update an existing event in Google Calendar. Returns API-aligned fields only. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `calendarId` | string | No | Calendar ID \(defaults to primary\) | +| `eventId` | string | Yes | Event ID to update | +| `summary` | string | No | New event title/summary | +| `description` | string | No | New event description | +| `location` | string | No | New event location | +| `startDateTime` | string | No | New start date and time. MUST include timezone offset \(e.g., 2025-06-03T10:00:00-08:00\) OR provide timeZone parameter | +| `endDateTime` | string | No | New end date and time. MUST include timezone offset \(e.g., 2025-06-03T11:00:00-08:00\) OR provide timeZone parameter | +| `timeZone` | string | No | Time zone \(e.g., America/Los_Angeles\). Required if datetime does not include offset. | +| `attendees` | array | No | Array of attendee email addresses \(replaces existing attendees\) | +| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Event ID | +| `htmlLink` | string | Event link | +| `status` | string | Event status | +| `summary` | string | Event title | +| `description` | string | Event description | +| `location` | string | Event location | +| `start` | json | Event start | +| `end` | json | Event end | +| `attendees` | json | Event attendees | +| `creator` | json | Event creator | +| `organizer` | json | Event organizer | + +### `google_calendar_delete` + +Delete an event from Google Calendar. Returns API-aligned fields only. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `calendarId` | string | No | Calendar ID \(defaults to primary\) | +| `eventId` | string | Yes | Event ID to delete | +| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `eventId` | string | Deleted event ID | +| `deleted` | boolean | Whether deletion was successful | + +### `google_calendar_move` + +Move an event to a different calendar. Returns API-aligned fields only. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `calendarId` | string | No | Source calendar ID \(defaults to primary\) | +| `eventId` | string | Yes | Event ID to move | +| `destinationCalendarId` | string | Yes | Destination calendar ID | +| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Event ID | +| `htmlLink` | string | Event link | +| `status` | string | Event status | +| `summary` | string | Event title | +| `description` | string | Event description | +| `location` | string | Event location | +| `start` | json | Event start | +| `end` | json | Event end | +| `attendees` | json | Event attendees | +| `creator` | json | Event creator | +| `organizer` | json | Event organizer | + +### `google_calendar_instances` + +Get instances of a recurring event from Google Calendar. Returns API-aligned fields only. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `calendarId` | string | No | Calendar ID \(defaults to primary\) | +| `eventId` | string | Yes | Recurring event ID to get instances of | +| `timeMin` | string | No | Lower bound for instances \(RFC3339 timestamp, e.g., 2025-06-03T00:00:00Z\) | +| `timeMax` | string | No | Upper bound for instances \(RFC3339 timestamp, e.g., 2025-06-04T00:00:00Z\) | +| `maxResults` | number | No | Maximum number of instances to return \(default 250, max 2500\) | +| `pageToken` | string | No | Token for retrieving subsequent pages of results | +| `showDeleted` | boolean | No | Include deleted instances | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `nextPageToken` | string | Next page token | +| `timeZone` | string | Calendar time zone | +| `instances` | json | List of recurring event instances | + +### `google_calendar_list_calendars` + +List all calendars in the user + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `minAccessRole` | string | No | Minimum access role for returned calendars: freeBusyReader, reader, writer, or owner | +| `maxResults` | number | No | Maximum number of calendars to return \(default 100, max 250\) | +| `pageToken` | string | No | Token for retrieving subsequent pages of results | +| `showDeleted` | boolean | No | Include deleted calendars | +| `showHidden` | boolean | No | Include hidden calendars | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `nextPageToken` | string | Next page token | +| `calendars` | array | List of calendars | +| ↳ `id` | string | Calendar ID | +| ↳ `summary` | string | Calendar title | +| ↳ `description` | string | Calendar description | +| ↳ `location` | string | Calendar location | +| ↳ `timeZone` | string | Calendar time zone | +| ↳ `accessRole` | string | Access role for the calendar | +| ↳ `backgroundColor` | string | Calendar background color | +| ↳ `foregroundColor` | string | Calendar foreground color | +| ↳ `primary` | boolean | Whether this is the primary calendar | +| ↳ `hidden` | boolean | Whether the calendar is hidden | +| ↳ `selected` | boolean | Whether the calendar is selected | + ### `google_calendar_quick_add` Create events from natural language text. Returns API-aligned fields only. diff --git a/apps/docs/content/docs/en/tools/google_drive.mdx b/apps/docs/content/docs/en/tools/google_drive.mdx index 6dc71fee68..4a56b640e9 100644 --- a/apps/docs/content/docs/en/tools/google_drive.mdx +++ b/apps/docs/content/docs/en/tools/google_drive.mdx @@ -1,6 +1,6 @@ --- title: Google Drive -description: Create, upload, and list files +description: Manage files, folders, and permissions --- import { BlockInfoCard } from "@/components/ui/block-info-card" @@ -40,84 +40,123 @@ In Sim, the Google Drive integration enables your agents to interact directly wi ## Usage Instructions -Integrate Google Drive into the workflow. Can create, upload, and list files. +Integrate Google Drive into the workflow. Can create, upload, download, copy, move, delete, share files and manage permissions. ## Tools -### `google_drive_upload` +### `google_drive_list` -Upload a file to Google Drive with complete metadata returned +List files and folders in Google Drive with complete metadata #### Input | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `fileName` | string | Yes | The name of the file to upload | -| `file` | file | No | Binary file to upload \(UserFile object\) | -| `content` | string | No | Text content to upload \(use this OR file, not both\) | -| `mimeType` | string | No | The MIME type of the file to upload \(auto-detected from file if not provided\) | -| `folderSelector` | string | No | Select the folder to upload the file to | -| `folderId` | string | No | The ID of the folder to upload the file to \(internal use\) | +| `folderSelector` | string | No | Select the folder to list files from | +| `folderId` | string | No | The ID of the folder to list files from \(internal use\) | +| `query` | string | No | Search term to filter files by name \(e.g. "budget" finds files with "budget" in the name\). Do NOT use Google Drive query syntax here - just provide a plain search term. | +| `pageSize` | number | No | The maximum number of files to return \(default: 100\) | +| `pageToken` | string | No | The page token to use for pagination | #### Output | Parameter | Type | Description | | --------- | ---- | ----------- | -| `file` | object | Complete uploaded file metadata from Google Drive | +| `files` | array | Array of file metadata objects from Google Drive | +| ↳ `id` | string | Google Drive file ID | +| ↳ `kind` | string | Resource type identifier | +| ↳ `name` | string | File name | +| ↳ `mimeType` | string | MIME type | +| ↳ `description` | string | File description | +| ↳ `originalFilename` | string | Original uploaded filename | +| ↳ `fullFileExtension` | string | Full file extension | +| ↳ `fileExtension` | string | File extension | +| ↳ `owners` | json | List of file owners | +| ↳ `permissions` | json | File permissions | +| ↳ `permissionIds` | json | Permission IDs | +| ↳ `shared` | boolean | Whether file is shared | +| ↳ `ownedByMe` | boolean | Whether owned by current user | +| ↳ `writersCanShare` | boolean | Whether writers can share | +| ↳ `viewersCanCopyContent` | boolean | Whether viewers can copy | +| ↳ `copyRequiresWriterPermission` | boolean | Whether copy requires writer permission | +| ↳ `sharingUser` | json | User who shared the file | +| ↳ `starred` | boolean | Whether file is starred | +| ↳ `trashed` | boolean | Whether file is in trash | +| ↳ `explicitlyTrashed` | boolean | Whether explicitly trashed | +| ↳ `appProperties` | json | App-specific properties | +| ↳ `createdTime` | string | File creation time | +| ↳ `modifiedTime` | string | Last modification time | +| ↳ `modifiedByMeTime` | string | When modified by current user | +| ↳ `viewedByMeTime` | string | When last viewed by current user | +| ↳ `sharedWithMeTime` | string | When shared with current user | +| ↳ `lastModifyingUser` | json | User who last modified the file | +| ↳ `viewedByMe` | boolean | Whether viewed by current user | +| ↳ `modifiedByMe` | boolean | Whether modified by current user | +| ↳ `webViewLink` | string | URL to view in browser | +| ↳ `webContentLink` | string | Direct download URL | +| ↳ `iconLink` | string | URL to file icon | +| ↳ `thumbnailLink` | string | URL to thumbnail | +| ↳ `exportLinks` | json | Export format links | +| ↳ `size` | string | File size in bytes | +| ↳ `quotaBytesUsed` | string | Storage quota used | +| ↳ `md5Checksum` | string | MD5 hash | +| ↳ `sha1Checksum` | string | SHA-1 hash | +| ↳ `sha256Checksum` | string | SHA-256 hash | +| ↳ `parents` | json | Parent folder IDs | +| ↳ `spaces` | json | Spaces containing file | +| ↳ `driveId` | string | Shared drive ID | +| ↳ `capabilities` | json | User capabilities on file | +| ↳ `version` | string | Version number | +| ↳ `headRevisionId` | string | Head revision ID | +| ↳ `hasThumbnail` | boolean | Whether has thumbnail | +| ↳ `thumbnailVersion` | string | Thumbnail version | +| ↳ `imageMediaMetadata` | json | Image-specific metadata | +| ↳ `videoMediaMetadata` | json | Video-specific metadata | +| ↳ `isAppAuthorized` | boolean | Whether created by requesting app | +| ↳ `contentRestrictions` | json | Content restrictions | +| ↳ `linkShareMetadata` | json | Link share metadata | +| `nextPageToken` | string | Token for fetching the next page of results | + +### `google_drive_get_file` + +Get metadata for a specific file in Google Drive by its ID + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to retrieve | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `file` | json | The file metadata | | ↳ `id` | string | Google Drive file ID | +| ↳ `kind` | string | Resource type identifier | | ↳ `name` | string | File name | | ↳ `mimeType` | string | MIME type | -| ↳ `kind` | string | Resource type identifier | | ↳ `description` | string | File description | -| ↳ `originalFilename` | string | Original uploaded filename | -| ↳ `fullFileExtension` | string | Full file extension | -| ↳ `fileExtension` | string | File extension | -| ↳ `owners` | json | List of file owners | -| ↳ `permissions` | json | File permissions | -| ↳ `permissionIds` | json | Permission IDs | -| ↳ `shared` | boolean | Whether file is shared | -| ↳ `ownedByMe` | boolean | Whether owned by current user | -| ↳ `writersCanShare` | boolean | Whether writers can share | -| ↳ `viewersCanCopyContent` | boolean | Whether viewers can copy | -| ↳ `copyRequiresWriterPermission` | boolean | Whether copy requires writer permission | -| ↳ `sharingUser` | json | User who shared the file | +| ↳ `size` | string | File size in bytes | | ↳ `starred` | boolean | Whether file is starred | | ↳ `trashed` | boolean | Whether file is in trash | -| ↳ `explicitlyTrashed` | boolean | Whether explicitly trashed | -| ↳ `appProperties` | json | App-specific properties | -| ↳ `createdTime` | string | File creation time | -| ↳ `modifiedTime` | string | Last modification time | -| ↳ `modifiedByMeTime` | string | When modified by current user | -| ↳ `viewedByMeTime` | string | When last viewed by current user | -| ↳ `sharedWithMeTime` | string | When shared with current user | -| ↳ `lastModifyingUser` | json | User who last modified the file | -| ↳ `viewedByMe` | boolean | Whether viewed by current user | -| ↳ `modifiedByMe` | boolean | Whether modified by current user | | ↳ `webViewLink` | string | URL to view in browser | | ↳ `webContentLink` | string | Direct download URL | | ↳ `iconLink` | string | URL to file icon | | ↳ `thumbnailLink` | string | URL to thumbnail | -| ↳ `exportLinks` | json | Export format links | -| ↳ `size` | string | File size in bytes | -| ↳ `quotaBytesUsed` | string | Storage quota used | -| ↳ `md5Checksum` | string | MD5 hash | -| ↳ `sha1Checksum` | string | SHA-1 hash | -| ↳ `sha256Checksum` | string | SHA-256 hash | | ↳ `parents` | json | Parent folder IDs | -| ↳ `spaces` | json | Spaces containing file | -| ↳ `driveId` | string | Shared drive ID | +| ↳ `owners` | json | List of file owners | +| ↳ `permissions` | json | File permissions | +| ↳ `createdTime` | string | File creation time | +| ↳ `modifiedTime` | string | Last modification time | +| ↳ `lastModifyingUser` | json | User who last modified the file | +| ↳ `shared` | boolean | Whether file is shared | +| ↳ `ownedByMe` | boolean | Whether owned by current user | | ↳ `capabilities` | json | User capabilities on file | +| ↳ `md5Checksum` | string | MD5 hash | | ↳ `version` | string | Version number | -| ↳ `headRevisionId` | string | Head revision ID | -| ↳ `hasThumbnail` | boolean | Whether has thumbnail | -| ↳ `thumbnailVersion` | string | Thumbnail version | -| ↳ `imageMediaMetadata` | json | Image-specific metadata | -| ↳ `videoMediaMetadata` | json | Video-specific metadata | -| ↳ `isAppAuthorized` | boolean | Whether created by requesting app | -| ↳ `contentRestrictions` | json | Content restrictions | -| ↳ `linkShareMetadata` | json | Link share metadata | ### `google_drive_create_folder` @@ -137,9 +176,9 @@ Create a new folder in Google Drive with complete metadata returned | --------- | ---- | ----------- | | `file` | object | Complete created folder metadata from Google Drive | | ↳ `id` | string | Google Drive folder ID | +| ↳ `kind` | string | Resource type identifier | | ↳ `name` | string | Folder name | | ↳ `mimeType` | string | MIME type \(application/vnd.google-apps.folder\) | -| ↳ `kind` | string | Resource type identifier | | ↳ `description` | string | Folder description | | ↳ `owners` | json | List of folder owners | | ↳ `permissions` | json | Folder permissions | @@ -174,6 +213,79 @@ Create a new folder in Google Drive with complete metadata returned | ↳ `contentRestrictions` | json | Content restrictions | | ↳ `linkShareMetadata` | json | Link share metadata | +### `google_drive_upload` + +Upload a file to Google Drive with complete metadata returned + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileName` | string | Yes | The name of the file to upload | +| `file` | file | No | Binary file to upload \(UserFile object\) | +| `content` | string | No | Text content to upload \(use this OR file, not both\) | +| `mimeType` | string | No | The MIME type of the file to upload \(auto-detected from file if not provided\) | +| `folderSelector` | string | No | Select the folder to upload the file to | +| `folderId` | string | No | The ID of the folder to upload the file to \(internal use\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `file` | object | Complete uploaded file metadata from Google Drive | +| ↳ `id` | string | Google Drive file ID | +| ↳ `kind` | string | Resource type identifier | +| ↳ `name` | string | File name | +| ↳ `mimeType` | string | MIME type | +| ↳ `description` | string | File description | +| ↳ `originalFilename` | string | Original uploaded filename | +| ↳ `fullFileExtension` | string | Full file extension | +| ↳ `fileExtension` | string | File extension | +| ↳ `owners` | json | List of file owners | +| ↳ `permissions` | json | File permissions | +| ↳ `permissionIds` | json | Permission IDs | +| ↳ `shared` | boolean | Whether file is shared | +| ↳ `ownedByMe` | boolean | Whether owned by current user | +| ↳ `writersCanShare` | boolean | Whether writers can share | +| ↳ `viewersCanCopyContent` | boolean | Whether viewers can copy | +| ↳ `copyRequiresWriterPermission` | boolean | Whether copy requires writer permission | +| ↳ `sharingUser` | json | User who shared the file | +| ↳ `starred` | boolean | Whether file is starred | +| ↳ `trashed` | boolean | Whether file is in trash | +| ↳ `explicitlyTrashed` | boolean | Whether explicitly trashed | +| ↳ `appProperties` | json | App-specific properties | +| ↳ `createdTime` | string | File creation time | +| ↳ `modifiedTime` | string | Last modification time | +| ↳ `modifiedByMeTime` | string | When modified by current user | +| ↳ `viewedByMeTime` | string | When last viewed by current user | +| ↳ `sharedWithMeTime` | string | When shared with current user | +| ↳ `lastModifyingUser` | json | User who last modified the file | +| ↳ `viewedByMe` | boolean | Whether viewed by current user | +| ↳ `modifiedByMe` | boolean | Whether modified by current user | +| ↳ `webViewLink` | string | URL to view in browser | +| ↳ `webContentLink` | string | Direct download URL | +| ↳ `iconLink` | string | URL to file icon | +| ↳ `thumbnailLink` | string | URL to thumbnail | +| ↳ `exportLinks` | json | Export format links | +| ↳ `size` | string | File size in bytes | +| ↳ `quotaBytesUsed` | string | Storage quota used | +| ↳ `md5Checksum` | string | MD5 hash | +| ↳ `sha1Checksum` | string | SHA-1 hash | +| ↳ `sha256Checksum` | string | SHA-256 hash | +| ↳ `parents` | json | Parent folder IDs | +| ↳ `spaces` | json | Spaces containing file | +| ↳ `driveId` | string | Shared drive ID | +| ↳ `capabilities` | json | User capabilities on file | +| ↳ `version` | string | Version number | +| ↳ `headRevisionId` | string | Head revision ID | +| ↳ `hasThumbnail` | boolean | Whether has thumbnail | +| ↳ `thumbnailVersion` | string | Thumbnail version | +| ↳ `imageMediaMetadata` | json | Image-specific metadata | +| ↳ `videoMediaMetadata` | json | Video-specific metadata | +| ↳ `isAppAuthorized` | boolean | Whether created by requesting app | +| ↳ `contentRestrictions` | json | Content restrictions | +| ↳ `linkShareMetadata` | json | Link share metadata | + ### `google_drive_download` Download a file from Google Drive with complete metadata (exports Google Workspace files automatically) @@ -198,9 +310,9 @@ Download a file from Google Drive with complete metadata (exports Google Workspa | ↳ `size` | number | File size in bytes | | `metadata` | object | Complete file metadata from Google Drive | | ↳ `id` | string | Google Drive file ID | +| ↳ `kind` | string | Resource type identifier | | ↳ `name` | string | File name | | ↳ `mimeType` | string | MIME type | -| ↳ `kind` | string | Resource type identifier | | ↳ `description` | string | File description | | ↳ `originalFilename` | string | Original uploaded filename | | ↳ `fullFileExtension` | string | Full file extension | @@ -251,77 +363,211 @@ Download a file from Google Drive with complete metadata (exports Google Workspa | ↳ `linkShareMetadata` | json | Link share metadata | | ↳ `revisions` | json | File revision history \(first 100 revisions only\) | -### `google_drive_list` +### `google_drive_copy` -List files and folders in Google Drive with complete metadata +Create a copy of a file in Google Drive #### Input | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `folderSelector` | string | No | Select the folder to list files from | -| `folderId` | string | No | The ID of the folder to list files from \(internal use\) | -| `query` | string | No | Search term to filter files by name \(e.g. "budget" finds files with "budget" in the name\). Do NOT use Google Drive query syntax here - just provide a plain search term. | -| `pageSize` | number | No | The maximum number of files to return \(default: 100\) | -| `pageToken` | string | No | The page token to use for pagination | +| `fileId` | string | Yes | The ID of the file to copy | +| `newName` | string | No | Name for the copied file \(defaults to "Copy of \[original name\]"\) | +| `destinationFolderId` | string | No | ID of the folder to place the copy in \(defaults to same location as original\) | #### Output | Parameter | Type | Description | | --------- | ---- | ----------- | -| `files` | array | Array of file metadata objects from Google Drive | -| ↳ `id` | string | Google Drive file ID | -| ↳ `name` | string | File name | -| ↳ `mimeType` | string | MIME type | -| ↳ `kind` | string | Resource type identifier | -| ↳ `description` | string | File description | -| ↳ `originalFilename` | string | Original uploaded filename | -| ↳ `fullFileExtension` | string | Full file extension | -| ↳ `fileExtension` | string | File extension | -| ↳ `owners` | json | List of file owners | -| ↳ `permissions` | json | File permissions | -| ↳ `permissionIds` | json | Permission IDs | -| ↳ `shared` | boolean | Whether file is shared | -| ↳ `ownedByMe` | boolean | Whether owned by current user | -| ↳ `writersCanShare` | boolean | Whether writers can share | -| ↳ `viewersCanCopyContent` | boolean | Whether viewers can copy | -| ↳ `copyRequiresWriterPermission` | boolean | Whether copy requires writer permission | -| ↳ `sharingUser` | json | User who shared the file | -| ↳ `starred` | boolean | Whether file is starred | -| ↳ `trashed` | boolean | Whether file is in trash | -| ↳ `explicitlyTrashed` | boolean | Whether explicitly trashed | -| ↳ `appProperties` | json | App-specific properties | -| ↳ `createdTime` | string | File creation time | -| ↳ `modifiedTime` | string | Last modification time | -| ↳ `modifiedByMeTime` | string | When modified by current user | -| ↳ `viewedByMeTime` | string | When last viewed by current user | -| ↳ `sharedWithMeTime` | string | When shared with current user | -| ↳ `lastModifyingUser` | json | User who last modified the file | -| ↳ `viewedByMe` | boolean | Whether viewed by current user | -| ↳ `modifiedByMe` | boolean | Whether modified by current user | -| ↳ `webViewLink` | string | URL to view in browser | -| ↳ `webContentLink` | string | Direct download URL | -| ↳ `iconLink` | string | URL to file icon | -| ↳ `thumbnailLink` | string | URL to thumbnail | -| ↳ `exportLinks` | json | Export format links | -| ↳ `size` | string | File size in bytes | -| ↳ `quotaBytesUsed` | string | Storage quota used | -| ↳ `md5Checksum` | string | MD5 hash | -| ↳ `sha1Checksum` | string | SHA-1 hash | -| ↳ `sha256Checksum` | string | SHA-256 hash | -| ↳ `parents` | json | Parent folder IDs | -| ↳ `spaces` | json | Spaces containing file | -| ↳ `driveId` | string | Shared drive ID | -| ↳ `capabilities` | json | User capabilities on file | -| ↳ `version` | string | Version number | -| ↳ `headRevisionId` | string | Head revision ID | -| ↳ `hasThumbnail` | boolean | Whether has thumbnail | -| ↳ `thumbnailVersion` | string | Thumbnail version | -| ↳ `imageMediaMetadata` | json | Image-specific metadata | -| ↳ `videoMediaMetadata` | json | Video-specific metadata | -| ↳ `isAppAuthorized` | boolean | Whether created by requesting app | -| ↳ `contentRestrictions` | json | Content restrictions | -| ↳ `linkShareMetadata` | json | Link share metadata | -| `nextPageToken` | string | Token for fetching the next page of results | +| `file` | json | The copied file metadata | +| ↳ `id` | string | Google Drive file ID of the copy | +| ↳ `kind` | string | Resource type identifier | +| ↳ `name` | string | File name | +| ↳ `mimeType` | string | MIME type | +| ↳ `webViewLink` | string | URL to view in browser | +| ↳ `parents` | json | Parent folder IDs | +| ↳ `createdTime` | string | File creation time | +| ↳ `modifiedTime` | string | Last modification time | +| ↳ `owners` | json | List of file owners | +| ↳ `size` | string | File size in bytes | + +### `google_drive_update` + +Update file metadata in Google Drive (rename, move, star, add description) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to update | +| `name` | string | No | New name for the file | +| `description` | string | No | New description for the file | +| `addParents` | string | No | Comma-separated list of parent folder IDs to add \(moves file to these folders\) | +| `removeParents` | string | No | Comma-separated list of parent folder IDs to remove | +| `starred` | boolean | No | Whether to star or unstar the file | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `file` | json | The updated file metadata | +| ↳ `id` | string | Google Drive file ID | +| ↳ `kind` | string | Resource type identifier | +| ↳ `name` | string | File name | +| ↳ `mimeType` | string | MIME type | +| ↳ `description` | string | File description | +| ↳ `starred` | boolean | Whether file is starred | +| ↳ `webViewLink` | string | URL to view in browser | +| ↳ `parents` | json | Parent folder IDs | +| ↳ `modifiedTime` | string | Last modification time | + +### `google_drive_trash` + +Move a file to the trash in Google Drive (can be restored later) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to move to trash | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `file` | json | The trashed file metadata | +| ↳ `id` | string | Google Drive file ID | +| ↳ `kind` | string | Resource type identifier | +| ↳ `name` | string | File name | +| ↳ `mimeType` | string | MIME type | +| ↳ `trashed` | boolean | Whether file is in trash \(should be true\) | +| ↳ `trashedTime` | string | When file was trashed | +| ↳ `webViewLink` | string | URL to view in browser | + +### `google_drive_delete` + +Permanently delete a file from Google Drive (bypasses trash) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to permanently delete | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether the file was successfully deleted | +| `fileId` | string | The ID of the deleted file | + +### `google_drive_share` + +Share a file with a user, group, domain, or make it public + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to share | +| `type` | string | Yes | Type of grantee: user, group, domain, or anyone | +| `role` | string | Yes | Permission role: owner \(transfer ownership\), organizer \(shared drive only\), fileOrganizer \(shared drive only\), writer \(edit\), commenter \(view and comment\), reader \(view only\) | +| `email` | string | No | Email address of the user or group \(required for type=user or type=group\) | +| `domain` | string | No | Domain to share with \(required for type=domain\) | +| `transferOwnership` | boolean | No | Required when role is owner. Transfers ownership to the specified user. | +| `moveToNewOwnersRoot` | boolean | No | When transferring ownership, move the file to the new owner's My Drive root folder. | +| `sendNotification` | boolean | No | Whether to send an email notification \(default: true\) | +| `emailMessage` | string | No | Custom message to include in the notification email | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `permission` | json | The created permission details | +| ↳ `id` | string | Permission ID | +| ↳ `type` | string | Grantee type \(user, group, domain, anyone\) | +| ↳ `role` | string | Permission role | +| ↳ `emailAddress` | string | Email of the grantee | +| ↳ `displayName` | string | Display name of the grantee | +| ↳ `domain` | string | Domain of the grantee | +| ↳ `expirationTime` | string | Expiration time | +| ↳ `deleted` | boolean | Whether grantee is deleted | + +### `google_drive_unshare` + +Remove a permission from a file (revoke access) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to modify permissions on | +| `permissionId` | string | Yes | The ID of the permission to remove \(use list_permissions to find this\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `removed` | boolean | Whether the permission was successfully removed | +| `fileId` | string | The ID of the file | +| `permissionId` | string | The ID of the removed permission | + +### `google_drive_list_permissions` + +List all permissions (who has access) for a file in Google Drive + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `fileId` | string | Yes | The ID of the file to list permissions for | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `permissions` | array | List of permissions on the file | +| ↳ `id` | string | Permission ID \(use to remove permission\) | +| ↳ `type` | string | Grantee type \(user, group, domain, anyone\) | +| ↳ `role` | string | Permission role \(owner, organizer, fileOrganizer, writer, commenter, reader\) | +| ↳ `emailAddress` | string | Email of the grantee | +| ↳ `displayName` | string | Display name of the grantee | +| ↳ `photoLink` | string | Photo URL of the grantee | +| ↳ `domain` | string | Domain of the grantee | +| ↳ `expirationTime` | string | When permission expires | +| ↳ `deleted` | boolean | Whether grantee account is deleted | +| ↳ `allowFileDiscovery` | boolean | Whether file is discoverable by grantee | +| ↳ `pendingOwner` | boolean | Whether ownership transfer is pending | +| ↳ `permissionDetails` | json | Details about inherited permissions | +| `nextPageToken` | string | Token for fetching the next page of permissions | + +### `google_drive_get_about` + +Get information about the user and their Google Drive (storage quota, capabilities) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `user` | json | Information about the authenticated user | +| ↳ `displayName` | string | User display name | +| ↳ `emailAddress` | string | User email address | +| ↳ `photoLink` | string | URL to user profile photo | +| ↳ `permissionId` | string | User permission ID | +| ↳ `me` | boolean | Whether this is the authenticated user | +| `storageQuota` | json | Storage quota information in bytes | +| ↳ `limit` | string | Total storage limit in bytes \(null for unlimited\) | +| ↳ `usage` | string | Total storage used in bytes | +| ↳ `usageInDrive` | string | Storage used by Drive files in bytes | +| ↳ `usageInDriveTrash` | string | Storage used by trashed files in bytes | +| `canCreateDrives` | boolean | Whether user can create shared drives | +| `importFormats` | json | Map of MIME types that can be imported and their target formats | +| `exportFormats` | json | Map of Google Workspace MIME types and their exportable formats | +| `maxUploadSize` | string | Maximum upload size in bytes | diff --git a/apps/docs/content/docs/en/tools/google_forms.mdx b/apps/docs/content/docs/en/tools/google_forms.mdx index 52ee3053ab..0cbdb357b6 100644 --- a/apps/docs/content/docs/en/tools/google_forms.mdx +++ b/apps/docs/content/docs/en/tools/google_forms.mdx @@ -1,6 +1,6 @@ --- title: Google Forms -description: Read responses from a Google Form +description: Manage Google Forms and responses --- import { BlockInfoCard } from "@/components/ui/block-info-card" @@ -29,7 +29,7 @@ In Sim, the Google Forms integration enables your agents to programmatically acc ## Usage Instructions -Integrate Google Forms into your workflow. Provide a Form ID to list responses, or specify a Response ID to fetch a single response. Requires OAuth. +Integrate Google Forms into your workflow. Read form structure, get responses, create forms, update content, and manage notification watches. @@ -37,15 +37,246 @@ Integrate Google Forms into your workflow. Provide a Form ID to list responses, ### `google_forms_get_responses` +Retrieve a single response or list responses from a Google Form + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form | +| `responseId` | string | No | If provided, returns this specific response | +| `pageSize` | number | No | Maximum number of responses to return \(service may return fewer\). Defaults to 5000. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `responses` | array | Array of form responses \(when no responseId provided\) | +| ↳ `responseId` | string | Unique response ID | +| ↳ `createTime` | string | When the response was created | +| ↳ `lastSubmittedTime` | string | When the response was last submitted | +| ↳ `answers` | json | Map of question IDs to answer values | +| `response` | object | Single form response \(when responseId is provided\) | +| ↳ `responseId` | string | Unique response ID | +| ↳ `createTime` | string | When the response was created | +| ↳ `lastSubmittedTime` | string | When the response was last submitted | +| ↳ `answers` | json | Map of question IDs to answer values | +| `raw` | json | Raw API response data | + +### `google_forms_get_form` + +Retrieve a form structure including its items, settings, and metadata + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form to retrieve | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `formId` | string | The form ID | +| `title` | string | The form title visible to responders | +| `description` | string | The form description | +| `documentTitle` | string | The document title visible in Drive | +| `responderUri` | string | The URI to share with responders | +| `linkedSheetId` | string | The ID of the linked Google Sheet | +| `revisionId` | string | The revision ID of the form | +| `items` | array | The form items \(questions, sections, etc.\) | +| ↳ `itemId` | string | Item ID | +| ↳ `title` | string | Item title | +| ↳ `description` | string | Item description | +| `settings` | json | Form settings | +| `publishSettings` | json | Form publish settings | + +### `google_forms_create_form` + +Create a new Google Form with a title + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `title` | string | Yes | The title of the form visible to responders | +| `documentTitle` | string | No | The document title visible in Drive \(defaults to form title\) | +| `unpublished` | boolean | No | If true, create an unpublished form that does not accept responses | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `formId` | string | The ID of the created form | +| `title` | string | The form title | +| `documentTitle` | string | The document title in Drive | +| `responderUri` | string | The URI to share with responders | +| `revisionId` | string | The revision ID of the form | + +### `google_forms_batch_update` + +Apply multiple updates to a form (add items, update info, change settings, etc.) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form to update | +| `requests` | json | Yes | Array of update requests \(updateFormInfo, updateSettings, createItem, updateItem, moveItem, deleteItem\) | +| `includeFormInResponse` | boolean | No | Whether to return the updated form in the response | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `replies` | array | The replies from each update request | +| `writeControl` | object | Write control information with revision IDs | +| ↳ `requiredRevisionId` | string | Required revision ID for conflict detection | +| ↳ `targetRevisionId` | string | Target revision ID | +| `form` | object | The updated form \(if includeFormInResponse was true\) | +| ↳ `formId` | string | The form ID | +| ↳ `info` | object | Form info containing title and description | +| ↳ `title` | string | The form title visible to responders | +| ↳ `description` | string | The form description | +| ↳ `documentTitle` | string | The document title visible in Drive | +| ↳ `title` | string | Item title | +| ↳ `description` | string | Item description | +| ↳ `documentTitle` | string | The document title visible in Drive | +| ↳ `settings` | object | Form settings | +| ↳ `quizSettings` | object | Quiz settings | +| ↳ `isQuiz` | boolean | Whether the form is a quiz | +| ↳ `isQuiz` | boolean | Whether the form is a quiz | +| ↳ `emailCollectionType` | string | Email collection type | +| ↳ `quizSettings` | object | Quiz settings | +| ↳ `isQuiz` | boolean | Whether the form is a quiz | +| ↳ `isQuiz` | boolean | Whether the form is a quiz | +| ↳ `emailCollectionType` | string | Email collection type | +| ↳ `itemId` | string | Item ID | +| ↳ `questionItem` | json | Question item configuration | +| ↳ `questionGroupItem` | json | Question group configuration | +| ↳ `pageBreakItem` | json | Page break configuration | +| ↳ `textItem` | json | Text item configuration | +| ↳ `imageItem` | json | Image item configuration | +| ↳ `videoItem` | json | Video item configuration | +| ↳ `revisionId` | string | The revision ID of the form | +| ↳ `responderUri` | string | The URI to share with responders | +| ↳ `linkedSheetId` | string | The ID of the linked Google Sheet | +| ↳ `publishSettings` | object | Form publish settings | +| ↳ `publishState` | object | Current publish state | +| ↳ `isPublished` | boolean | Whether the form is published | +| ↳ `isAcceptingResponses` | boolean | Whether the form is accepting responses | +| ↳ `isPublished` | boolean | Whether the form is published | +| ↳ `isAcceptingResponses` | boolean | Whether the form is accepting responses | +| ↳ `publishState` | object | Current publish state | +| ↳ `isPublished` | boolean | Whether the form is published | +| ↳ `isAcceptingResponses` | boolean | Whether the form is accepting responses | +| ↳ `isPublished` | boolean | Whether the form is published | +| ↳ `isAcceptingResponses` | boolean | Whether the form is accepting responses | + +### `google_forms_set_publish_settings` + +Update the publish settings of a form (publish/unpublish, accept responses) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form | +| `isPublished` | boolean | Yes | Whether the form is published and visible to others | +| `isAcceptingResponses` | boolean | No | Whether the form accepts responses \(forced to false if isPublished is false\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `formId` | string | The form ID | +| `publishSettings` | json | The updated publish settings | +| ↳ `publishState` | object | The publish state | +| ↳ `isPublished` | boolean | Whether the form is published | +| ↳ `isAcceptingResponses` | boolean | Whether the form accepts responses | +| ↳ `isPublished` | boolean | Whether the form is published | +| ↳ `isAcceptingResponses` | boolean | Whether the form accepts responses | + +### `google_forms_create_watch` + +Create a notification watch for form changes (schema changes or new responses) + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form to watch | +| `eventType` | string | Yes | Event type to watch: SCHEMA \(form changes\) or RESPONSES \(new submissions\) | +| `topicName` | string | Yes | The Cloud Pub/Sub topic name \(format: projects/\{project\}/topics/\{topic\}\) | +| `watchId` | string | No | Custom watch ID \(4-63 chars, lowercase letters, numbers, hyphens\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | The watch ID | +| `eventType` | string | The event type being watched | +| `topicName` | string | The Cloud Pub/Sub topic | +| `createTime` | string | When the watch was created | +| `expireTime` | string | When the watch expires \(7 days after creation\) | +| `state` | string | The watch state \(ACTIVE, SUSPENDED\) | + +### `google_forms_list_watches` + +List all notification watches for a form + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `watches` | array | List of watches for the form | +| ↳ `id` | string | Watch ID | +| ↳ `eventType` | string | Event type \(SCHEMA or RESPONSES\) | +| ↳ `createTime` | string | When the watch was created | +| ↳ `expireTime` | string | When the watch expires | +| ↳ `state` | string | Watch state | + +### `google_forms_delete_watch` + +Delete a notification watch from a form + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form | +| `watchId` | string | Yes | The ID of the watch to delete | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether the watch was successfully deleted | + +### `google_forms_renew_watch` + +Renew a notification watch for another 7 days + #### Input | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | +| `formId` | string | Yes | The ID of the Google Form | +| `watchId` | string | Yes | The ID of the watch to renew | #### Output | Parameter | Type | Description | | --------- | ---- | ----------- | -| `data` | json | Response or list of responses | +| `id` | string | The watch ID | +| `eventType` | string | The event type being watched | +| `expireTime` | string | The new expiration time | +| `state` | string | The watch state | diff --git a/apps/docs/content/docs/en/tools/google_groups.mdx b/apps/docs/content/docs/en/tools/google_groups.mdx index 793bc90134..f967ebf270 100644 --- a/apps/docs/content/docs/en/tools/google_groups.mdx +++ b/apps/docs/content/docs/en/tools/google_groups.mdx @@ -215,4 +215,191 @@ Check if a user is a member of a Google Group | --------- | ---- | ----------- | | `isMember` | boolean | Whether the user is a member of the group | +### `google_groups_list_aliases` + +List all email aliases for a Google Group + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `groupKey` | string | Yes | Group email address or unique group ID | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `aliases` | array | List of email aliases for the group | +| ↳ `id` | string | Unique group identifier | +| ↳ `primaryEmail` | string | Group | +| ↳ `alias` | string | Alias email address | +| ↳ `kind` | string | API resource type | +| ↳ `etag` | string | Resource version identifier | + +### `google_groups_add_alias` + +Add an email alias to a Google Group + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `groupKey` | string | Yes | Group email address or unique group ID | +| `alias` | string | Yes | The email alias to add to the group | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `id` | string | Unique group identifier | +| `primaryEmail` | string | Group | +| `alias` | string | The alias that was added | +| `kind` | string | API resource type | +| `etag` | string | Resource version identifier | + +### `google_groups_remove_alias` + +Remove an email alias from a Google Group + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `groupKey` | string | Yes | Group email address or unique group ID | +| `alias` | string | Yes | The email alias to remove from the group | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether the alias was successfully deleted | + +### `google_groups_get_settings` + +Get the settings for a Google Group including access permissions, moderation, and posting options + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `groupEmail` | string | Yes | The email address of the group | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `email` | string | The group | +| `name` | string | The group name \(max 75 characters\) | +| `description` | string | The group description \(max 4096 characters\) | +| `whoCanJoin` | string | Who can join the group \(ANYONE_CAN_JOIN, ALL_IN_DOMAIN_CAN_JOIN, INVITED_CAN_JOIN, CAN_REQUEST_TO_JOIN\) | +| `whoCanViewMembership` | string | Who can view group membership | +| `whoCanViewGroup` | string | Who can view group messages | +| `whoCanPostMessage` | string | Who can post messages to the group | +| `allowExternalMembers` | string | Whether external users can be members | +| `allowWebPosting` | string | Whether web posting is allowed | +| `primaryLanguage` | string | The group | +| `isArchived` | string | Whether messages are archived | +| `archiveOnly` | string | Whether the group is archive-only \(inactive\) | +| `messageModerationLevel` | string | Message moderation level | +| `spamModerationLevel` | string | Spam handling level \(ALLOW, MODERATE, SILENTLY_MODERATE, REJECT\) | +| `replyTo` | string | Default reply destination | +| `customReplyTo` | string | Custom email for replies | +| `includeCustomFooter` | string | Whether to include custom footer | +| `customFooterText` | string | Custom footer text \(max 1000 characters\) | +| `sendMessageDenyNotification` | string | Whether to send rejection notifications | +| `defaultMessageDenyNotificationText` | string | Default rejection message text | +| `membersCanPostAsTheGroup` | string | Whether members can post as the group | +| `includeInGlobalAddressList` | string | Whether included in Global Address List | +| `whoCanLeaveGroup` | string | Who can leave the group | +| `whoCanContactOwner` | string | Who can contact the group owner | +| `favoriteRepliesOnTop` | string | Whether favorite replies appear at top | +| `whoCanApproveMembers` | string | Who can approve new members | +| `whoCanBanUsers` | string | Who can ban users | +| `whoCanModerateMembers` | string | Who can manage members | +| `whoCanModerateContent` | string | Who can moderate content | +| `whoCanAssistContent` | string | Who can assist with content metadata | +| `enableCollaborativeInbox` | string | Whether collaborative inbox is enabled | +| `whoCanDiscoverGroup` | string | Who can discover the group | +| `defaultSender` | string | Default sender identity \(DEFAULT_SELF or GROUP\) | + +### `google_groups_update_settings` + +Update the settings for a Google Group including access permissions, moderation, and posting options + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `groupEmail` | string | Yes | The email address of the group | +| `name` | string | No | The group name \(max 75 characters\) | +| `description` | string | No | The group description \(max 4096 characters\) | +| `whoCanJoin` | string | No | Who can join: ANYONE_CAN_JOIN, ALL_IN_DOMAIN_CAN_JOIN, INVITED_CAN_JOIN, CAN_REQUEST_TO_JOIN | +| `whoCanViewMembership` | string | No | Who can view membership: ALL_IN_DOMAIN_CAN_VIEW, ALL_MEMBERS_CAN_VIEW, ALL_MANAGERS_CAN_VIEW | +| `whoCanViewGroup` | string | No | Who can view group messages: ANYONE_CAN_VIEW, ALL_IN_DOMAIN_CAN_VIEW, ALL_MEMBERS_CAN_VIEW, ALL_MANAGERS_CAN_VIEW | +| `whoCanPostMessage` | string | No | Who can post: NONE_CAN_POST, ALL_MANAGERS_CAN_POST, ALL_MEMBERS_CAN_POST, ALL_OWNERS_CAN_POST, ALL_IN_DOMAIN_CAN_POST, ANYONE_CAN_POST | +| `allowExternalMembers` | string | No | Whether external users can be members: true or false | +| `allowWebPosting` | string | No | Whether web posting is allowed: true or false | +| `primaryLanguage` | string | No | The group's primary language \(e.g., en\) | +| `isArchived` | string | No | Whether messages are archived: true or false | +| `archiveOnly` | string | No | Whether the group is archive-only \(inactive\): true or false | +| `messageModerationLevel` | string | No | Message moderation: MODERATE_ALL_MESSAGES, MODERATE_NON_MEMBERS, MODERATE_NEW_MEMBERS, MODERATE_NONE | +| `spamModerationLevel` | string | No | Spam handling: ALLOW, MODERATE, SILENTLY_MODERATE, REJECT | +| `replyTo` | string | No | Default reply: REPLY_TO_CUSTOM, REPLY_TO_SENDER, REPLY_TO_LIST, REPLY_TO_OWNER, REPLY_TO_IGNORE, REPLY_TO_MANAGERS | +| `customReplyTo` | string | No | Custom email for replies \(when replyTo is REPLY_TO_CUSTOM\) | +| `includeCustomFooter` | string | No | Whether to include custom footer: true or false | +| `customFooterText` | string | No | Custom footer text \(max 1000 characters\) | +| `sendMessageDenyNotification` | string | No | Whether to send rejection notifications: true or false | +| `defaultMessageDenyNotificationText` | string | No | Default rejection message text | +| `membersCanPostAsTheGroup` | string | No | Whether members can post as the group: true or false | +| `includeInGlobalAddressList` | string | No | Whether included in Global Address List: true or false | +| `whoCanLeaveGroup` | string | No | Who can leave: ALL_MANAGERS_CAN_LEAVE, ALL_MEMBERS_CAN_LEAVE, NONE_CAN_LEAVE | +| `whoCanContactOwner` | string | No | Who can contact owner: ALL_IN_DOMAIN_CAN_CONTACT, ALL_MANAGERS_CAN_CONTACT, ALL_MEMBERS_CAN_CONTACT, ANYONE_CAN_CONTACT | +| `favoriteRepliesOnTop` | string | No | Whether favorite replies appear at top: true or false | +| `whoCanApproveMembers` | string | No | Who can approve members: ALL_OWNERS_CAN_APPROVE, ALL_MANAGERS_CAN_APPROVE, ALL_MEMBERS_CAN_APPROVE, NONE_CAN_APPROVE | +| `whoCanBanUsers` | string | No | Who can ban users: OWNERS_ONLY, OWNERS_AND_MANAGERS, NONE | +| `whoCanModerateMembers` | string | No | Who can manage members: OWNERS_ONLY, OWNERS_AND_MANAGERS, ALL_MEMBERS, NONE | +| `whoCanModerateContent` | string | No | Who can moderate content: OWNERS_ONLY, OWNERS_AND_MANAGERS, ALL_MEMBERS, NONE | +| `whoCanAssistContent` | string | No | Who can assist with content metadata: OWNERS_ONLY, OWNERS_AND_MANAGERS, ALL_MEMBERS, NONE | +| `enableCollaborativeInbox` | string | No | Whether collaborative inbox is enabled: true or false | +| `whoCanDiscoverGroup` | string | No | Who can discover: ANYONE_CAN_DISCOVER, ALL_IN_DOMAIN_CAN_DISCOVER, ALL_MEMBERS_CAN_DISCOVER | +| `defaultSender` | string | No | Default sender: DEFAULT_SELF or GROUP | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `email` | string | The group | +| `name` | string | The group name | +| `description` | string | The group description | +| `whoCanJoin` | string | Who can join the group | +| `whoCanViewMembership` | string | Who can view group membership | +| `whoCanViewGroup` | string | Who can view group messages | +| `whoCanPostMessage` | string | Who can post messages to the group | +| `allowExternalMembers` | string | Whether external users can be members | +| `allowWebPosting` | string | Whether web posting is allowed | +| `primaryLanguage` | string | The group | +| `isArchived` | string | Whether messages are archived | +| `archiveOnly` | string | Whether the group is archive-only | +| `messageModerationLevel` | string | Message moderation level | +| `spamModerationLevel` | string | Spam handling level | +| `replyTo` | string | Default reply destination | +| `customReplyTo` | string | Custom email for replies | +| `includeCustomFooter` | string | Whether to include custom footer | +| `customFooterText` | string | Custom footer text | +| `sendMessageDenyNotification` | string | Whether to send rejection notifications | +| `defaultMessageDenyNotificationText` | string | Default rejection message text | +| `membersCanPostAsTheGroup` | string | Whether members can post as the group | +| `includeInGlobalAddressList` | string | Whether included in Global Address List | +| `whoCanLeaveGroup` | string | Who can leave the group | +| `whoCanContactOwner` | string | Who can contact the group owner | +| `favoriteRepliesOnTop` | string | Whether favorite replies appear at top | +| `whoCanApproveMembers` | string | Who can approve new members | +| `whoCanBanUsers` | string | Who can ban users | +| `whoCanModerateMembers` | string | Who can manage members | +| `whoCanModerateContent` | string | Who can moderate content | +| `whoCanAssistContent` | string | Who can assist with content metadata | +| `enableCollaborativeInbox` | string | Whether collaborative inbox is enabled | +| `whoCanDiscoverGroup` | string | Who can discover the group | +| `defaultSender` | string | Default sender identity | + diff --git a/apps/docs/content/docs/en/tools/google_sheets.mdx b/apps/docs/content/docs/en/tools/google_sheets.mdx index b48647ce85..73ae75fa09 100644 --- a/apps/docs/content/docs/en/tools/google_sheets.mdx +++ b/apps/docs/content/docs/en/tools/google_sheets.mdx @@ -28,7 +28,7 @@ In Sim, the Google Sheets integration empowers your agents to automate reading f ## Usage Instructions -Integrate Google Sheets into the workflow with explicit sheet selection. Can read, write, append, and update data in specific sheets. +Integrate Google Sheets into the workflow with explicit sheet selection. Can read, write, append, update, clear data, create spreadsheets, get spreadsheet info, and copy sheets. @@ -42,9 +42,8 @@ Read data from a specific sheet in a Google Sheets spreadsheet | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `spreadsheetId` | string | Yes | The ID of the spreadsheet | -| `sheetName` | string | Yes | The name of the sheet/tab to read from | -| `cellRange` | string | No | The cell range to read \(e.g. "A1:D10"\). Defaults to "A1:Z1000" if not specified. | +| `spreadsheetId` | string | Yes | The ID of the spreadsheet \(found in the URL: docs.google.com/spreadsheets/d/\{SPREADSHEET_ID\}/edit\). | +| `range` | string | No | The A1 notation range to read \(e.g. "Sheet1!A1:D10", "A1:B5"\). Defaults to first sheet A1:Z1000 if not specified. | #### Output @@ -66,8 +65,7 @@ Write data to a specific sheet in a Google Sheets spreadsheet | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `spreadsheetId` | string | Yes | The ID of the spreadsheet | -| `sheetName` | string | Yes | The name of the sheet/tab to write to | -| `cellRange` | string | No | The cell range to write to \(e.g. "A1:D10", "A1"\). Defaults to "A1" if not specified. | +| `range` | string | No | The A1 notation range to write to \(e.g. "Sheet1!A1:D10", "A1:B5"\) | | `values` | array | Yes | The data to write as a 2D array \(e.g. \[\["Name", "Age"\], \["Alice", 30\], \["Bob", 25\]\]\) or array of objects. | | `valueInputOption` | string | No | The format of the data to write | | `includeValuesInResponse` | boolean | No | Whether to include the written values in the response | @@ -93,8 +91,7 @@ Update data in a specific sheet in a Google Sheets spreadsheet | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `spreadsheetId` | string | Yes | The ID of the spreadsheet to update | -| `sheetName` | string | Yes | The name of the sheet/tab to update | -| `cellRange` | string | No | The cell range to update \(e.g. "A1:D10", "A1"\). Defaults to "A1" if not specified. | +| `range` | string | No | The A1 notation range to update \(e.g. "Sheet1!A1:D10", "A1:B5"\) | | `values` | array | Yes | The data to update as a 2D array \(e.g. \[\["Name", "Age"\], \["Alice", 30\]\]\) or array of objects. | | `valueInputOption` | string | No | The format of the data to update | | `includeValuesInResponse` | boolean | No | Whether to include the updated values in the response | @@ -120,7 +117,7 @@ Append data to the end of a specific sheet in a Google Sheets spreadsheet | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `spreadsheetId` | string | Yes | The ID of the spreadsheet to append to | -| `sheetName` | string | Yes | The name of the sheet/tab to append to | +| `range` | string | No | The A1 notation range to append after \(e.g. "Sheet1", "Sheet1!A:D"\) | | `values` | array | Yes | The data to append as a 2D array \(e.g. \[\["Alice", 30\], \["Bob", 25\]\]\) or array of objects. | | `valueInputOption` | string | No | The format of the data to append | | `insertDataOption` | string | No | How to insert the data \(OVERWRITE or INSERT_ROWS\) | @@ -139,4 +136,180 @@ Append data to the end of a specific sheet in a Google Sheets spreadsheet | ↳ `spreadsheetId` | string | Google Sheets spreadsheet ID | | ↳ `spreadsheetUrl` | string | Spreadsheet URL | +### `google_sheets_clear` + +Clear values from a specific range in a Google Sheets spreadsheet + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `spreadsheetId` | string | Yes | The ID of the spreadsheet | +| `sheetName` | string | Yes | The name of the sheet/tab to clear | +| `cellRange` | string | No | The cell range to clear \(e.g. "A1:D10"\). Clears entire sheet if not specified. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `clearedRange` | string | The range that was cleared | +| `sheetName` | string | Name of the sheet that was cleared | +| `metadata` | json | Spreadsheet metadata including ID and URL | +| ↳ `spreadsheetId` | string | Google Sheets spreadsheet ID | +| ↳ `spreadsheetUrl` | string | Spreadsheet URL | + +### `google_sheets_get_spreadsheet` + +Get metadata about a Google Sheets spreadsheet including title and sheet list + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `spreadsheetId` | string | Yes | The ID of the spreadsheet | +| `includeGridData` | boolean | No | Whether to include grid data \(cell values\). Defaults to false. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `spreadsheetId` | string | The spreadsheet ID | +| `title` | string | The title of the spreadsheet | +| `locale` | string | The locale of the spreadsheet | +| `timeZone` | string | The time zone of the spreadsheet | +| `spreadsheetUrl` | string | URL to the spreadsheet | +| `sheets` | array | List of sheets in the spreadsheet | +| ↳ `sheetId` | number | The sheet ID | +| ↳ `title` | string | The sheet title/name | +| ↳ `index` | number | The sheet index \(position\) | +| ↳ `rowCount` | number | Number of rows in the sheet | +| ↳ `columnCount` | number | Number of columns in the sheet | +| ↳ `hidden` | boolean | Whether the sheet is hidden | + +### `google_sheets_create_spreadsheet` + +Create a new Google Sheets spreadsheet + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `title` | string | Yes | The title of the new spreadsheet | +| `sheetTitles` | json | No | Array of sheet names to create \(e.g., \["Sheet1", "Data", "Summary"\]\). Defaults to a single "Sheet1". | +| `locale` | string | No | The locale of the spreadsheet \(e.g., "en_US"\) | +| `timeZone` | string | No | The time zone of the spreadsheet \(e.g., "America/New_York"\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `spreadsheetId` | string | The ID of the created spreadsheet | +| `title` | string | The title of the created spreadsheet | +| `spreadsheetUrl` | string | URL to the created spreadsheet | +| `sheets` | array | List of sheets created in the spreadsheet | +| ↳ `sheetId` | number | The sheet ID | +| ↳ `title` | string | The sheet title/name | +| ↳ `index` | number | The sheet index \(position\) | + +### `google_sheets_batch_get` + +Read multiple ranges from a Google Sheets spreadsheet in a single request + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `spreadsheetId` | string | Yes | The ID of the spreadsheet | +| `ranges` | json | Yes | Array of ranges to read \(e.g., \["Sheet1!A1:D10", "Sheet2!A1:B5"\]\). Each range should include sheet name. | +| `majorDimension` | string | No | The major dimension of values: "ROWS" \(default\) or "COLUMNS" | +| `valueRenderOption` | string | No | How values should be rendered: "FORMATTED_VALUE" \(default\), "UNFORMATTED_VALUE", or "FORMULA" | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `spreadsheetId` | string | The spreadsheet ID | +| `valueRanges` | array | Array of value ranges read from the spreadsheet | +| ↳ `range` | string | The range that was read | +| ↳ `majorDimension` | string | Major dimension \(ROWS or COLUMNS\) | +| ↳ `values` | array | The cell values as a 2D array | +| `metadata` | json | Spreadsheet metadata including ID and URL | +| ↳ `spreadsheetId` | string | Google Sheets spreadsheet ID | +| ↳ `spreadsheetUrl` | string | Spreadsheet URL | + +### `google_sheets_batch_update` + +Update multiple ranges in a Google Sheets spreadsheet in a single request + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `spreadsheetId` | string | Yes | The ID of the spreadsheet | +| `data` | json | Yes | Array of value ranges to update. Each item should have "range" \(e.g., "Sheet1!A1:D10"\) and "values" \(2D array\). | +| `valueInputOption` | string | No | How input data should be interpreted: "RAW" or "USER_ENTERED" \(default\). USER_ENTERED parses formulas. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `spreadsheetId` | string | The spreadsheet ID | +| `totalUpdatedRows` | number | Total number of rows updated | +| `totalUpdatedColumns` | number | Total number of columns updated | +| `totalUpdatedCells` | number | Total number of cells updated | +| `totalUpdatedSheets` | number | Total number of sheets updated | +| `responses` | array | Array of update responses for each range | +| ↳ `spreadsheetId` | string | The spreadsheet ID | +| ↳ `updatedRange` | string | The range that was updated | +| ↳ `updatedRows` | number | Number of rows updated in this range | +| ↳ `updatedColumns` | number | Number of columns updated in this range | +| ↳ `updatedCells` | number | Number of cells updated in this range | +| `metadata` | json | Spreadsheet metadata including ID and URL | +| ↳ `spreadsheetId` | string | Google Sheets spreadsheet ID | +| ↳ `spreadsheetUrl` | string | Spreadsheet URL | + +### `google_sheets_batch_clear` + +Clear multiple ranges in a Google Sheets spreadsheet in a single request + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `spreadsheetId` | string | Yes | The ID of the spreadsheet | +| `ranges` | json | Yes | Array of ranges to clear \(e.g., \["Sheet1!A1:D10", "Sheet2!A1:B5"\]\). Each range should include sheet name. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `spreadsheetId` | string | The spreadsheet ID | +| `clearedRanges` | array | Array of ranges that were cleared | +| `metadata` | json | Spreadsheet metadata including ID and URL | +| ↳ `spreadsheetId` | string | Google Sheets spreadsheet ID | +| ↳ `spreadsheetUrl` | string | Spreadsheet URL | + +### `google_sheets_copy_sheet` + +Copy a sheet from one spreadsheet to another + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `sourceSpreadsheetId` | string | Yes | The ID of the source spreadsheet | +| `sheetId` | number | Yes | The ID of the sheet to copy \(numeric ID, not the sheet name\). Use Get Spreadsheet to find sheet IDs. | +| `destinationSpreadsheetId` | string | Yes | The ID of the destination spreadsheet where the sheet will be copied | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `sheetId` | number | The ID of the newly created sheet in the destination | +| `title` | string | The title of the copied sheet | +| `index` | number | The index \(position\) of the copied sheet | +| `sheetType` | string | The type of the sheet \(GRID, CHART, etc.\) | +| `destinationSpreadsheetId` | string | The ID of the destination spreadsheet | +| `destinationSpreadsheetUrl` | string | URL to the destination spreadsheet | + diff --git a/apps/docs/content/docs/en/tools/google_slides.mdx b/apps/docs/content/docs/en/tools/google_slides.mdx index b8a290b01b..3d826a257c 100644 --- a/apps/docs/content/docs/en/tools/google_slides.mdx +++ b/apps/docs/content/docs/en/tools/google_slides.mdx @@ -30,7 +30,7 @@ In Sim, the Google Slides integration enables your agents to interact directly w ## Usage Instructions -Integrate Google Slides into the workflow. Can read, write, create presentations, replace text, add slides, add images, and get thumbnails. +Integrate Google Slides into the workflow. Can read, write, create presentations, replace text, add slides, add images, get thumbnails, get page details, delete objects, duplicate objects, reorder slides, create tables, create shapes, and insert text. @@ -177,4 +177,177 @@ Generate a thumbnail image of a specific slide in a Google Slides presentation | `height` | number | Height of the thumbnail in pixels | | `metadata` | json | Operation metadata including presentation ID and page object ID | +### `google_slides_get_page` + +Get detailed information about a specific slide/page in a Google Slides presentation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `pageObjectId` | string | Yes | The object ID of the slide/page to retrieve | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `objectId` | string | The object ID of the page | +| `pageType` | string | The type of page \(SLIDE, MASTER, LAYOUT, NOTES, NOTES_MASTER\) | +| `pageElements` | array | Array of page elements \(shapes, images, tables, etc.\) on this page | +| `slideProperties` | object | Properties specific to slides \(layout, master, notes\) | +| ↳ `layoutObjectId` | string | Object ID of the layout this slide is based on | +| ↳ `masterObjectId` | string | Object ID of the master this slide is based on | +| ↳ `notesPage` | json | The notes page associated with the slide | +| `metadata` | object | Operation metadata including presentation ID and URL | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `url` | string | URL to the presentation | + +### `google_slides_delete_object` + +Delete a page element (shape, image, table, etc.) or an entire slide from a Google Slides presentation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `objectId` | string | Yes | The object ID of the element or slide to delete | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `deleted` | boolean | Whether the object was successfully deleted | +| `objectId` | string | The object ID that was deleted | +| `metadata` | object | Operation metadata including presentation ID and URL | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `url` | string | URL to the presentation | + +### `google_slides_duplicate_object` + +Duplicate an object (slide, shape, image, table, etc.) in a Google Slides presentation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `objectId` | string | Yes | The object ID of the element or slide to duplicate | +| `objectIds` | string | No | Optional JSON object mapping source object IDs \(within the slide being duplicated\) to new object IDs for the duplicates. Format: \{"sourceId1":"newId1","sourceId2":"newId2"\} | +| `Format` | string | No | No description | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `duplicatedObjectId` | string | The object ID of the newly created duplicate | +| `metadata` | object | Operation metadata including presentation ID and source object ID | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `sourceObjectId` | string | The original object ID that was duplicated | +| ↳ `url` | string | URL to the presentation | + +### `google_slides_update_slides_position` + +Move one or more slides to a new position in a Google Slides presentation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `slideObjectIds` | string | Yes | Comma-separated list of slide object IDs to move. The slides will maintain their relative order. | +| `insertionIndex` | number | Yes | The zero-based index where the slides should be moved. All slides with indices greater than or equal to this will be shifted right. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `moved` | boolean | Whether the slides were successfully moved | +| `slideObjectIds` | array | The slide object IDs that were moved | +| `insertionIndex` | number | The index where the slides were moved to | +| `metadata` | object | Operation metadata including presentation ID and URL | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `url` | string | URL to the presentation | + +### `google_slides_create_table` + +Create a new table on a slide in a Google Slides presentation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `pageObjectId` | string | Yes | The object ID of the slide/page to add the table to | +| `rows` | number | Yes | Number of rows in the table \(minimum 1\) | +| `columns` | number | Yes | Number of columns in the table \(minimum 1\) | +| `width` | number | No | Width of the table in points \(default: 400\) | +| `height` | number | No | Height of the table in points \(default: 200\) | +| `positionX` | number | No | X position from the left edge in points \(default: 100\) | +| `positionY` | number | No | Y position from the top edge in points \(default: 100\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `tableId` | string | The object ID of the newly created table | +| `rows` | number | Number of rows in the table | +| `columns` | number | Number of columns in the table | +| `metadata` | object | Operation metadata including presentation ID and page object ID | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `pageObjectId` | string | The page object ID where the table was created | +| ↳ `url` | string | URL to the presentation | + +### `google_slides_create_shape` + +Create a shape (rectangle, ellipse, text box, arrow, etc.) on a slide in a Google Slides presentation + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `pageObjectId` | string | Yes | The object ID of the slide/page to add the shape to | +| `shapeType` | string | Yes | The type of shape to create. Common types: TEXT_BOX, RECTANGLE, ROUND_RECTANGLE, ELLIPSE, TRIANGLE, DIAMOND, STAR_5, ARROW_EAST, HEART, CLOUD | +| `width` | number | No | Width of the shape in points \(default: 200\) | +| `height` | number | No | Height of the shape in points \(default: 100\) | +| `positionX` | number | No | X position from the left edge in points \(default: 100\) | +| `positionY` | number | No | Y position from the top edge in points \(default: 100\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `shapeId` | string | The object ID of the newly created shape | +| `shapeType` | string | The type of shape that was created | +| `metadata` | object | Operation metadata including presentation ID and page object ID | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `pageObjectId` | string | The page object ID where the shape was created | +| ↳ `url` | string | URL to the presentation | + +### `google_slides_insert_text` + +Insert text into a shape or table cell in a Google Slides presentation. Use this to add text to text boxes, shapes, or table cells. + +#### Input + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `presentationId` | string | Yes | The ID of the presentation | +| `objectId` | string | Yes | The object ID of the shape or table cell to insert text into. For table cells, use the cell object ID. | +| `text` | string | Yes | The text to insert | +| `insertionIndex` | number | No | The zero-based index at which to insert the text. If not specified, text is inserted at the beginning \(index 0\). | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `inserted` | boolean | Whether the text was successfully inserted | +| `objectId` | string | The object ID where text was inserted | +| `text` | string | The text that was inserted | +| `metadata` | object | Operation metadata including presentation ID and URL | +| ↳ `presentationId` | string | The presentation ID | +| ↳ `url` | string | URL to the presentation | + diff --git a/apps/docs/content/docs/en/tools/knowledge.mdx b/apps/docs/content/docs/en/tools/knowledge.mdx index 21405f8150..44f5db36a7 100644 --- a/apps/docs/content/docs/en/tools/knowledge.mdx +++ b/apps/docs/content/docs/en/tools/knowledge.mdx @@ -51,6 +51,7 @@ Search for similar content in a knowledge base using vector similarity | `properties` | string | No | No description | | `tagName` | string | No | No description | | `tagValue` | string | No | No description | +| `tagFilters` | string | No | No description | #### Output @@ -108,19 +109,8 @@ Create a new document in a knowledge base | `knowledgeBaseId` | string | Yes | ID of the knowledge base containing the document | | `name` | string | Yes | Name of the document | | `content` | string | Yes | Content of the document | -| `tag1` | string | No | Tag 1 value for the document | -| `tag2` | string | No | Tag 2 value for the document | -| `tag3` | string | No | Tag 3 value for the document | -| `tag4` | string | No | Tag 4 value for the document | -| `tag5` | string | No | Tag 5 value for the document | -| `tag6` | string | No | Tag 6 value for the document | -| `tag7` | string | No | Tag 7 value for the document | -| `documentTagsData` | array | No | Structured tag data with names, types, and values | -| `items` | object | No | No description | -| `properties` | string | No | No description | -| `tagName` | string | No | No description | -| `tagValue` | string | No | No description | -| `tagType` | string | No | No description | +| `documentTags` | object | No | Document tags | +| `documentTags` | string | No | No description | #### Output diff --git a/apps/docs/content/docs/en/tools/microsoft_excel.mdx b/apps/docs/content/docs/en/tools/microsoft_excel.mdx index d981eabc9e..65a8eaa5dc 100644 --- a/apps/docs/content/docs/en/tools/microsoft_excel.mdx +++ b/apps/docs/content/docs/en/tools/microsoft_excel.mdx @@ -45,8 +45,7 @@ Read data from a specific sheet in a Microsoft Excel spreadsheet | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `spreadsheetId` | string | Yes | The ID of the spreadsheet to read from | -| `sheetName` | string | Yes | The name of the sheet/tab to read from | -| `cellRange` | string | No | The cell range to read \(e.g., "A1:D10"\). If not specified, reads the entire used range. | +| `range` | string | No | The range of cells to read from. Accepts "SheetName!A1:B2" for explicit ranges or just "SheetName" to read the used range of that sheet. If omitted, reads the used range of the first sheet. | #### Output @@ -68,9 +67,8 @@ Write data to a specific sheet in a Microsoft Excel spreadsheet | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `spreadsheetId` | string | Yes | The ID of the spreadsheet to write to | -| `sheetName` | string | Yes | The name of the sheet/tab to write to | -| `cellRange` | string | No | The cell range to write to \(e.g., "A1:D10", "A1"\). Defaults to "A1" if not specified. | -| `values` | array | Yes | The data to write as a 2D array \(e.g. \[\["Name", "Age"\], \["Alice", 30\], \["Bob", 25\]\]\) or array of objects. | +| `range` | string | No | The range of cells to write to | +| `values` | array | Yes | The data to write to the spreadsheet | | `valueInputOption` | string | No | The format of the data to write | | `includeValuesInResponse` | boolean | No | Whether to include the written values in the response | diff --git a/apps/docs/content/docs/en/tools/slack.mdx b/apps/docs/content/docs/en/tools/slack.mdx index 4462adba61..6ae9192b8e 100644 --- a/apps/docs/content/docs/en/tools/slack.mdx +++ b/apps/docs/content/docs/en/tools/slack.mdx @@ -84,9 +84,10 @@ Send messages to Slack channels or direct messages. Supports Slack mrkdwn format | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `authMethod` | string | No | Authentication method: oauth or bot_token | +| `destinationType` | string | No | Destination type: channel or dm | | `botToken` | string | No | Bot token for Custom Bot | | `channel` | string | No | Target Slack channel \(e.g., #general\) | -| `userId` | string | No | Target Slack user ID for direct messages \(e.g., U1234567890\) | +| `dmUserId` | string | No | Target Slack user for direct messages | | `text` | string | Yes | Message text to send \(supports Slack mrkdwn formatting\) | | `thread_ts` | string | No | Thread timestamp to reply to \(creates thread reply\) | | `files` | file[] | No | Files to attach to the message | @@ -132,9 +133,10 @@ Read the latest messages from Slack channels. Retrieve conversation history with | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `authMethod` | string | No | Authentication method: oauth or bot_token | +| `destinationType` | string | No | Destination type: channel or dm | | `botToken` | string | No | Bot token for Custom Bot | | `channel` | string | No | Slack channel to read messages from \(e.g., #general\) | -| `userId` | string | No | User ID for DM conversation \(e.g., U1234567890\) | +| `dmUserId` | string | No | Target Slack user for DM conversation | | `limit` | number | No | Number of messages to retrieve \(default: 10, max: 15\) | | `oldest` | string | No | Start of time range \(timestamp\) | | `latest` | string | No | End of time range \(timestamp\) | diff --git a/apps/sim/app/api/knowledge/[id]/tag-definitions/route.ts b/apps/sim/app/api/knowledge/[id]/tag-definitions/route.ts index 09f1fc7873..ba52994c88 100644 --- a/apps/sim/app/api/knowledge/[id]/tag-definitions/route.ts +++ b/apps/sim/app/api/knowledge/[id]/tag-definitions/route.ts @@ -2,7 +2,7 @@ import { randomUUID } from 'crypto' import { createLogger } from '@sim/logger' import { type NextRequest, NextResponse } from 'next/server' import { z } from 'zod' -import { getSession } from '@/lib/auth' +import { checkHybridAuth } from '@/lib/auth/hybrid' import { SUPPORTED_FIELD_TYPES } from '@/lib/knowledge/constants' import { createTagDefinition, getTagDefinitions } from '@/lib/knowledge/tags/service' import { checkKnowledgeBaseAccess } from '@/app/api/knowledge/utils' @@ -19,19 +19,32 @@ export async function GET(req: NextRequest, { params }: { params: Promise<{ id: try { logger.info(`[${requestId}] Getting tag definitions for knowledge base ${knowledgeBaseId}`) - const session = await getSession() - if (!session?.user?.id) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) + const auth = await checkHybridAuth(req, { requireWorkflowId: false }) + if (!auth.success) { + return NextResponse.json({ error: auth.error || 'Unauthorized' }, { status: 401 }) } - const accessCheck = await checkKnowledgeBaseAccess(knowledgeBaseId, session.user.id) - if (!accessCheck.hasAccess) { - return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) + // Only allow session and internal JWT auth (not API key) + if (auth.authType === 'api_key') { + return NextResponse.json( + { error: 'API key auth not supported for this endpoint' }, + { status: 401 } + ) + } + + // For session auth, verify KB access. Internal JWT is trusted. + if (auth.authType === 'session' && auth.userId) { + const accessCheck = await checkKnowledgeBaseAccess(knowledgeBaseId, auth.userId) + if (!accessCheck.hasAccess) { + return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) + } } const tagDefinitions = await getTagDefinitions(knowledgeBaseId) - logger.info(`[${requestId}] Retrieved ${tagDefinitions.length} tag definitions`) + logger.info( + `[${requestId}] Retrieved ${tagDefinitions.length} tag definitions (${auth.authType})` + ) return NextResponse.json({ success: true, @@ -51,14 +64,25 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id: try { logger.info(`[${requestId}] Creating tag definition for knowledge base ${knowledgeBaseId}`) - const session = await getSession() - if (!session?.user?.id) { - return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) + const auth = await checkHybridAuth(req, { requireWorkflowId: false }) + if (!auth.success) { + return NextResponse.json({ error: auth.error || 'Unauthorized' }, { status: 401 }) } - const accessCheck = await checkKnowledgeBaseAccess(knowledgeBaseId, session.user.id) - if (!accessCheck.hasAccess) { - return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) + // Only allow session and internal JWT auth (not API key) + if (auth.authType === 'api_key') { + return NextResponse.json( + { error: 'API key auth not supported for this endpoint' }, + { status: 401 } + ) + } + + // For session auth, verify KB access. Internal JWT is trusted. + if (auth.authType === 'session' && auth.userId) { + const accessCheck = await checkKnowledgeBaseAccess(knowledgeBaseId, auth.userId) + if (!accessCheck.hasAccess) { + return NextResponse.json({ error: 'Forbidden' }, { status: 403 }) + } } const body = await req.json() diff --git a/apps/sim/app/chat/components/message/components/markdown-renderer.tsx b/apps/sim/app/chat/components/message/components/markdown-renderer.tsx index ba69814cfc..8aa66579d5 100644 --- a/apps/sim/app/chat/components/message/components/markdown-renderer.tsx +++ b/apps/sim/app/chat/components/message/components/markdown-renderer.tsx @@ -1,4 +1,4 @@ -import React, { type HTMLAttributes, type ReactNode } from 'react' +import React, { type HTMLAttributes, memo, type ReactNode, useMemo } from 'react' import ReactMarkdown from 'react-markdown' import remarkGfm from 'remark-gfm' import { Tooltip } from '@/components/emcn' @@ -23,24 +23,16 @@ export function LinkWithPreview({ href, children }: { href: string; children: Re ) } -export default function MarkdownRenderer({ - content, - customLinkComponent, -}: { - content: string - customLinkComponent?: typeof LinkWithPreview -}) { - const LinkComponent = customLinkComponent || LinkWithPreview +const REMARK_PLUGINS = [remarkGfm] - const customComponents = { - // Paragraph +function createCustomComponents(LinkComponent: typeof LinkWithPreview) { + return { p: ({ children }: React.HTMLAttributes) => (

{children}

), - // Headings h1: ({ children }: React.HTMLAttributes) => (

{children} @@ -62,7 +54,6 @@ export default function MarkdownRenderer({

), - // Lists ul: ({ children }: React.HTMLAttributes) => (
    ), - // Code blocks pre: ({ children }: HTMLAttributes) => { let codeProps: HTMLAttributes = {} let codeContent: ReactNode = children @@ -120,7 +110,6 @@ export default function MarkdownRenderer({ ) }, - // Inline code code: ({ inline, className, @@ -144,24 +133,20 @@ export default function MarkdownRenderer({ ) }, - // Blockquotes blockquote: ({ children }: React.HTMLAttributes) => (
    {children}
    ), - // Horizontal rule hr: () =>
    , - // Links a: ({ href, children, ...props }: React.AnchorHTMLAttributes) => ( {children} ), - // Tables table: ({ children }: React.TableHTMLAttributes) => (
    @@ -193,7 +178,6 @@ export default function MarkdownRenderer({ ), - // Images img: ({ src, alt, ...props }: React.ImgHTMLAttributes) => ( ), } +} + +const DEFAULT_COMPONENTS = createCustomComponents(LinkWithPreview) + +const MarkdownRenderer = memo(function MarkdownRenderer({ + content, + customLinkComponent, +}: { + content: string + customLinkComponent?: typeof LinkWithPreview +}) { + const components = useMemo(() => { + if (!customLinkComponent) { + return DEFAULT_COMPONENTS + } + return createCustomComponents(customLinkComponent) + }, [customLinkComponent]) - // Pre-process content to fix common issues const processedContent = content.trim() return (
    - + {processedContent}
    ) -} +}) + +export default MarkdownRenderer diff --git a/apps/sim/app/layout.tsx b/apps/sim/app/layout.tsx index 166b260af8..6ab3aae353 100644 --- a/apps/sim/app/layout.tsx +++ b/apps/sim/app/layout.tsx @@ -7,7 +7,7 @@ import { generateBrandedMetadata, generateStructuredData } from '@/lib/branding/ import { PostHogProvider } from '@/app/_shell/providers/posthog-provider' import '@/app/_styles/globals.css' import { OneDollarStats } from '@/components/analytics/onedollarstats' -import { isReactGrabEnabled } from '@/lib/core/config/feature-flags' +import { isReactGrabEnabled, isReactScanEnabled } from '@/lib/core/config/feature-flags' import { HydrationErrorHandler } from '@/app/_shell/hydration-error-handler' import { QueryProvider } from '@/app/_shell/providers/query-provider' import { SessionProvider } from '@/app/_shell/providers/session-provider' @@ -35,6 +35,13 @@ export default function RootLayout({ children }: { children: React.ReactNode }) return ( + {isReactScanEnabled && ( +