René's URL Explorer Experiment


Title: fix(repos): wrap get_file_contents directory listings in an object by Mystery01092000 · Pull Request #3869 · github/github-mcp-server · GitHub

Open Graph Title: fix(repos): wrap get_file_contents directory listings in an object by Mystery01092000 · Pull Request #3869 · github/github-mcp-server

X Title: fix(repos): wrap get_file_contents directory listings in an object by Mystery01092000 · Pull Request #3869 · github/github-mcp-server

Description: Summary get_file_contents now returns directory listings as {"entries": [...]} instead of a bare top-level array, so structuredContent is always a JSON object. Clients that only accept object-valued structuredContent can now list directories. Why Clients that model structuredContent as an object, such as SDKs that use dict[str, Any], reject the directory response before the agent sees any entries: structuredContent Input should be a valid dictionary [type=dict_type, input_value=[{'name': '.dockerignore'...}], input_type=list] RepositoryContentsOutput.MarshalJSON encoded the directory slice directly, and repositoryContentsOutputSchema() advertised a matching array variant. Fixes #3864 What changed Added RepositoryDirectoryOutput{Entries []*RepositoryDirectoryEntryOutput \json:"entries"`}. RepositoryContentsOutput.Directory` now points to it. The output schema's directory variant is now {"type":"object","properties":{"entries":{"type":"array",...}},"required":["entries"],"additionalProperties":false}. The variants are now null, directory object, and file-content object. The two object variants stay mutually exclusive (entries and content are each required, and no additional properties are allowed). An empty directory returns {"entries": []}, not {"entries": null}. The file (non-directory) path is unchanged. It still uses the {"content": [...]} shape. Text output: Legacy protocol versions (before 2026-07-28): the text content is byte-for-byte unchanged. It is still the JSON array of entries, and no structuredContent is sent. The existing byte-exact legacy assertions in TestTypedRepositoryOutputs still pass, and a new assertion checks that the legacy directory text is still an array. 2026-07-28 protocol: following the typed-output convention, the text content mirrors structuredContent, so it is now {"entries":[...]}. Updated the get_file_contents toolsnap. Tests: TestTypedRepositoryOutputs: directory calls now decode structuredContent into map[string]json.RawMessage, the way an object-only consumer would. They check that entries is non-nil and assert the wrapped shape for the submodule, empty, and projected-field directories. TestRepositoryOutputUnions: {"entries":[]} and {"entries":[{"name":"file"}]} are valid. [], [{"name":"file"}], {"entries":null} and {"entries":[],"content":[]} are rejected. New TestRepositoryContentsOutputSchemaIsObjectValued: every non-null output schema variant is type: object. TestTypedCompatibilityDirectoryProjection: the legacy text is still the array. The modern text and structuredContent are the wrapped object. MCP impact No tool or API changes Tool schema or behavior changed New tool added The get_file_contents output schema and directory structuredContent change from an array to {"entries": [...]}. This is visible only to clients on the 2026-07-28 protocol, which receive outputSchema/structuredContent. Legacy-protocol responses are unchanged. Prompts tested (tool changes only) Covered by unit and in-memory MCP session tests; not exercised against a live client. "List the files in the root of github/github-mcp-server" (path: "/", fields: ["name","type","path"]) "What's in pkg/github?" Security / limits No security or limits impact Auth / permissions considered Data exposure, filtering, or token/size limits considered Tool renaming I am renaming tools as part of this PR (e.g. a part of a consolidation effort) I have added the new tool aliases in deprecated_tool_aliases.go I am not renaming tools as part of this PR Lint & tests Linted locally with ./script/lint (ran golangci-lint run v2.14.0 and gofmt -s -l . in Docker) Tested locally with ./script/test (ran go test ./... in Docker with golang:1.27.4) Targeted tests: $ go test -count=1 -v -run "TestTypedRepositoryOutputs|TestRepositoryOutputUnions|TestRepositoryContentsOutputSchemaIsObjectValued|TestTypedCompatibilityDirectoryProjection" ./pkg/github/ --- PASS: TestTypedCompatibilityDirectoryProjection (0.01s) --- PASS: TestTypedRepositoryOutputs (0.32s) --- PASS: TestRepositoryOutputUnions (0.00s) --- PASS: TestRepositoryContentsOutputSchemaIsObjectValued (0.00s) ok github.com/github/github-mcp-server/v2/pkg/github 0.353s (241 passing tests and subtests, 0 failing.) Full suite (go test -count=1 -json ./...): 9054 passed, 2 skipped, 0 failed. $ golangci-lint run 0 issues. UPDATE_TOOLSNAPS=true go test ./... changed only get_file_contents.snap. script/generate-docs produced no changes, because output schemas are not part of the generated docs. Docs Not needed Updated (README / docs / examples) Skills Updated relevant skills or confirmed no bundled skill applies. Bundled skills mention get_file_contents but not the shape of its directory output. Notes for reviewers #3848 (omit the directory download_url, for #3748) touches the same directory-listing code. The two changes are independent, so whichever lands second may need a small rebase. About 20 other tools (for example list_commits, list_releases, list_gists) also return a top-level array as structuredContent on the 2026-07-28 protocol, and object-only clients would reject those too. I kept this PR to get_file_contents, which is the reported failure. I can follow up with the same wrapping for the others if you want it.

