-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
This line of code makes the get_file_contents tool produce corrupted output for most binary formats like pdf (application/pdf), .docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document) etc. since the data is not returned as byte64 encoded string:
github-mcp-server/pkg/github/repositories.go
Line 604 in 6d01897
if strings.HasPrefix(contentType, "application") || strings.HasPrefix(contentType, "text") { |
Here the corruption occurs:
github-mcp-server/pkg/github/repositories.go
Line 607 in 6d01897
Text: string(body), |
Solution is to byte64 encode all binary formats, just like in this line:
github-mcp-server/pkg/github/repositories.go
Line 619 in 6d01897
Blob: base64.StdEncoding.EncodeToString(body), |
Metadata
Metadata
Assignees
Labels
No labels