Description
The repository schema declares the homepage field with format: "uri", but the GitHub API returns an empty string "" for repositories that have no homepage set.
An empty string is not a valid URI per RFC 3986, so MCP servers and other tools that validate API responses against this schema will reject the entire response with a schema validation error.
Error observed
When calling GET /user/repos (or any endpoint returning repository objects), tools that validate against this schema produce:
MCP error -32602: Structured content does not match the tool's output schema:
data/result/23/homepage must match format "uri"
The offending field is homepage: "" — GitHub returns an empty string when no homepage has been set on a repo, rather than null or omitting the field.
Expected behavior
The schema should either:
- Change
homepage to allow null or an empty string alongside valid URIs (e.g. type: ["string", "null"] with the format: "uri" applied only when non-null/non-empty), or
- Document that the API returns
"" for unset homepages and update the format constraint accordingly
Steps to reproduce
- Call
GET /user/repos or GET /repos/{owner}/{repo} for any repository that has no homepage URL set in its settings
- The response will contain
"homepage": ""
- Validating this response against the current OpenAPI schema will fail on the
format: "uri" constraint
Notes
- This affects all repository-returning endpoints, not just
/user/repos
- The
homepage field is likely nullable/optional in practice — the schema should reflect this
Description
The
repositoryschema declares thehomepagefield withformat: "uri", but the GitHub API returns an empty string""for repositories that have no homepage set.An empty string is not a valid URI per RFC 3986, so MCP servers and other tools that validate API responses against this schema will reject the entire response with a schema validation error.
Error observed
When calling
GET /user/repos(or any endpoint returning repository objects), tools that validate against this schema produce:The offending field is
homepage: ""— GitHub returns an empty string when no homepage has been set on a repo, rather thannullor omitting the field.Expected behavior
The schema should either:
homepageto allownullor an empty string alongside valid URIs (e.g.type: ["string", "null"]with theformat: "uri"applied only when non-null/non-empty), or""for unset homepages and update the format constraint accordinglySteps to reproduce
GET /user/reposorGET /repos/{owner}/{repo}for any repository that has no homepage URL set in its settings"homepage": ""format: "uri"constraintNotes
/user/reposhomepagefield is likely nullable/optional in practice — the schema should reflect this