René's URL Explorer Experiment


Title: fix(repos): allow explicitly empty file content by Elon-Jiang · Pull Request #3884 · github/github-mcp-server · GitHub

Open Graph Title: fix(repos): allow explicitly empty file content by Elon-Jiang · Pull Request #3884 · github/github-mcp-server

X Title: fix(repos): allow explicitly empty file content by Elon-Jiang · Pull Request #3884 · github/github-mcp-server

Description: Summary Allow create_or_update_file to create empty files and intentionally clear existing files when content: "" is explicitly supplied. Why Fixes #3883. Agents cannot currently create empty package markers (__init__.py, .gitkeep) or clear a file: an empty string is treated as a missing parameter before any request reaches GitHub. The Contents API accepts base64 file content, and the tool schema does not impose a minimum length. What changed When the decoded content is empty, distinguish an explicitly supplied string from absent/null content. Keep the existing exported Go input type and public JSON schema. Exercise empty-file creation, clearing an existing ordinary file, and absent/null content through the public tool handler and real go-github request serialization. Existing nonempty create/update, stale SHA and symlink protection cases remain in the same test table. Document intentionally empty writes in the bundled repository-content-changes skill. MCP impact Tool schema or behavior changed: explicit empty strings now reach the Contents API. Missing/null values still fail; SHA and symlink validation are unchanged. No schema or tool renaming. Prompts tested (tool changes only) The tests invoke tool arguments directly; no LLM prompt execution is claimed. The corresponding use cases are “create an empty package marker on this branch” and “clear this ordinary file using its current blob SHA.” The HTTP transport substitutes GitHub's service; the public tool handler, validation and REST serialization run normally. No live account file write was used in testing. Security / limits Auth / permissions considered: existing permissions, SHA and symlink guards remain in place. Missing content cannot silently erase a file. Tool renaming I am not renaming tools as part of this PR. Lint & tests ./script/lint (Go 1.27.4, pinned golangci-lint 2.14.0): passed. ./script/test (go test -race ./...): passed. UPDATE_TOOLSNAPS=true go test ./...: passed; no snapshot changes. Baseline: the two empty-write cases fail; 15 existing controls pass. After the fix, all 19 cases pass, including the two new absent/null controls. After the maintainer merged main into this branch (f650c53), I reviewed the update and reran all 19 handler cases, lint, the full race-enabled suite, and documentation generation on Go 1.27.4. The three fix files are unchanged by that main merge; the generated documentation leaves the checkout clean. Docs Updated the bundled skill. ./script/generate-docs passed without README changes. Skills Updated the repository-content-changes skill; catalog coverage is exercised by the full suite. Prepared with AI assistance. No claim of independent human review is made.

Open Graph Description: Summary Allow create_or_update_file to create empty files and intentionally clear existing files when content: "" is explicitly supplied. Why Fixes #3883. Agents cannot currently create e...

X Description: Summary Allow create_or_update_file to create empty files and intentionally clear existing files when content: "" is explicitly supplied. Why Fixes #3883. Agents cannot currently ...