Open Graph Description: Summary get_file_contents now returns directory listings as {"entries": [...]} instead of a bare top-level array, so structuredContent is always a JSON object. Clients that only accept ob...

X Description: Summary get_file_contents now returns directory listings as {"entries": [...]} instead of a bare top-level array, so structuredContent is always a JSON object. Clients that only a...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.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:bd1788ea-1733-62d5-0ea1-0da7c97561d3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA5CA:93BED:2AF15B:39D0D6:6B0616F5
html-safe-nonce7e034c2007b5a557d05792afe69dc840bf2c605dc304090b9238cd68c2407d4e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUNBOjkzQkVEOjJBRjE1QjozOUQwRDY6NkIwNjE2RjUiLCJ2aXNpdG9yX2lkIjoiODkxNTkxNTA0MzgyOTU4NTY1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd06f6fa404a134a70b1ac9b72c2d3748615fc0d95c7489890a6df20d8fc446d8
hovercard-subject-tagpull_request:5343611635
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/3869/files
twitter:imagehttps://avatars.githubusercontent.com/u/43115768?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/43115768?s=400&v=4
og:image:altSummary get_file_contents now returns directory listings as {"entries": [...]} instead of a bare top-level array, so structuredContent is always a JSON object. Clients that only accept ob...
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/3869/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3869%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%2F3869%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/3869/files
Reloadhttps://github.com/github/github-mcp-server/pull/3869/files
Reloadhttps://github.com/github/github-mcp-server/pull/3869/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
Mystery01092000https://github.com/Mystery01092000
github:mainhttps://github.com/github/github-mcp-server/tree/main
Mystery01092000:fix/get-file-contents-directory-objecthttps://github.com/Mystery01092000/github-mcp-server/tree/fix/get-file-contents-directory-object
Conversation 1 https://github.com/github/github-mcp-server/pull/3869
Commits 1 https://github.com/github/github-mcp-server/pull/3869/commits
Checks 1 https://github.com/github/github-mcp-server/pull/3869/checks
Findings https://github.com/github/github-mcp-server/pull/3869/findings
Files changed https://github.com/github/github-mcp-server/pull/3869/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3869/files
fix(repos): wrap get_file_contents directory listings in an object https://github.com/github/github-mcp-server/pull/3869/files#top
Show all changes 1 commit https://github.com/github/github-mcp-server/pull/3869/files
4f1013f fix(repos): wrap get_file_contents directory listings in an object Mystery01092000 Nov 16, 2026 https://github.com/github/github-mcp-server/pull/3869/commits/4f1013f1133e5f18ccb198304e798b8820c3b01a
Clear filters https://github.com/github/github-mcp-server/pull/3869/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3869/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3869/files
get_file_contents.snap https://github.com/github/github-mcp-server/pull/3869/files#diff-2d050b2b798718a28d0a0c2ac76cde287bdbfea22cd405025a78b353638c92db
repositories.go https://github.com/github/github-mcp-server/pull/3869/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
repository_tool_types.go https://github.com/github/github-mcp-server/pull/3869/files#diff-1189bc0ef240f3b188742d259f7703a82230bb1010d1de025c0494ba394311b1
typed_compatibility_test.go https://github.com/github/github-mcp-server/pull/3869/files#diff-6b5d40139d598ef3b5c94bfbcc64cf888c04c503d38f98dbe3949769af5d72a8
typed_repository_outputs_test.go https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/__toolsnaps__/get_file_contents.snaphttps://github.com/github/github-mcp-server/pull/3869/files#diff-2d050b2b798718a28d0a0c2ac76cde287bdbfea22cd405025a78b353638c92db
View file https://github.com/github/github-mcp-server/blob/4f1013f1133e5f18ccb198304e798b8820c3b01a/pkg/github/__toolsnaps__/get_file_contents.snap
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3869/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3869/files#diff-2d050b2b798718a28d0a0c2ac76cde287bdbfea22cd405025a78b353638c92db
https://github.com/github/github-mcp-server/pull/3869/files#diff-2d050b2b798718a28d0a0c2ac76cde287bdbfea22cd405025a78b353638c92db
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repositories.gohttps://github.com/github/github-mcp-server/pull/3869/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
View file https://github.com/github/github-mcp-server/blob/4f1013f1133e5f18ccb198304e798b8820c3b01a/pkg/github/repositories.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3869/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3869/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3869/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repository_tool_types.gohttps://github.com/github/github-mcp-server/pull/3869/files#diff-1189bc0ef240f3b188742d259f7703a82230bb1010d1de025c0494ba394311b1
View file https://github.com/github/github-mcp-server/blob/4f1013f1133e5f18ccb198304e798b8820c3b01a/pkg/github/repository_tool_types.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3869/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3869/files#diff-1189bc0ef240f3b188742d259f7703a82230bb1010d1de025c0494ba394311b1
https://github.com/github/github-mcp-server/pull/3869/files#diff-1189bc0ef240f3b188742d259f7703a82230bb1010d1de025c0494ba394311b1
https://github.com/github/github-mcp-server/pull/3869/files#diff-1189bc0ef240f3b188742d259f7703a82230bb1010d1de025c0494ba394311b1
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/typed_compatibility_test.gohttps://github.com/github/github-mcp-server/pull/3869/files#diff-6b5d40139d598ef3b5c94bfbcc64cf888c04c503d38f98dbe3949769af5d72a8
View file https://github.com/github/github-mcp-server/blob/4f1013f1133e5f18ccb198304e798b8820c3b01a/pkg/github/typed_compatibility_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3869/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3869/files#diff-6b5d40139d598ef3b5c94bfbcc64cf888c04c503d38f98dbe3949769af5d72a8
https://github.com/github/github-mcp-server/pull/3869/files#diff-6b5d40139d598ef3b5c94bfbcc64cf888c04c503d38f98dbe3949769af5d72a8
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/typed_repository_outputs_test.gohttps://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
View file https://github.com/github/github-mcp-server/blob/4f1013f1133e5f18ccb198304e798b8820c3b01a/pkg/github/typed_repository_outputs_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3869/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
https://github.com/github/github-mcp-server/pull/3869/files#diff-926dc2e15a0f64365045a0083ac1cf94dd2b9852027a3918d651d4cbef9d73d6
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.