|
| 1 | +--- |
| 2 | +title: "Available Tools" |
| 3 | +sidebarTitle: "Available Tools" |
| 4 | +icon: "toolbox" |
| 5 | +iconType: "solid" |
| 6 | +--- |
| 7 | + |
| 8 | +# Available Tools in Codegen |
| 9 | + |
| 10 | +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. |
| 11 | + |
| 12 | +## Code Analysis & Navigation |
| 13 | + |
| 14 | +| Tool | Description | |
| 15 | +|------|-------------| |
| 16 | +| `ripgrep_search` | Search the codebase using regex pattern matching | |
| 17 | +| `set_active_codebase` | Selects a codebase to be "active" for operations | |
| 18 | + |
| 19 | +## File Operations |
| 20 | + |
| 21 | +| Tool | Description | |
| 22 | +|------|-------------| |
| 23 | +| `file_write` | Create new files or completely overwrite existing files | |
| 24 | +| `relace_edit` | Make targeted edits to existing files | |
| 25 | + |
| 26 | +## Command Execution |
| 27 | + |
| 28 | +| Tool | Description | |
| 29 | +|------|-------------| |
| 30 | +| `run_command` | Run a command in a sandboxed environment | |
| 31 | + |
| 32 | +## Web Search & Browsing |
| 33 | + |
| 34 | +| Tool | Description | |
| 35 | +|------|-------------| |
| 36 | +| `exa_web_search` | Search the web and get content snippets from search results | |
| 37 | +| `exa_web_view_page` | View the content of a specific webpage | |
| 38 | + |
| 39 | +## GitHub Tools |
| 40 | + |
| 41 | +| Tool | Description | |
| 42 | +|------|-------------| |
| 43 | +| `view_all_repos` | View all repositories in the organization | |
| 44 | +| `view_repo_history` | View the recent commit history for the codebase | |
| 45 | +| `view_commit` | View the details of a commit | |
| 46 | +| `search_all_repos` | Search for code across all repositories in the organization | |
| 47 | +| `get_repo_default_branch` | Get the name of the default branch for the repository | |
| 48 | + |
| 49 | +## GitHub PR & Issue Management |
| 50 | + |
| 51 | +| Tool | Description | |
| 52 | +|------|-------------| |
| 53 | +| `create_pr` | Create a PR for the current branch | |
| 54 | +| `view_pr` | View the diff and associated context for a pull request | |
| 55 | +| `list_pr_checks` | List the check suites for a PR | |
| 56 | +| `view_workflow_run` | View a workflow run | |
| 57 | +| `github_assign_pr_reviewers` | Assign a reviewer to a GitHub PR | |
| 58 | +| `edit_pr_meta` | Edit a PR's title and/or body and/or state | |
| 59 | +| `create_pr_comment` | Create a general comment on a pull request | |
| 60 | +| `create_pr_review_comment` | Create an inline review comment on a specific line in a pull request | |
| 61 | + |
| 62 | +## GitHub Issues |
| 63 | + |
| 64 | +| Tool | Description | |
| 65 | +|------|-------------| |
| 66 | +| `github_create_issue` | Create a new GitHub issue in the repository | |
| 67 | +| `view_issue` | View the details of a GitHub issue | |
| 68 | +| `create_issue_comment` | Create a general comment on an issue | |
| 69 | +| `search_issues` | Search for GitHub issues/PRs using a query string | |
| 70 | + |
| 71 | +## Linear Issue Management |
| 72 | + |
| 73 | +| Tool | Description | |
| 74 | +|------|-------------| |
| 75 | +| `linear_create_issue` | Create a new Linear issue | |
| 76 | +| `linear_get_issue` | Get details of a Linear issue by its ID | |
| 77 | +| `linear_update_issue` | Update an existing Linear issue | |
| 78 | +| `linear_comment_on_issue` | Add a comment to a Linear issue | |
| 79 | +| `linear_get_issue_comments` | Get all comments on a Linear issue | |
| 80 | +| `linear_search_issues` | Search for Linear issues with flexible filtering options | |
| 81 | +| `linear_assign_issue_to_cycle` | Assign a Linear issue to a cycle | |
| 82 | + |
| 83 | +## Linear Team & Project Management |
| 84 | + |
| 85 | +| Tool | Description | |
| 86 | +|------|-------------| |
| 87 | +| `linear_get_teams` | Get all Linear teams the authenticated user has access to | |
| 88 | +| `linear_search_teams` | Search for Linear teams using a search string | |
| 89 | +| `linear_search_projects` | Search for Linear projects using a search string | |
| 90 | +| `linear_get_assignees` | Get all users who can be assigned to issues in a team | |
| 91 | +| `linear_search_users` | Search for Linear users using a search string | |
| 92 | + |
| 93 | +## Linear Issue Metadata |
| 94 | + |
| 95 | +| Tool | Description | |
| 96 | +|------|-------------| |
| 97 | +| `linear_get_issue_states` | Get all states for issues in a team | |
| 98 | +| `linear_get_issue_priority_values` | Get all issue priority values | |
| 99 | +| `linear_get_issue_labels` | Get all labels for issues in a team | |
| 100 | + |
| 101 | +## Linear Cycles |
| 102 | + |
| 103 | +| Tool | Description | |
| 104 | +|------|-------------| |
| 105 | +| `linear_get_active_cycle` | Get the active cycle for a Linear team | |
| 106 | +| `linear_get_cycles` | Get all cycles for a Linear team | |
| 107 | +| `linear_get_cycle_issues` | Get all issues in a Linear cycle | |
| 108 | + |
| 109 | +## User Information |
| 110 | + |
| 111 | +| Tool | Description | |
| 112 | +|------|-------------| |
| 113 | +| `who_is_user` | Returns information about the user you are interacting with | |
| 114 | + |
| 115 | +## Database & Visualization |
| 116 | + |
| 117 | +| Tool | Description | |
| 118 | +|------|-------------| |
| 119 | +| `sql_query` | Executes a SQL query against a pre-configured read-only PostgreSQL database | |
| 120 | +| `plotly_chart` | Creates a Plotly chart visualization from SQL query results | |
| 121 | + |
| 122 | +## Reflection & Planning |
| 123 | + |
| 124 | +| Tool | Description | |
| 125 | +|------|-------------| |
| 126 | +| `reflect` | Reflect on current understanding and plan next steps | |
| 127 | + |
| 128 | +## Communication |
| 129 | + |
| 130 | +| Tool | Description | |
| 131 | +|------|-------------| |
| 132 | +| `send_message` | Send a message via Slack | |
| 133 | + |
| 134 | +## Usage Examples |
| 135 | + |
| 136 | +### Searching a Codebase |
| 137 | + |
| 138 | +```python |
| 139 | +# Search for a specific pattern in the codebase |
| 140 | +ripgrep_search(query="function fetchUserData", file_extensions=[".js", ".ts"]) |
| 141 | +``` |
| 142 | + |
| 143 | +### Creating a PR |
| 144 | + |
| 145 | +```python |
| 146 | +# Create a PR for the current branch |
| 147 | +create_pr( |
| 148 | + title="Add user authentication feature", |
| 149 | + body="This PR implements user authentication using OAuth.", |
| 150 | + head_branch="feature/user-auth" |
| 151 | +) |
| 152 | +``` |
| 153 | + |
| 154 | +### Assigning Reviewers to a PR |
| 155 | + |
| 156 | +```python |
| 157 | +# Assign reviewers to a PR |
| 158 | +github_assign_pr_reviewers( |
| 159 | + pr_number=123, |
| 160 | + assignees=["username1", "username2"] |
| 161 | +) |
| 162 | +``` |
| 163 | + |
| 164 | +### Creating a Linear Issue |
| 165 | + |
| 166 | +```python |
| 167 | +# Create a new issue in Linear |
| 168 | +linear_create_issue( |
| 169 | + title="Implement password reset functionality", |
| 170 | + description="Users need a way to reset their passwords when forgotten." |
| 171 | +) |
| 172 | +``` |
| 173 | + |
| 174 | +## Tool Availability by Organization |
| 175 | + |
| 176 | +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. |
| 177 | + |
0 commit comments