> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sourcegraph

> Sourcegraph is a code intelligence platform that enables developers to search, understand, and manage code across large codebases.

![Sourcegraph logo](https://mintcdn.com/composio-preview/B09iGux45A5cYDuO/images/toolkits/sourcegraph.svg?fit=max\&auto=format\&n=B09iGux45A5cYDuO\&q=85\&s=ad9c782ceba8293360dc1ab4a9e4a7b6)

* **Category:** developer tools
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 8
* **Triggers:** 0
* **Slug:** `SOURCEGRAPH`
* **Version:** 20261101\_00

## Tools

> [accordion] Check Site Settings Edit Permission
>
> **Slug:** `SOURCEGRAPH_CHECK_SITE_SETTINGS_EDIT_PERMISSION`
>
> Tool to check whether site settings can be edited through the API. Use when you need to confirm the API allows site settings edits before attempting configuration changes.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Compare Commits
>
> **Slug:** `SOURCEGRAPH_COMPARE_COMMITS`
>
> Tool to compare two commits in a repository and retrieve their file diffs. Use after confirming the repository name and commit SHAs to inspect differences.
>
> #### Input Parameters
>
> **base** `string` *required*
>
> Base commit SHA or ref to compare from
>
> **head** `string` *required*
>
> Head commit SHA or ref to compare to
>
> **repo** `string` *required*
>
> Repository name in format 'github.com/owner/repo'
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Commit Details
>
> **Slug:** `SOURCEGRAPH_GET_COMMIT_DETAILS`
>
> Get detailed information about a specific commit in a repository.
>
> #### Input Parameters
>
> **rev** `string` *required*
>
> Commit SHA, branch name, or tag to get details for
>
> **repo** `string` *required*
>
> Repository name in format 'github.com/owner/repo'
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Current User
>
> **Slug:** `SOURCEGRAPH_GET_CURRENT_USER`
>
> Tool to retrieve information about the currently authenticated user. Use when needing confirmation of identity via Sourcegraph GraphQL API.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get File Contents
>
> **Slug:** `SOURCEGRAPH_GET_FILE_CONTENTS`
>
> Tool to fetch the contents of a specified file on the default branch. Use when you need raw file text without cloning the repo or using a slower code-host API.
>
> #### Input Parameters
>
> **file\_path** `string` *required*
>
> Path to the file in the repository, relative to the root, e.g., 'README.md'.
>
> **repo\_name** `string` *required*
>
> Full repository name, including host and path, e.g., 'github.com/uber/react-map-gl'.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Repositories
>
> **Slug:** `SOURCEGRAPH_LIST_REPOSITORIES`
>
> Tool to list repositories on the Sourcegraph instance. Use when you need to paginate through all available repositories.
>
> #### Input Parameters
>
> **after** `string`
>
> Pagination cursor returned from previous page; omit for first page.
>
> **first** `integer` *required*
>
> Number of repositories to retrieve (1-1000).
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Repository Files
>
> **Slug:** `SOURCEGRAPH_LIST_REPOSITORY_FILES`
>
> List files and directories directly within a repository path at a specified revision. A missing repository, commit, or tree can yield an empty entries list.
>
> #### Input Parameters
>
> **rev** `string`
>
> Git ref (branch, tag, or commit SHA). Defaults to HEAD.
>
> **path** `string`
>
> Path within the repository. Defaults to root ('').
>
> **recursive** `boolean`
>
> Whether to list files recursively. Defaults to True.
>
> **repo\_name** `string` *required*
>
> Full repository name, e.g., 'github.com/owner/repo'
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List repository languages
>
> **Slug:** `SOURCEGRAPH_LIST_REPOSITORY_LANGUAGES`
>
> Tool to list languages used in a repository. Use when you need to determine the primary and all languages of a given repository; call after you have the repository name.
>
> #### Input Parameters
>
> **repoName** `string` *required*
>
> Full name of the repository (e.g., 'github.com/gorilla/mux').
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