Opengraph URL: https://github.com/github/github-mcp-server/pull/3884

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8d019a0d-10b6-957b-b8f6-bc152cdf0ddf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9704:1649B1:2FE53E:3F38C3:6B06172F
html-safe-noncec61ff8453846b1c59d7f6a374cfb24522d8bd87a3082fd84636492a66378eb53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzA0OjE2NDlCMToyRkU1M0U6M0YzOEMzOjZCMDYxNzJGIiwidmlzaXRvcl9pZCI6IjgzNTQ1NjUwMzg3NDA0Nzc3NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb14d21eb166048afd188dd53171b2df19b8872c05895de39012d8d011d08a6ec
hovercard-subject-tagpull_request:5373523896
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/github-mcp-server/pull/3884/files
twitter:imagehttps://avatars.githubusercontent.com/u/191222665?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/191222665?s=400&v=4
og:image:altSummary Allow create_or_update_file to create empty files and intentionally clear existing files when content: "" is explicitly supplied. Why Fixes #3883. Agents cannot currently create e...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id942771284
octolytics-dimension-repository_nwogithub/github-mcp-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id942771284
octolytics-dimension-repository_network_root_nwogithub/github-mcp-server
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release866f202ebf7ac5aff8f633417d9fd8a53818a977
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/github-mcp-server/pull/3884/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3884%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3884%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fgithub-mcp-server
Reloadhttps://github.com/github/github-mcp-server/pull/3884/files
Reloadhttps://github.com/github/github-mcp-server/pull/3884/files
Reloadhttps://github.com/github/github-mcp-server/pull/3884/files
githubhttps://github.com/github
github-mcp-serverhttps://github.com/github/github-mcp-server
Codehttps://github.com/github/github-mcp-server
Issues238 (238)https://github.com/github/github-mcp-server/issues
Pull requests226 (226)https://github.com/github/github-mcp-server/pulls
Discussionshttps://github.com/github/github-mcp-server/discussions
Actionshttps://github.com/github/github-mcp-server/actions
Security and quality2 (2)https://github.com/github/github-mcp-server/security
Insightshttps://github.com/github/github-mcp-server/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
Elon-Jianghttps://github.com/Elon-Jiang
github:mainhttps://github.com/github/github-mcp-server/tree/main
Elon-Jiang:fix/empty-file-contenthttps://github.com/Elon-Jiang/github-mcp-server/tree/fix/empty-file-content
Conversation 1 https://github.com/github/github-mcp-server/pull/3884
Commits 2 https://github.com/github/github-mcp-server/pull/3884/commits
Checks 14 https://github.com/github/github-mcp-server/pull/3884/checks
Findings https://github.com/github/github-mcp-server/pull/3884/findings
Files changed https://github.com/github/github-mcp-server/pull/3884/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3884/files
fix(repos): allow explicitly empty file content https://github.com/github/github-mcp-server/pull/3884/files#top
Show all changes 2 commits https://github.com/github/github-mcp-server/pull/3884/files
c68b683 fix(repos): allow explicitly empty file content Elon-Jiang Nov 18, 2026 https://github.com/github/github-mcp-server/pull/3884/commits/c68b6831e444663bce3453fd4d935cb648ee84fd
f650c53 Merge branch 'main' into fix/empty-file-content SamMorrowDrums Nov 19, 2026 https://github.com/github/github-mcp-server/pull/3884/commits/f650c53dfbdfccb983337929def8187a69355e99
Clear filters https://github.com/github/github-mcp-server/pull/3884/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3884/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3884/files
repositories.go https://github.com/github/github-mcp-server/pull/3884/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
repositories_test.go https://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
SKILL.md https://github.com/github/github-mcp-server/pull/3884/files#diff-55911be1cec6391ff45222b0b62b73aeb07e0e4dc8064597599d9d12cd7a5db1
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repositories.gohttps://github.com/github/github-mcp-server/pull/3884/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
View file https://github.com/github/github-mcp-server/blob/f650c53dfbdfccb983337929def8187a69355e99/pkg/github/repositories.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3884/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3884/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3884/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3884/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repositories_test.gohttps://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
View file https://github.com/github/github-mcp-server/blob/f650c53dfbdfccb983337929def8187a69355e99/pkg/github/repositories_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3884/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3884/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/skills/catalog/skills/repository-content-changes/SKILL.mdhttps://github.com/github/github-mcp-server/pull/3884/files#diff-55911be1cec6391ff45222b0b62b73aeb07e0e4dc8064597599d9d12cd7a5db1
View file https://github.com/github/github-mcp-server/blob/f650c53dfbdfccb983337929def8187a69355e99/pkg/skills/catalog/skills/repository-content-changes/SKILL.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3884/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3884/files#diff-55911be1cec6391ff45222b0b62b73aeb07e0e4dc8064597599d9d12cd7a5db1
https://github.com/github/github-mcp-server/pull/3884/files#diff-55911be1cec6391ff45222b0b62b73aeb07e0e4dc8064597599d9d12cd7a5db1
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3884/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.