Home / Servers / GitHub API / code_scanning_upload_sarif

Upload an analysis as SARIF data

An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.

Upload an analysis as SARIF data Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "Troubleshooting SARIF uploads." There are… [POST /repos/{owner}/{repo}/code-scanning/sarifs]

Name on the gateway: github_api__code_scanning_upload_sarif · may change things.

Parameters

NameTypeDescription
owner requiredstringThe account owner of the repository. The name is not case…
repo requiredstringThe name of the repository without the .git extension. The…
commit_sha requiredstringThe SHA of the commit to which the analysis you are uploading relates.
ref requiredstringThe full Git reference, formatted as refs/heads/ , refs/tags/ , refs/pull/…
sarif requiredstringA Base64 string representing the SARIF file to upload. You must first compress…
checkout_uristringThe base directory used in the analysis, as it appears in the SARIF file. This…
started_atstringThe time that the analysis run began. This is a timestamp in ISO 8601 format…
tool_namestringThe name of the tool used to generate the code scanning analysis. If this…
validatebooleanWhether the SARIF file will be validated according to the code scanning…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "github_api__code_scanning_upload_sarif",
  "arguments": {
    "owner": "…",
    "repo": "…",
    "commit_sha": "…",
    "ref": "…",
    "sarif": "…"
  }
}

Or connect the GitHub API server directly, which lists 1,221 tools including this one:

Run in your terminal
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the upload an analysis as sarif data tool with owner set to ….

More from GitHub API