Tools
Reference for all tools available through the DeepSource MCP server.
MCP clients automatically discover available tools when they connect to the server. This page is a reference for all 30 tools, their parameters, and what they return.
Common patterns
Identifying repositories
Most tools require you to identify a repository using three fields:
| Field | Description |
|---|---|
account | The account login (organization or username) that owns the repository |
name | The repository name |
vcs_provider | The VCS provider (see below) |
VCS providers
Where a tool accepts a vcs_provider parameter, use one of these values:
| Value | Provider |
|---|---|
GITHUB | GitHub Cloud |
GITHUB_SELF_HOSTED | GitHub Enterprise Server |
GITLAB | GitLab Cloud |
GITLAB_SELF_HOSTED | GitLab Self-Managed |
BITBUCKET | Bitbucket Cloud |
BITBUCKET_DATA_CENTER | Bitbucket Data Center |
Pagination
List tools return paginated results. Use these parameters to navigate pages:
| Parameter | Type | Description |
|---|---|---|
cursor | string | Cursor for the next page (returned as next_cursor in responses) |
limit | integer | Results per page. Default: 50, max: 250 |
User & Accounts
get_current_user
Identify the authenticated user. Returns name, email address, and avatar.
Parameters: None
list_accounts
Find organizations and teams you have access to. Use this to find an account's login for use with other tools.
| Parameter | Type | Required | Description |
|---|---|---|---|
vcs_provider | string | No | Filter by VCS provider |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_account
Get detailed information about a specific organization or team, including member count, repository count, and whether Autofix is enabled.
| Parameter | Type | Required | Description |
|---|---|---|---|
login | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
get_usage_summary
Get usage summary for an organization — credit balance, PRs reviewed, commits analyzed, and monitored dependency targets.
| Parameter | Type | Required | Description |
|---|---|---|---|
login | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
Repositories
list_repositories
List repositories activated on DeepSource for an account.
| Parameter | Type | Required | Description |
|---|---|---|---|
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_repository
Get detailed information about a repository — activation status, enabled analyzers, issue statistics, and configuration. A good starting point for exploring a repository's code quality.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
Analysis Runs
list_runs
List analysis scans for a repository. Each run represents a code analysis triggered by a commit or pull request.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
status | string | No | Filter by status: PENDING, SUCCESS, FAILURE, TIMEOUT, CANCELLED, READY, SKIPPED |
branch | string | No | Filter by branch name |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_run
Get details of a specific analysis scan. Look up by run ID or by commit SHA (with repository info).
| Parameter | Type | Required | Description |
|---|---|---|---|
run_id | string | No | Run UUID |
commit_oid | string | No | Commit SHA |
name | string | No | Repository name (required with commit_oid) |
account | string | No | Account login (required with commit_oid) |
vcs_provider | string | No | VCS provider (required with commit_oid) |
Provide either run_id or commit_oid with repository info. When using commit_oid, name, account, and vcs_provider are required.
get_run_report
Get the quality grade card for a scan — letter grades (A-D) and scores across five dimensions: security, reliability, complexity, code hygiene, and test coverage.
| Parameter | Type | Required | Description |
|---|---|---|---|
run_id | string | Yes | Run UUID |
list_checks
List per-analyzer results within an analysis scan. Each check shows what a single analyzer found — its status, issues raised, and issues resolved.
| Parameter | Type | Required | Description |
|---|---|---|---|
run_id | string | Yes | Run UUID |
analyzer | string | No | Filter by analyzer shortcode |
status | string | No | Filter by status: WAITING, PENDING, SUCCESS, FAILURE, TIMEOUT, CANCELLED, READY, NEUTRAL, SKIPPED |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_check
Get detailed results from a specific analyzer check, including issue counts, reported metrics, and errors encountered during analysis.
| Parameter | Type | Required | Description |
|---|---|---|---|
check_id | integer | Yes | Check ID |
Pull Requests
list_pull_requests
List pull requests that DeepSource has reviewed for a repository.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
state | string | No | Filter by state: OPEN, CLOSED |
branch | string | No | Filter by branch name |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_pull_request
Get DeepSource's code review results for a specific pull request — issues raised, resolved, and the latest analysis run.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
pr_number | integer | Yes | Pull request number |
Code Issues
list_analysis_issues
List code issues found by DeepSource's static analyzers and AI code review. Look up by pull request, run, or check. Use this to see what DeepSource found in a PR or analysis scan.
| Parameter | Type | Required | Description |
|---|---|---|---|
check_id | integer | No | Check ID |
run_id | string | No | Run UUID |
pr_number | integer | No | Pull request number |
name | string | No | Repository name (required with pr_number) |
account | string | No | Account login (required with pr_number) |
vcs_provider | string | No | VCS provider (required with pr_number) |
source | string | No | Filter by source: STATIC, AI |
category | string | No | Filter by category (see below) |
severity | string | No | Filter by severity: CRITICAL, MAJOR, MINOR |
is_suppressed | boolean | No | Filter by suppression status |
occurrence_type | string | No | Filter by type: NEW, EXISTING |
path | string | No | Filter by file path (prefix match) |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
Provide one of check_id, run_id, or pr_number (with repository info) to scope the results.
Issue categories: BUG_RISK, ANTIPATTERN, SECURITY, STYLE, PERFORMANCE, DOCUMENTATION, TYPECHECK, COVERAGE, SECRETS
get_occurrence
Get full details of a specific code issue, including the source code snippet with surrounding context, the rule that was violated, exact file location, and whether an autofix is available.
| Parameter | Type | Required | Description |
|---|---|---|---|
occurrence_id | integer | Yes | Occurrence ID (from list_analysis_issues) |
list_repository_issues
List all issues currently present in a repository's default branch. This is the overall health view — aggregated issues across all past scans. Use this to see what issues exist in the codebase right now.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
category | string | No | Filter by category |
severity | string | No | Filter by severity: CRITICAL, MAJOR, MINOR |
analyzer | string | No | Filter by analyzer shortcode |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_issue
Look up a DeepSource analysis rule by its shortcode (e.g., PYL-E4051, JS-0001). Returns what the rule checks for, why it matters, its severity, and category.
| Parameter | Type | Required | Description |
|---|---|---|---|
shortcode | string | Yes | Issue shortcode |
This returns the rule definition, not a specific code location. To see where issues were found in code, use list_analysis_issues or list_repository_issues.
search_issues
Search DeepSource's catalog of analysis rules by shortcode or keyword. Use this when you don't know the exact shortcode — for example, search "unused import" to find PYL-W0611.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query |
analyzer | string | No | Filter by analyzer shortcode |
category | string | No | Filter by category |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
Metrics
list_metrics
List code quality metrics tracked for a repository — line coverage, branch coverage, documentation coverage, and other health metrics.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
shortcode | string | No | Filter by metric shortcode (e.g., LCV for line coverage) |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_metric
Get the current value of a specific metric, including pass/fail threshold and trend direction.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
shortcode | string | Yes | Metric shortcode |
key | string | No | Metric namespace key (for analyzer-specific variants) |
get_metric_history
Get historical values for a metric over time. Returns a time series for trend analysis.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
shortcode | string | Yes | Metric shortcode |
key | string | No | Metric namespace key |
since | string | No | Start date (ISO 8601) |
until | string | No | End date (ISO 8601) |
limit | integer | No | Number of data points (default: 50, max: 100) |
Reports
list_reports
List available compliance and insight reports for a repository — OWASP Top 10, SANS Top 25, MISRA C, code coverage trends, and issue distribution.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
get_report
Get a specific report with pass/fail status and detailed data.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
report_key | string | Yes | Report key (from list_reports) |
Dependencies & Vulnerabilities
list_vulnerabilities
List security vulnerabilities in a repository's dependencies, with CVE/GHSA identifiers, CVSS scores, and affected package info.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
severity | string | No | Filter by severity: NONE, LOW, MEDIUM, HIGH, CRITICAL |
fixability | string | No | Filter: AUTO_FIXABLE, MANUALLY_FIXABLE, POSSIBLY_FIXABLE, UNFIXABLE |
reachability | string | No | Filter: REACHABLE, UNREACHABLE, UNKNOWN |
is_suppressed | boolean | No | Filter by suppression status |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_vulnerability
Get full details of a specific vulnerability — CVSS scores (v2/v3/v4), EPSS exploit probability, affected package and version, available fix versions, and reachability status.
| Parameter | Type | Required | Description |
|---|---|---|---|
occurrence_id | integer | Yes | Vulnerability occurrence ID |
list_dependency_targets
List dependency manifest and lockfiles monitored for vulnerabilities (e.g., package-lock.json, requirements.txt, go.sum).
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
get_dependency_target
Get details of a specific dependency target — direct and transitive dependency counts, and vulnerability breakdown by severity.
| Parameter | Type | Required | Description |
|---|---|---|---|
target_id | integer | Yes | Target ID |
Configuration
list_ignore_rules
List issue suppression rules for a repository. Ignore rules silence a specific issue type either globally or for a specific file.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
issue_shortcode | string | No | Filter by issue shortcode |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page |
create_ignore_rule
Suppress a specific issue type so DeepSource stops reporting it. Can apply to the entire repository or a single file.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Repository name |
account | string | Yes | Account login |
vcs_provider | string | Yes | VCS provider |
issue_shortcode | string | Yes | Issue shortcode to suppress |
file_path | string | No | Scope to a specific file path |
reason | string | Yes | Reason for suppression |
delete_ignore_rule
Remove a suppression rule so DeepSource starts reporting the issue again.
| Parameter | Type | Required | Description |
|---|---|---|---|
rule_id | integer | Yes | Ignore rule ID (from list_ignore_rules) |