From a5730b43978ee5208127fa6ad47e35fbbb41bf2c Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 03:27:48 +0000 Subject: [PATCH 1/6] Add documentation for available tools --- docs/api-reference/available-tools.md | 174 ++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 docs/api-reference/available-tools.md diff --git a/docs/api-reference/available-tools.md b/docs/api-reference/available-tools.md new file mode 100644 index 000000000..80ffbeba5 --- /dev/null +++ b/docs/api-reference/available-tools.md @@ -0,0 +1,174 @@ +# Available Tools in Codegen + +This document provides a comprehensive list of all tools available in Codegen, organized by category. These tools can be used in various contexts, including Slack interactions, GitHub integrations, and Linear workflows. + +## Code Analysis & Navigation + +| Tool | Description | +|------|-------------| +| `ripgrep_search` | Search the codebase using regex pattern matching | +| `set_active_codebase` | Selects a codebase to be "active" for operations | + +## File Operations + +| Tool | Description | +|------|-------------| +| `file_write` | Create new files or completely overwrite existing files | +| `relace_edit` | Make targeted edits to existing files | + +## Command Execution + +| Tool | Description | +|------|-------------| +| `run_command` | Run a command in a sandboxed environment | + +## Web Search & Browsing + +| Tool | Description | +|------|-------------| +| `exa_web_search` | Search the web and get content snippets from search results | +| `exa_web_view_page` | View the content of a specific webpage | + +## GitHub Tools + +| Tool | Description | +|------|-------------| +| `view_all_repos` | View all repositories in the organization | +| `view_repo_history` | View the recent commit history for the codebase | +| `view_commit` | View the details of a commit | +| `search_all_repos` | Search for code across all repositories in the organization | +| `get_repo_default_branch` | Get the name of the default branch for the repository | + +## GitHub PR & Issue Management + +| Tool | Description | +|------|-------------| +| `create_pr` | Create a PR for the current branch | +| `view_pr` | View the diff and associated context for a pull request | +| `list_pr_checks` | List the check suites for a PR | +| `view_workflow_run` | View a workflow run | +| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | +| `edit_pr_meta` | Edit a PR's title and/or body and/or state | +| `create_pr_comment` | Create a general comment on a pull request | +| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | + +## GitHub Issues + +| Tool | Description | +|------|-------------| +| `github_create_issue` | Create a new GitHub issue in the repository | +| `view_issue` | View the details of a GitHub issue | +| `create_issue_comment` | Create a general comment on an issue | +| `search_issues` | Search for GitHub issues/PRs using a query string | + +## Linear Issue Management + +| Tool | Description | +|------|-------------| +| `linear_create_issue` | Create a new Linear issue | +| `linear_get_issue` | Get details of a Linear issue by its ID | +| `linear_update_issue` | Update an existing Linear issue | +| `linear_comment_on_issue` | Add a comment to a Linear issue | +| `linear_get_issue_comments` | Get all comments on a Linear issue | +| `linear_search_issues` | Search for Linear issues with flexible filtering options | +| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | + +## Linear Team & Project Management + +| Tool | Description | +|------|-------------| +| `linear_get_teams` | Get all Linear teams the authenticated user has access to | +| `linear_search_teams` | Search for Linear teams using a search string | +| `linear_search_projects` | Search for Linear projects using a search string | +| `linear_get_assignees` | Get all users who can be assigned to issues in a team | +| `linear_search_users` | Search for Linear users using a search string | + +## Linear Issue Metadata + +| Tool | Description | +|------|-------------| +| `linear_get_issue_states` | Get all states for issues in a team | +| `linear_get_issue_priority_values` | Get all issue priority values | +| `linear_get_issue_labels` | Get all labels for issues in a team | + +## Linear Cycles + +| Tool | Description | +|------|-------------| +| `linear_get_active_cycle` | Get the active cycle for a Linear team | +| `linear_get_cycles` | Get all cycles for a Linear team | +| `linear_get_cycle_issues` | Get all issues in a Linear cycle | + +## User Information + +| Tool | Description | +|------|-------------| +| `who_is_user` | Returns information about the user you are interacting with | + +## Database & Visualization + +| Tool | Description | +|------|-------------| +| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | +| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | + +## Reflection & Planning + +| Tool | Description | +|------|-------------| +| `reflect` | Reflect on current understanding and plan next steps | + +## Communication + +| Tool | Description | +|------|-------------| +| `send_message` | Send a message via Slack | + +## Usage Examples + +### Searching a Codebase + +```python +# Search for a specific pattern in the codebase +ripgrep_search(query="function fetchUserData", file_extensions=[".js", ".ts"]) +``` + +### Creating a PR + +```python +# Create a PR for the current branch +create_pr( + title="Add user authentication feature", + body="This PR implements user authentication using OAuth.", + head_branch="feature/user-auth" +) +``` + +### Assigning Reviewers to a PR + +```python +# Assign reviewers to a PR +github_assign_pr_reviewers( + pr_number=123, + assignees=["username1", "username2"] +) +``` + +### Creating a Linear Issue + +```python +# Create a new issue in Linear +linear_create_issue( + title="Implement password reset functionality", + description="Users need a way to reset their passwords when forgotten." +) +``` + +## Tool Availability by Organization + +Note that tool availability may vary by organization settings. Some organizations may have certain tools disabled, such as SQL database access or PR creation capabilities. + +## Further Reading + +For more detailed information about each tool, including all available parameters and return values, please refer to the [API Reference](./openapi3.json) documentation. + From 6b061b28e4a4e25554a0936f35f7937db14ce7b1 Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 03:28:47 +0000 Subject: [PATCH 2/6] Automated pre-commit update --- docs/api-reference/available-tools.md | 159 ++++++++++++-------------- 1 file changed, 74 insertions(+), 85 deletions(-) diff --git a/docs/api-reference/available-tools.md b/docs/api-reference/available-tools.md index 80ffbeba5..11a115016 100644 --- a/docs/api-reference/available-tools.md +++ b/docs/api-reference/available-tools.md @@ -4,124 +4,124 @@ This document provides a comprehensive list of all tools available in Codegen, o ## Code Analysis & Navigation -| Tool | Description | -|------|-------------| -| `ripgrep_search` | Search the codebase using regex pattern matching | +| Tool | Description | +| --------------------- | ------------------------------------------------ | +| `ripgrep_search` | Search the codebase using regex pattern matching | | `set_active_codebase` | Selects a codebase to be "active" for operations | ## File Operations -| Tool | Description | -|------|-------------| -| `file_write` | Create new files or completely overwrite existing files | -| `relace_edit` | Make targeted edits to existing files | +| Tool | Description | +| ------------- | ------------------------------------------------------- | +| `file_write` | Create new files or completely overwrite existing files | +| `relace_edit` | Make targeted edits to existing files | ## Command Execution -| Tool | Description | -|------|-------------| +| Tool | Description | +| ------------- | ---------------------------------------- | | `run_command` | Run a command in a sandboxed environment | ## Web Search & Browsing -| Tool | Description | -|------|-------------| -| `exa_web_search` | Search the web and get content snippets from search results | -| `exa_web_view_page` | View the content of a specific webpage | +| Tool | Description | +| ------------------- | ----------------------------------------------------------- | +| `exa_web_search` | Search the web and get content snippets from search results | +| `exa_web_view_page` | View the content of a specific webpage | ## GitHub Tools -| Tool | Description | -|------|-------------| -| `view_all_repos` | View all repositories in the organization | -| `view_repo_history` | View the recent commit history for the codebase | -| `view_commit` | View the details of a commit | -| `search_all_repos` | Search for code across all repositories in the organization | -| `get_repo_default_branch` | Get the name of the default branch for the repository | +| Tool | Description | +| ------------------------- | ----------------------------------------------------------- | +| `view_all_repos` | View all repositories in the organization | +| `view_repo_history` | View the recent commit history for the codebase | +| `view_commit` | View the details of a commit | +| `search_all_repos` | Search for code across all repositories in the organization | +| `get_repo_default_branch` | Get the name of the default branch for the repository | ## GitHub PR & Issue Management -| Tool | Description | -|------|-------------| -| `create_pr` | Create a PR for the current branch | -| `view_pr` | View the diff and associated context for a pull request | -| `list_pr_checks` | List the check suites for a PR | -| `view_workflow_run` | View a workflow run | -| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | -| `edit_pr_meta` | Edit a PR's title and/or body and/or state | -| `create_pr_comment` | Create a general comment on a pull request | -| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | +| Tool | Description | +| ---------------------------- | -------------------------------------------------------------------- | +| `create_pr` | Create a PR for the current branch | +| `view_pr` | View the diff and associated context for a pull request | +| `list_pr_checks` | List the check suites for a PR | +| `view_workflow_run` | View a workflow run | +| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | +| `edit_pr_meta` | Edit a PR's title and/or body and/or state | +| `create_pr_comment` | Create a general comment on a pull request | +| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | ## GitHub Issues -| Tool | Description | -|------|-------------| -| `github_create_issue` | Create a new GitHub issue in the repository | -| `view_issue` | View the details of a GitHub issue | -| `create_issue_comment` | Create a general comment on an issue | -| `search_issues` | Search for GitHub issues/PRs using a query string | +| Tool | Description | +| ---------------------- | ------------------------------------------------- | +| `github_create_issue` | Create a new GitHub issue in the repository | +| `view_issue` | View the details of a GitHub issue | +| `create_issue_comment` | Create a general comment on an issue | +| `search_issues` | Search for GitHub issues/PRs using a query string | ## Linear Issue Management -| Tool | Description | -|------|-------------| -| `linear_create_issue` | Create a new Linear issue | -| `linear_get_issue` | Get details of a Linear issue by its ID | -| `linear_update_issue` | Update an existing Linear issue | -| `linear_comment_on_issue` | Add a comment to a Linear issue | -| `linear_get_issue_comments` | Get all comments on a Linear issue | -| `linear_search_issues` | Search for Linear issues with flexible filtering options | -| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | +| Tool | Description | +| ------------------------------ | -------------------------------------------------------- | +| `linear_create_issue` | Create a new Linear issue | +| `linear_get_issue` | Get details of a Linear issue by its ID | +| `linear_update_issue` | Update an existing Linear issue | +| `linear_comment_on_issue` | Add a comment to a Linear issue | +| `linear_get_issue_comments` | Get all comments on a Linear issue | +| `linear_search_issues` | Search for Linear issues with flexible filtering options | +| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | ## Linear Team & Project Management -| Tool | Description | -|------|-------------| -| `linear_get_teams` | Get all Linear teams the authenticated user has access to | -| `linear_search_teams` | Search for Linear teams using a search string | -| `linear_search_projects` | Search for Linear projects using a search string | -| `linear_get_assignees` | Get all users who can be assigned to issues in a team | -| `linear_search_users` | Search for Linear users using a search string | +| Tool | Description | +| ------------------------ | --------------------------------------------------------- | +| `linear_get_teams` | Get all Linear teams the authenticated user has access to | +| `linear_search_teams` | Search for Linear teams using a search string | +| `linear_search_projects` | Search for Linear projects using a search string | +| `linear_get_assignees` | Get all users who can be assigned to issues in a team | +| `linear_search_users` | Search for Linear users using a search string | ## Linear Issue Metadata -| Tool | Description | -|------|-------------| -| `linear_get_issue_states` | Get all states for issues in a team | -| `linear_get_issue_priority_values` | Get all issue priority values | -| `linear_get_issue_labels` | Get all labels for issues in a team | +| Tool | Description | +| ---------------------------------- | ----------------------------------- | +| `linear_get_issue_states` | Get all states for issues in a team | +| `linear_get_issue_priority_values` | Get all issue priority values | +| `linear_get_issue_labels` | Get all labels for issues in a team | ## Linear Cycles -| Tool | Description | -|------|-------------| +| Tool | Description | +| ------------------------- | -------------------------------------- | | `linear_get_active_cycle` | Get the active cycle for a Linear team | -| `linear_get_cycles` | Get all cycles for a Linear team | -| `linear_get_cycle_issues` | Get all issues in a Linear cycle | +| `linear_get_cycles` | Get all cycles for a Linear team | +| `linear_get_cycle_issues` | Get all issues in a Linear cycle | ## User Information -| Tool | Description | -|------|-------------| +| Tool | Description | +| ------------- | ----------------------------------------------------------- | | `who_is_user` | Returns information about the user you are interacting with | ## Database & Visualization -| Tool | Description | -|------|-------------| -| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | -| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | +| Tool | Description | +| -------------- | --------------------------------------------------------------------------- | +| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | +| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | ## Reflection & Planning -| Tool | Description | -|------|-------------| +| Tool | Description | +| --------- | ---------------------------------------------------- | | `reflect` | Reflect on current understanding and plan next steps | ## Communication -| Tool | Description | -|------|-------------| +| Tool | Description | +| -------------- | ------------------------ | | `send_message` | Send a message via Slack | ## Usage Examples @@ -137,31 +137,21 @@ ripgrep_search(query="function fetchUserData", file_extensions=[".js", ".ts"]) ```python # Create a PR for the current branch -create_pr( - title="Add user authentication feature", - body="This PR implements user authentication using OAuth.", - head_branch="feature/user-auth" -) +create_pr(title="Add user authentication feature", body="This PR implements user authentication using OAuth.", head_branch="feature/user-auth") ``` ### Assigning Reviewers to a PR ```python # Assign reviewers to a PR -github_assign_pr_reviewers( - pr_number=123, - assignees=["username1", "username2"] -) +github_assign_pr_reviewers(pr_number=123, assignees=["username1", "username2"]) ``` ### Creating a Linear Issue ```python # Create a new issue in Linear -linear_create_issue( - title="Implement password reset functionality", - description="Users need a way to reset their passwords when forgotten." -) +linear_create_issue(title="Implement password reset functionality", description="Users need a way to reset their passwords when forgotten.") ``` ## Tool Availability by Organization @@ -171,4 +161,3 @@ Note that tool availability may vary by organization settings. Some organization ## Further Reading For more detailed information about each tool, including all available parameters and return values, please refer to the [API Reference](./openapi3.json) documentation. - From 3ce020ef4ce3647058d6f80185ad451ef999936c Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 03:30:35 +0000 Subject: [PATCH 3/6] Fix: Exempt codegen-sh[bot] from permission check in GitHub workflow --- .github/workflows/test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9dd2ca80e..3ea874924 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,17 @@ jobs: access-check: runs-on: ubuntu-latest steps: + - name: Check if user is bot + id: check-bot + run: | + if [[ "${{ github.triggering_actor }}" == "codegen-sh[bot]" ]]; then + echo "is_bot=true" >> $GITHUB_OUTPUT + else + echo "is_bot=false" >> $GITHUB_OUTPUT + fi + - uses: actions-cool/check-user-permission@v2 + if: steps.check-bot.outputs.is_bot != 'true' with: require: write username: ${{ github.triggering_actor }} From 846bf77e37bbe1ee11da5fb0157ad11eca887d3d Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 03:31:46 +0000 Subject: [PATCH 4/6] Add tools documentation to sidebar under Introduction section --- docs/docs.json | 1 + docs/introduction/tools.mdx | 177 ++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 docs/introduction/tools.mdx diff --git a/docs/docs.json b/docs/docs.json index 1b1f62939..49b827c83 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -18,6 +18,7 @@ "pages": [ "introduction/overview", "introduction/capabilities", + "introduction/tools", "introduction/api", "introduction/prompting", "introduction/community", diff --git a/docs/introduction/tools.mdx b/docs/introduction/tools.mdx new file mode 100644 index 000000000..463e44109 --- /dev/null +++ b/docs/introduction/tools.mdx @@ -0,0 +1,177 @@ +--- +title: "Available Tools" +sidebarTitle: "Available Tools" +icon: "toolbox" +iconType: "solid" +--- + +# Available Tools in Codegen + +Codegen provides a comprehensive set of tools that enable agents to perform a wide range of tasks across different platforms and services. These tools are organized by category and can be used in various contexts, including Slack interactions, GitHub integrations, and Linear workflows. + +## Code Analysis & Navigation + +| Tool | Description | +|------|-------------| +| `ripgrep_search` | Search the codebase using regex pattern matching | +| `set_active_codebase` | Selects a codebase to be "active" for operations | + +## File Operations + +| Tool | Description | +|------|-------------| +| `file_write` | Create new files or completely overwrite existing files | +| `relace_edit` | Make targeted edits to existing files | + +## Command Execution + +| Tool | Description | +|------|-------------| +| `run_command` | Run a command in a sandboxed environment | + +## Web Search & Browsing + +| Tool | Description | +|------|-------------| +| `exa_web_search` | Search the web and get content snippets from search results | +| `exa_web_view_page` | View the content of a specific webpage | + +## GitHub Tools + +| Tool | Description | +|------|-------------| +| `view_all_repos` | View all repositories in the organization | +| `view_repo_history` | View the recent commit history for the codebase | +| `view_commit` | View the details of a commit | +| `search_all_repos` | Search for code across all repositories in the organization | +| `get_repo_default_branch` | Get the name of the default branch for the repository | + +## GitHub PR & Issue Management + +| Tool | Description | +|------|-------------| +| `create_pr` | Create a PR for the current branch | +| `view_pr` | View the diff and associated context for a pull request | +| `list_pr_checks` | List the check suites for a PR | +| `view_workflow_run` | View a workflow run | +| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | +| `edit_pr_meta` | Edit a PR's title and/or body and/or state | +| `create_pr_comment` | Create a general comment on a pull request | +| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | + +## GitHub Issues + +| Tool | Description | +|------|-------------| +| `github_create_issue` | Create a new GitHub issue in the repository | +| `view_issue` | View the details of a GitHub issue | +| `create_issue_comment` | Create a general comment on an issue | +| `search_issues` | Search for GitHub issues/PRs using a query string | + +## Linear Issue Management + +| Tool | Description | +|------|-------------| +| `linear_create_issue` | Create a new Linear issue | +| `linear_get_issue` | Get details of a Linear issue by its ID | +| `linear_update_issue` | Update an existing Linear issue | +| `linear_comment_on_issue` | Add a comment to a Linear issue | +| `linear_get_issue_comments` | Get all comments on a Linear issue | +| `linear_search_issues` | Search for Linear issues with flexible filtering options | +| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | + +## Linear Team & Project Management + +| Tool | Description | +|------|-------------| +| `linear_get_teams` | Get all Linear teams the authenticated user has access to | +| `linear_search_teams` | Search for Linear teams using a search string | +| `linear_search_projects` | Search for Linear projects using a search string | +| `linear_get_assignees` | Get all users who can be assigned to issues in a team | +| `linear_search_users` | Search for Linear users using a search string | + +## Linear Issue Metadata + +| Tool | Description | +|------|-------------| +| `linear_get_issue_states` | Get all states for issues in a team | +| `linear_get_issue_priority_values` | Get all issue priority values | +| `linear_get_issue_labels` | Get all labels for issues in a team | + +## Linear Cycles + +| Tool | Description | +|------|-------------| +| `linear_get_active_cycle` | Get the active cycle for a Linear team | +| `linear_get_cycles` | Get all cycles for a Linear team | +| `linear_get_cycle_issues` | Get all issues in a Linear cycle | + +## User Information + +| Tool | Description | +|------|-------------| +| `who_is_user` | Returns information about the user you are interacting with | + +## Database & Visualization + +| Tool | Description | +|------|-------------| +| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | +| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | + +## Reflection & Planning + +| Tool | Description | +|------|-------------| +| `reflect` | Reflect on current understanding and plan next steps | + +## Communication + +| Tool | Description | +|------|-------------| +| `send_message` | Send a message via Slack | + +## Usage Examples + +### Searching a Codebase + +```python +# Search for a specific pattern in the codebase +ripgrep_search(query="function fetchUserData", file_extensions=[".js", ".ts"]) +``` + +### Creating a PR + +```python +# Create a PR for the current branch +create_pr( + title="Add user authentication feature", + body="This PR implements user authentication using OAuth.", + head_branch="feature/user-auth" +) +``` + +### Assigning Reviewers to a PR + +```python +# Assign reviewers to a PR +github_assign_pr_reviewers( + pr_number=123, + assignees=["username1", "username2"] +) +``` + +### Creating a Linear Issue + +```python +# Create a new issue in Linear +linear_create_issue( + title="Implement password reset functionality", + description="Users need a way to reset their passwords when forgotten." +) +``` + +## Tool Availability by Organization + +Note that tool availability may vary by organization settings. Some organizations may have certain tools disabled, such as SQL database access or PR creation capabilities. + From 338f898d84901528598dc898af116efc8a745c12 Mon Sep 17 00:00:00 2001 From: jayhack Date: Thu, 22 May 2025 09:15:36 -0700 Subject: [PATCH 5/6] . --- docs/introduction/capabilities.mdx | 2 +- docs/introduction/tools.mdx | 213 +++++++++-------------------- 2 files changed, 62 insertions(+), 153 deletions(-) diff --git a/docs/introduction/capabilities.mdx b/docs/introduction/capabilities.mdx index d53b2a8de..14b658806 100644 --- a/docs/introduction/capabilities.mdx +++ b/docs/introduction/capabilities.mdx @@ -5,7 +5,7 @@ icon: "gear" iconType: "solid" --- -Codegen agents come equipped with a versatile set of tools and capabilities designed to seamlessly integrate into your development workflow and automate a wide range of tasks. +Codegen agents, with an underlying architecture based on Claude Code, come equipped with a versatile set of tools and capabilities designed to seamlessly integrate into your development workflow and automate a wide range of tasks. ## Integrated Tool Suites diff --git a/docs/introduction/tools.mdx b/docs/introduction/tools.mdx index 463e44109..4ae4968dc 100644 --- a/docs/introduction/tools.mdx +++ b/docs/introduction/tools.mdx @@ -5,173 +5,82 @@ icon: "toolbox" iconType: "solid" --- -# Available Tools in Codegen - Codegen provides a comprehensive set of tools that enable agents to perform a wide range of tasks across different platforms and services. These tools are organized by category and can be used in various contexts, including Slack interactions, GitHub integrations, and Linear workflows. -## Code Analysis & Navigation - -| Tool | Description | -|------|-------------| -| `ripgrep_search` | Search the codebase using regex pattern matching | -| `set_active_codebase` | Selects a codebase to be "active" for operations | - -## File Operations - -| Tool | Description | -|------|-------------| -| `file_write` | Create new files or completely overwrite existing files | -| `relace_edit` | Make targeted edits to existing files | - -## Command Execution +## Sandbox Interaction Tools -| Tool | Description | -|------|-------------| -| `run_command` | Run a command in a sandboxed environment | +| Tool | Description | +| --------------------- | ------------------------------------------------------- | +| `ripgrep_search` | Search the codebase using regex pattern matching | +| `set_active_codebase` | Selects a codebase to be "active" for operations | +| `file_write` | Create new files or completely overwrite existing files | +| `relace_edit` | Make targeted edits to existing files | +| `run_command` | Run a command in a sandboxed environment | ## Web Search & Browsing -| Tool | Description | -|------|-------------| -| `exa_web_search` | Search the web and get content snippets from search results | -| `exa_web_view_page` | View the content of a specific webpage | - -## GitHub Tools - -| Tool | Description | -|------|-------------| -| `view_all_repos` | View all repositories in the organization | -| `view_repo_history` | View the recent commit history for the codebase | -| `view_commit` | View the details of a commit | -| `search_all_repos` | Search for code across all repositories in the organization | -| `get_repo_default_branch` | Get the name of the default branch for the repository | - -## GitHub PR & Issue Management - -| Tool | Description | -|------|-------------| -| `create_pr` | Create a PR for the current branch | -| `view_pr` | View the diff and associated context for a pull request | -| `list_pr_checks` | List the check suites for a PR | -| `view_workflow_run` | View a workflow run | -| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | -| `edit_pr_meta` | Edit a PR's title and/or body and/or state | -| `create_pr_comment` | Create a general comment on a pull request | -| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | - -## GitHub Issues - -| Tool | Description | -|------|-------------| -| `github_create_issue` | Create a new GitHub issue in the repository | -| `view_issue` | View the details of a GitHub issue | -| `create_issue_comment` | Create a general comment on an issue | -| `search_issues` | Search for GitHub issues/PRs using a query string | - -## Linear Issue Management - -| Tool | Description | -|------|-------------| -| `linear_create_issue` | Create a new Linear issue | -| `linear_get_issue` | Get details of a Linear issue by its ID | -| `linear_update_issue` | Update an existing Linear issue | -| `linear_comment_on_issue` | Add a comment to a Linear issue | -| `linear_get_issue_comments` | Get all comments on a Linear issue | -| `linear_search_issues` | Search for Linear issues with flexible filtering options | -| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | - -## Linear Team & Project Management - -| Tool | Description | -|------|-------------| -| `linear_get_teams` | Get all Linear teams the authenticated user has access to | -| `linear_search_teams` | Search for Linear teams using a search string | -| `linear_search_projects` | Search for Linear projects using a search string | -| `linear_get_assignees` | Get all users who can be assigned to issues in a team | -| `linear_search_users` | Search for Linear users using a search string | - -## Linear Issue Metadata - -| Tool | Description | -|------|-------------| -| `linear_get_issue_states` | Get all states for issues in a team | -| `linear_get_issue_priority_values` | Get all issue priority values | -| `linear_get_issue_labels` | Get all labels for issues in a team | - -## Linear Cycles - -| Tool | Description | -|------|-------------| -| `linear_get_active_cycle` | Get the active cycle for a Linear team | -| `linear_get_cycles` | Get all cycles for a Linear team | -| `linear_get_cycle_issues` | Get all issues in a Linear cycle | +| Tool | Description | +| ------------------- | ----------------------------------------------------------- | +| `exa_web_search` | Search the web and get content snippets from search results | +| `exa_web_view_page` | View the content of a specific webpage | + +## GitHub + +| Tool | Description | +| ---------------------------- | -------------------------------------------------------------------- | +| `view_all_repos` | View all repositories in the organization | +| `view_repo_history` | View the recent commit history for the codebase | +| `view_commit` | View the details of a commit | +| `search_all_repos` | Search for code across all repositories in the organization | +| `get_repo_default_branch` | Get the name of the default branch for the repository | +| `create_pr` | Create a PR for the current branch | +| `view_pr` | View the diff and associated context for a pull request | +| `list_pr_checks` | List the check suites for a PR | +| `view_workflow_run` | View a workflow run | +| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | +| `edit_pr_meta` | Edit a PR's title and/or body and/or state | +| `create_pr_comment` | Create a general comment on a pull request | +| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | +| `github_create_issue` | Create a new GitHub issue in the repository | +| `view_issue` | View the details of a GitHub issue | +| `create_issue_comment` | Create a general comment on an issue | +| `search_issues` | Search for GitHub issues/PRs using a query string | + +## Linear + +| Tool | Description | +| ---------------------------------- | --------------------------------------------------------- | +| `linear_create_issue` | Create a new Linear issue | +| `linear_get_issue` | Get details of a Linear issue by its ID | +| `linear_update_issue` | Update an existing Linear issue | +| `linear_comment_on_issue` | Add a comment to a Linear issue | +| `linear_get_issue_comments` | Get all comments on a Linear issue | +| `linear_search_issues` | Search for Linear issues with flexible filtering options | +| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | +| `linear_get_teams` | Get all Linear teams the authenticated user has access to | +| `linear_search_teams` | Search for Linear teams using a search string | +| `linear_search_projects` | Search for Linear projects using a search string | +| `linear_get_assignees` | Get all users who can be assigned to issues in a team | +| `linear_search_users` | Search for Linear users using a search string | +| `linear_get_issue_states` | Get all states for issues in a team | +| `linear_get_issue_priority_values` | Get all issue priority values | +| `linear_get_issue_labels` | Get all labels for issues in a team | +| `linear_get_active_cycle` | Get the active cycle for a Linear team | +| `linear_get_cycles` | Get all cycles for a Linear team | +| `linear_get_cycle_issues` | Get all issues in a Linear cycle | ## User Information -| Tool | Description | -|------|-------------| +| Tool | Description | +| ------------- | ----------------------------------------------------------- | | `who_is_user` | Returns information about the user you are interacting with | -## Database & Visualization - -| Tool | Description | -|------|-------------| -| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | -| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | - -## Reflection & Planning - -| Tool | Description | -|------|-------------| -| `reflect` | Reflect on current understanding and plan next steps | - ## Communication -| Tool | Description | -|------|-------------| +| Tool | Description | +| -------------- | ------------------------ | | `send_message` | Send a message via Slack | -## Usage Examples - -### Searching a Codebase - -```python -# Search for a specific pattern in the codebase -ripgrep_search(query="function fetchUserData", file_extensions=[".js", ".ts"]) -``` - -### Creating a PR - -```python -# Create a PR for the current branch -create_pr( - title="Add user authentication feature", - body="This PR implements user authentication using OAuth.", - head_branch="feature/user-auth" -) -``` - -### Assigning Reviewers to a PR - -```python -# Assign reviewers to a PR -github_assign_pr_reviewers( - pr_number=123, - assignees=["username1", "username2"] -) -``` - -### Creating a Linear Issue - -```python -# Create a new issue in Linear -linear_create_issue( - title="Implement password reset functionality", - description="Users need a way to reset their passwords when forgotten." -) -``` - ## Tool Availability by Organization Note that tool availability may vary by organization settings. Some organizations may have certain tools disabled, such as SQL database access or PR creation capabilities. - From db6762ed714aa9279c056edc9dd8051838ea0ba8 Mon Sep 17 00:00:00 2001 From: Jay Hack Date: Thu, 22 May 2025 09:16:24 -0700 Subject: [PATCH 6/6] Delete docs/api-reference/available-tools.md --- docs/api-reference/available-tools.md | 163 -------------------------- 1 file changed, 163 deletions(-) delete mode 100644 docs/api-reference/available-tools.md diff --git a/docs/api-reference/available-tools.md b/docs/api-reference/available-tools.md deleted file mode 100644 index 11a115016..000000000 --- a/docs/api-reference/available-tools.md +++ /dev/null @@ -1,163 +0,0 @@ -# Available Tools in Codegen - -This document provides a comprehensive list of all tools available in Codegen, organized by category. These tools can be used in various contexts, including Slack interactions, GitHub integrations, and Linear workflows. - -## Code Analysis & Navigation - -| Tool | Description | -| --------------------- | ------------------------------------------------ | -| `ripgrep_search` | Search the codebase using regex pattern matching | -| `set_active_codebase` | Selects a codebase to be "active" for operations | - -## File Operations - -| Tool | Description | -| ------------- | ------------------------------------------------------- | -| `file_write` | Create new files or completely overwrite existing files | -| `relace_edit` | Make targeted edits to existing files | - -## Command Execution - -| Tool | Description | -| ------------- | ---------------------------------------- | -| `run_command` | Run a command in a sandboxed environment | - -## Web Search & Browsing - -| Tool | Description | -| ------------------- | ----------------------------------------------------------- | -| `exa_web_search` | Search the web and get content snippets from search results | -| `exa_web_view_page` | View the content of a specific webpage | - -## GitHub Tools - -| Tool | Description | -| ------------------------- | ----------------------------------------------------------- | -| `view_all_repos` | View all repositories in the organization | -| `view_repo_history` | View the recent commit history for the codebase | -| `view_commit` | View the details of a commit | -| `search_all_repos` | Search for code across all repositories in the organization | -| `get_repo_default_branch` | Get the name of the default branch for the repository | - -## GitHub PR & Issue Management - -| Tool | Description | -| ---------------------------- | -------------------------------------------------------------------- | -| `create_pr` | Create a PR for the current branch | -| `view_pr` | View the diff and associated context for a pull request | -| `list_pr_checks` | List the check suites for a PR | -| `view_workflow_run` | View a workflow run | -| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | -| `edit_pr_meta` | Edit a PR's title and/or body and/or state | -| `create_pr_comment` | Create a general comment on a pull request | -| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | - -## GitHub Issues - -| Tool | Description | -| ---------------------- | ------------------------------------------------- | -| `github_create_issue` | Create a new GitHub issue in the repository | -| `view_issue` | View the details of a GitHub issue | -| `create_issue_comment` | Create a general comment on an issue | -| `search_issues` | Search for GitHub issues/PRs using a query string | - -## Linear Issue Management - -| Tool | Description | -| ------------------------------ | -------------------------------------------------------- | -| `linear_create_issue` | Create a new Linear issue | -| `linear_get_issue` | Get details of a Linear issue by its ID | -| `linear_update_issue` | Update an existing Linear issue | -| `linear_comment_on_issue` | Add a comment to a Linear issue | -| `linear_get_issue_comments` | Get all comments on a Linear issue | -| `linear_search_issues` | Search for Linear issues with flexible filtering options | -| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | - -## Linear Team & Project Management - -| Tool | Description | -| ------------------------ | --------------------------------------------------------- | -| `linear_get_teams` | Get all Linear teams the authenticated user has access to | -| `linear_search_teams` | Search for Linear teams using a search string | -| `linear_search_projects` | Search for Linear projects using a search string | -| `linear_get_assignees` | Get all users who can be assigned to issues in a team | -| `linear_search_users` | Search for Linear users using a search string | - -## Linear Issue Metadata - -| Tool | Description | -| ---------------------------------- | ----------------------------------- | -| `linear_get_issue_states` | Get all states for issues in a team | -| `linear_get_issue_priority_values` | Get all issue priority values | -| `linear_get_issue_labels` | Get all labels for issues in a team | - -## Linear Cycles - -| Tool | Description | -| ------------------------- | -------------------------------------- | -| `linear_get_active_cycle` | Get the active cycle for a Linear team | -| `linear_get_cycles` | Get all cycles for a Linear team | -| `linear_get_cycle_issues` | Get all issues in a Linear cycle | - -## User Information - -| Tool | Description | -| ------------- | ----------------------------------------------------------- | -| `who_is_user` | Returns information about the user you are interacting with | - -## Database & Visualization - -| Tool | Description | -| -------------- | --------------------------------------------------------------------------- | -| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | -| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | - -## Reflection & Planning - -| Tool | Description | -| --------- | ---------------------------------------------------- | -| `reflect` | Reflect on current understanding and plan next steps | - -## Communication - -| Tool | Description | -| -------------- | ------------------------ | -| `send_message` | Send a message via Slack | - -## Usage Examples - -### Searching a Codebase - -```python -# Search for a specific pattern in the codebase -ripgrep_search(query="function fetchUserData", file_extensions=[".js", ".ts"]) -``` - -### Creating a PR - -```python -# Create a PR for the current branch -create_pr(title="Add user authentication feature", body="This PR implements user authentication using OAuth.", head_branch="feature/user-auth") -``` - -### Assigning Reviewers to a PR - -```python -# Assign reviewers to a PR -github_assign_pr_reviewers(pr_number=123, assignees=["username1", "username2"]) -``` - -### Creating a Linear Issue - -```python -# Create a new issue in Linear -linear_create_issue(title="Implement password reset functionality", description="Users need a way to reset their passwords when forgotten.") -``` - -## Tool Availability by Organization - -Note that tool availability may vary by organization settings. Some organizations may have certain tools disabled, such as SQL database access or PR creation capabilities. - -## Further Reading - -For more detailed information about each tool, including all available parameters and return values, please refer to the [API Reference](./openapi3.json) documentation.