feat: get_file_content returns plain text by default #116
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp!116
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/116/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
get_file_contentcurrently decodes the base64-encodedGetContentsresponse and returns only the content field — every file retrieval requires a base64 round-trip and the caller receives raw bytes with no surrounding metadata. This PR switches the default toGetFile(the SDK 's/raw/endpoint), which returns plain UTF-8 text directly. An optionalwith_metadataboolean parameter is added: whentrue, the tool callsGetContentsand returns the fullContentsResponseobject (sha, encoding, links, type, size, base64 content) for callers that need the structured response.Closes #114
The parameter name
with_metadatawas adopted directly from the maintainer's review of issue #114 — see this comment. The branch originally usedas_binaryas a placeholder; the rename towith_metadatabetter describes what the flag actually controls — the response shape (fullContentsResponsevs. plain text), not the content encoding of the file itself.This branch has been running on an internal MCP deploy since 2026-05-05. All existing tests pass and two new tests cover the plain-text default and the
with_metadata=truepath.Thanks for the review!
On the description update: I pushed it to the branch — used your suggested wording verbatim, it captures both the binary case and the metadata-for-update_file flow cleanly.
Also here, I hope you proceed with the merge as planned.
Looking forward to the release! :)