Clarify that create_or_update_file content is plain text, not base64 - #2983
Merged
RossTarrant merged 1 commit intoJul 31, 2026
Merged
Conversation
The content parameter is passed to the API as plain text and the server base64-encodes it, but the description said only "Content of the file". The REST endpoint this wraps documents its own content field as base64, so a model reading the tool description has a strong reason to encode the content itself. When it does, the server encodes again and the file is committed containing base64 text. Every layer reports success. Describe the value by how it should end up on disk rather than by what not to do, so a file whose contents are legitimately base64 is still unambiguous, and name the encoding step so the conflict with the REST API docs is resolved rather than merely overridden.
Contributor
There was a problem hiding this comment.
Pull request overview
Clarifies that create_or_update_file accepts content exactly as it should appear on disk, preventing accidental double base64 encoding.
Changes:
- Clarified the
contentparameter description. - Regenerated documentation and schema snapshot.
Show a summary per file
| File | Description |
|---|---|
README.md |
Updates generated tool documentation. |
pkg/github/repositories.go |
Clarifies the content input contract. |
pkg/github/__toolsnaps__/create_or_update_file.snap |
Updates the tool schema snapshot. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
RossTarrant
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the ambiguity reported in #2981.
contentis passed to the API as plain text and this server base64-encodes it, but the description said only "Content of the file". The REST endpoint this wraps documents itscontentfield as base64, so a model reading the tool description has a strong reason to encode the value itself. When it does, the server encodes again and the file is committed containing base64 text, with success reported at every layer.The new description says how the value should end up on disk rather than only what not to do, so a file whose contents are legitimately base64 stays unambiguous. It also names the encoding step, so the conflict with the REST API docs is resolved rather than merely overridden.
Scoped to
create_or_update_fileonly.push_filesand the gist tools pass content through without encoding, so this bug does not apply to them (see the follow-up comment on #2981).Regenerated toolsnaps and README per CONTRIBUTING.
go test ./...andscript/lintboth pass.