You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use lexical search_issues for scoped and syntax queries
On github.com, search_issues defaulted to semantic search, so keyword
and GitHub search-syntax queries silently returned near-empty or
unrelated hits. Choose lexical when owner/repo scope is set, when the
raw query looks like issues search syntax, or when search_type is
lexical. Keep semantic for open-ended natural-language queries, with
an explicit search_type override.
Closes#3188
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1036,8 +1036,9 @@ The following sets of tools are available:
1036
1036
-`owner`: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
1037
1037
-`page`: Page number for pagination (min 1) (number, optional)
1038
1038
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1039
-
-`query`: The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR. (string, required)
1039
+
-`query`: Search query. Prefer GitHub issues search syntax for keywords and filters. For open-ended conceptual questions, plain natural language is fine. Pass search_type=lexical to force keyword search. (string, required)
1040
1040
-`repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
1041
+
-`search_type`: Search engine. lexical matches GitHub issues search keywords and filters. semantic uses natural-language matching. When omitted, scoped or search-syntax queries use lexical; open-ended conceptual queries use semantic on github.com. (string, optional)
1041
1042
-`sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/search_issues.snap
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
"readOnlyHint": true,
5
5
"title": "Search issues"
6
6
},
7
-
"description": "Search issues using natural-language semantic matching. Best for conceptual or paraphrased queries (e.g. \"login fails after password reset\"). Already scoped to is:issue.",
7
+
"description": "Search issues on GitHub. Uses lexical GitHub issues search for keyword or search-syntax queries, and when owner/repo scope is set. Uses natural-language semantic matching for open-ended conceptual queries. Already scoped to is:issue. Pass search_type to force lexical or semantic.",
8
8
"inputSchema": {
9
9
"properties": {
10
10
"fields": {
@@ -64,13 +64,21 @@
64
64
"type": "number"
65
65
},
66
66
"query": {
67
-
"description": "The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR.",
67
+
"description": "Search query. Prefer GitHub issues search syntax for keywords and filters. For open-ended conceptual questions, plain natural language is fine. Pass search_type=lexical to force keyword search.",
68
68
"type": "string"
69
69
},
70
70
"repo": {
71
71
"description": "Optional repository name. If provided with owner, only issues for this repository are listed.",
72
72
"type": "string"
73
73
},
74
+
"search_type": {
75
+
"description": "Search engine. lexical matches GitHub issues search keywords and filters. semantic uses natural-language matching. When omitted, scoped or search-syntax queries use lexical; open-ended conceptual queries use semantic on github.com.",
76
+
"enum": [
77
+
"lexical",
78
+
"semantic"
79
+
],
80
+
"type": "string"
81
+
},
74
82
"sort": {
75
83
"description": "Sort field by number of matches of categories, defaults to best match",
// caller's literal keywords and handles OR fine. The description has to describe
1809
1809
// the engine the host will actually use.
1810
1810
const (
1811
-
searchIssuesSemanticDescription="Search issues using natural-language semantic matching. Best for conceptual or paraphrased queries (e.g. \"login fails after password reset\"). Already scoped to is:issue."
1811
+
searchIssuesSemanticDescription="Search issues on GitHub. Uses lexical GitHub issues search for keyword or search-syntax queries, and when owner/repo scope is set. Uses natural-language semantic matching for open-ended conceptual queries. Already scoped to is:issue. Pass search_type to force lexical or semantic."
1812
1812
searchIssuesLexicalDescription="Search for issues in GitHub repositories using issues search syntax already scoped to is:issue"
1813
1813
1814
-
searchIssuesSemanticQueryDescription="The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR."
1814
+
searchIssuesSemanticQueryDescription="Search query. Prefer GitHub issues search syntax for keywords and filters. For open-ended conceptual questions, plain natural language is fine. Pass search_type=lexical to force keyword search."
1815
1815
searchIssuesLexicalQueryDescription="Search query using GitHub issues search syntax"
Description: "Search engine. lexical matches GitHub issues search keywords and filters. semantic uses natural-language matching. When omitted, scoped or search-syntax queries use lexical; open-ended conceptual queries use semantic on github.com.",
0 commit comments