@@ -26,8 +26,10 @@ type mcpAnalysisResponse struct {
2626 Findings []results.Finding `json:"findings"`
2727 Rules map [string ]results.Rule `json:"rules"`
2828 // Essential repository metadata
29+ Purl string `json:"purl,omitempty"`
2930 Repository string `json:"repository,omitempty"`
30- Ref string `json:"ref,omitempty"`
31+ ScmType string `json:"scm_type,omitempty"`
32+ GitRef string `json:"git_ref,omitempty"`
3133 CommitSha string `json:"commit_sha,omitempty"`
3234 LastCommit string `json:"last_commit,omitempty"`
3335}
@@ -312,8 +314,10 @@ func handleAnalyzeOrg(ctx context.Context, request mcp.CallToolRequest) (*mcp.Ca
312314 combinedResponses = append (combinedResponses , mcpAnalysisResponse {
313315 Findings : pkgInsights .FindingsResults .Findings ,
314316 Rules : pkgInsights .FindingsResults .Rules ,
317+ Purl : pkgInsights .Purl ,
315318 Repository : pkgInsights .SourceGitRepo ,
316- Ref : pkgInsights .SourceGitRef ,
319+ ScmType : pkgInsights .SourceScmType ,
320+ GitRef : pkgInsights .SourceGitRef ,
317321 CommitSha : pkgInsights .SourceGitCommitSha ,
318322 LastCommit : pkgInsights .LastCommitedAt ,
319323 })
@@ -357,8 +361,10 @@ func handleAnalyzeRepo(ctx context.Context, request mcp.CallToolRequest) (*mcp.C
357361 combinedResponse := mcpAnalysisResponse {
358362 Findings : analysisResults .FindingsResults .Findings ,
359363 Rules : analysisResults .FindingsResults .Rules ,
364+ Purl : analysisResults .Purl ,
360365 Repository : analysisResults .SourceGitRepo ,
361- Ref : analysisResults .SourceGitRef ,
366+ ScmType : analysisResults .SourceScmType ,
367+ GitRef : analysisResults .SourceGitRef ,
362368 CommitSha : analysisResults .SourceGitCommitSha ,
363369 LastCommit : analysisResults .LastCommitedAt ,
364370 }
@@ -398,8 +404,10 @@ func handleAnalyzeLocal(ctx context.Context, request mcp.CallToolRequest, opaCli
398404 combinedResponse := mcpAnalysisResponse {
399405 Findings : analysisResults .FindingsResults .Findings ,
400406 Rules : analysisResults .FindingsResults .Rules ,
407+ Purl : analysisResults .Purl ,
401408 Repository : analysisResults .SourceGitRepo ,
402- Ref : analysisResults .SourceGitRef ,
409+ ScmType : analysisResults .SourceScmType ,
410+ GitRef : analysisResults .SourceGitRef ,
403411 CommitSha : analysisResults .SourceGitCommitSha ,
404412 LastCommit : analysisResults .LastCommitedAt ,
405413 }
@@ -450,8 +458,10 @@ func handleAnalyzeStaleBranches(ctx context.Context, request mcp.CallToolRequest
450458 combinedResponse := mcpAnalysisResponse {
451459 Findings : analysisResults .FindingsResults .Findings ,
452460 Rules : analysisResults .FindingsResults .Rules ,
461+ Purl : analysisResults .Purl ,
453462 Repository : analysisResults .SourceGitRepo ,
454- Ref : analysisResults .SourceGitRef ,
463+ ScmType : analysisResults .SourceScmType ,
464+ GitRef : analysisResults .SourceGitRef ,
455465 CommitSha : analysisResults .SourceGitCommitSha ,
456466 LastCommit : analysisResults .LastCommitedAt ,
457467 }
0 commit comments