René's URL Explorer Experiment


Title: search_code query description teaches incorrect syntax, causing repeated 422 errors · Issue #2390 · github/github-mcp-server · GitHub

Open Graph Title: search_code query description teaches incorrect syntax, causing repeated 422 errors · Issue #2390 · github/github-mcp-server

X Title: search_code query description teaches incorrect syntax, causing repeated 422 errors · Issue #2390 · github/github-mcp-server

Description: This came out of an analysis of github MCP server errors encountered in my past sessions across 5000 sessions. What the agent did In multiple sessions the agent called search_code with queries that look reasonable but are rejected with 4...

Open Graph Description: This came out of an analysis of github MCP server errors encountered in my past sessions across 5000 sessions. What the agent did In multiple sessions the agent called search_code with queries that...

X Description: This came out of an analysis of github MCP server errors encountered in my past sessions across 5000 sessions. What the agent did In multiple sessions the agent called search_code with queries that...

Opengraph URL: https://github.com/github/github-mcp-server/issues/2390

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"search_code query description teaches incorrect syntax, causing repeated 422 errors","articleBody":"This came out of an analysis of github MCP server errors encountered in my past sessions across 5000 sessions.\n\n**What the agent did**\n\nIn multiple sessions the agent called `search_code` with queries that look reasonable but are rejected with `422 ERROR_TYPE_QUERY_PARSING_FATAL`. Examples from real sessions:\n\n```json\n{\"query\": \"repo:dotnet/runtime \\\"GetAttributes\\\\|SetAttributes\\\" path:System.IO.FileSystem/tests\"}\n{\"query\": \"repo:dotnet/roslyn \\\"ProjectName\\\\|GeneratedFileName\\\\|FilePath\\\" language:csharp file:TestState\"}\n{\"query\": \"repo:dotnet/runtime (review OR agent OR copilot OR AI) path:docs OR path:.github\"}\n{\"query\": \"repo:dotnet/runtime (filename:AGENTS.md OR filename:*review*.md OR filename:*copilot*.md)\"}\n{\"query\": \"--statisticalTest parameter Mann-Whitney repo:dotnet/BenchmarkDotNet\"}\n```\n\n**What went wrong**\n\nEach reflects the agent guessing at syntax that looks plausible but is wrong:\n\n- `\\\"foo\\\\|bar\\\"` — used `\\|` for regex OR inside a quoted string; correct form is `/foo|bar/`\n- `path:docs OR path:.github` — `OR` between qualifier instances without parentheses has surprising precedence\n- `filename:*review*.md` — `filename:` is not a valid qualifier; correct is `path:*review*.md`\n- `--statisticalTest ...` — treated the tool like a shell command\n\n**Why it happens**\n\nThe [current `query` parameter description](https://github.com/github/github-mcp-server/blob/4bded57e02e9346cb1fd595156e07dea51f0fb29/pkg/github/search.go#L176) is:\n\n\u003e \"Search query using GitHub's powerful code search syntax. Examples: `content:Skill language:Java org:github`, `NOT is:archived language:Python OR language:go`, `repo:github/github-mcp-server`. Supports exact matching, language filters, path filters, and more.\"\n\nThis gives the model almost no useful guidance on syntax. It doesn't mention regex (slashes), path globs, `symbol:`, or how boolean operators interact with qualifiers. The example `NOT is:archived language:Python OR language:go` has ambiguous precedence and is likely misread by the model.\n\n**Suggested description**\n\n\u003e Search query using GitHub code search syntax. Qualifiers: repo:owner/repo, org:name, language:Go, path:src/*.js, path:/regex/, symbol:Name, content:term, is:archived|fork. Boolean: AND, OR, NOT, parentheses. Regex: surround with slashes e.g. /sparse.*index/. Glob in path: path:*.ts, path:/src/**/*.js. Examples: 'MyFunc language:go repo:owner/repo', 'symbol:WithContext language:go', '/GetAttributes|SetAttributes/ repo:owner/repo', '(Foo OR Bar) path:src repo:owner/repo'.\n\nThis gives clear and accurate information about the actual syntax without being too verbose. It explicitly names it \"GitHub code search syntax\" which may help the model connect it to the [the documentation page](https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax) of that title that it has already been trained on.","author":{"url":"https://github.com/danmoseley","@type":"Person","name":"danmoseley"},"datePublished":"2026-04-26T07:27:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2390/github-mcp-server/issues/2390"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b5b9918d-de86-5162-a507-404ebefeb9f8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC8BE:26785E:1365B2:1C433B:6A61DD98
html-safe-nonce5367512dea08056fbdfbf9c33931238b06bd9ce47438e3bf2e0e2b7afdb2450c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEJFOjI2Nzg1RToxMzY1QjI6MUM0MzNCOjZBNjFERDk4IiwidmlzaXRvcl9pZCI6IjIzMTA2NzMzODAzMjc2NzczMzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac87156b894fe579c02eb298a36bddf7ff385ba67d26819fff283a5175a5f0c8b9
hovercard-subject-tagissue:4330312950
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2390/issue_layout
twitter:imagehttps://opengraph.githubassets.com/78ff9ac5ecd26eb174e16183bc9959f9f21eb837f77d04be0144eb05c89f7199/github/github-mcp-server/issues/2390
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/78ff9ac5ecd26eb174e16183bc9959f9f21eb837f77d04be0144eb05c89f7199/github/github-mcp-server/issues/2390
og:image:altThis came out of an analysis of github MCP server errors encountered in my past sessions across 5000 sessions. What the agent did In multiple sessions the agent called search_code with queries that...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanmoseley
hostnamegithub.com
expected-hostnamegithub.com
Noneb2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released1866027ded575df8a15c731dd8b9986c9483ceb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/github-mcp-server/issues/2390#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fissues%2F2390
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fissues%2F2390
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github%2Fgithub-mcp-server
Reloadhttps://github.com/github/github-mcp-server/issues/2390
Reloadhttps://github.com/github/github-mcp-server/issues/2390
Reloadhttps://github.com/github/github-mcp-server/issues/2390
Please reload this pagehttps://github.com/github/github-mcp-server/issues/2390
github https://github.com/github
github-mcp-serverhttps://github.com/github/github-mcp-server
Notifications https://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server
Fork 4.6k https://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server
Star 31.6k https://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server
Code https://github.com/github/github-mcp-server
Issues 171 https://github.com/github/github-mcp-server/issues
Pull requests 162 https://github.com/github/github-mcp-server/pulls
Discussions https://github.com/github/github-mcp-server/discussions
Actions https://github.com/github/github-mcp-server/actions
Models https://github.com/github/github-mcp-server/models
Security and quality 2 https://github.com/github/github-mcp-server/security
Insights https://github.com/github/github-mcp-server/pulse
Code https://github.com/github/github-mcp-server
Issues https://github.com/github/github-mcp-server/issues
Pull requests https://github.com/github/github-mcp-server/pulls
Discussions https://github.com/github/github-mcp-server/discussions
Actions https://github.com/github/github-mcp-server/actions
Models https://github.com/github/github-mcp-server/models
Security and quality https://github.com/github/github-mcp-server/security
Insights https://github.com/github/github-mcp-server/pulse
search_code query description teaches incorrect syntax, causing repeated 422 errorshttps://github.com/github/github-mcp-server/issues/2390#top
request ai reviewhttps://github.com/github/github-mcp-server/issues?q=state%3Aopen%20label%3A%22request%20ai%20review%22
https://github.com/danmoseley
danmoseleyhttps://github.com/danmoseley
on Apr 26, 2026https://github.com/github/github-mcp-server/issues/2390#issue-4330312950
current query parameter descriptionhttps://github.com/github/github-mcp-server/blob/4bded57e02e9346cb1fd595156e07dea51f0fb29/pkg/github/search.go#L176
the documentation pagehttps://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax
request ai reviewhttps://github.com/github/github-mcp-server/issues?q=state%3Aopen%20label%3A%22request%20ai%20review%22
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

Viewport: width=device-width


URLs of crawlers that visited me.