Skip to content

Commit 584d2e0

Browse files
committed
reduce description size/redundancy
1 parent 5cb0758 commit 584d2e0

File tree

5 files changed

+10
-49
lines changed

5 files changed

+10
-49
lines changed

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -845,22 +845,15 @@ Options are:
845845
- `owner_type`: Owner type (string, required)
846846
- `per_page`: Results per page (max 50) (number, optional)
847847
- `project_number`: The project's number. (number, required)
848-
- `query`: Query string for advanced filtering of project items. See Projects server instructions (list_project_items query rules) for full construction heuristics, syntax essentials, qualifier glossary, pagination mandate, recovery guidance, and prohibited behaviors. (string, optional)
848+
- `query`: Query string for advanced filtering of project items using GitHub's project filtering syntax. (string, optional)
849849

850850
- **list_projects** - List projects
851851
- `after`: Forward pagination cursor from previous pageInfo.nextCursor. (string, optional)
852852
- `before`: Backward pagination cursor from previous pageInfo.prevCursor (rare). (string, optional)
853853
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive. (string, required)
854854
- `owner_type`: Owner type (string, required)
855855
- `per_page`: Results per page (max 50) (number, optional)
856-
- `query`: Filter projects by a search query
857-
858-
Scope: title text + open/closed state.
859-
PERMITTED qualifiers: is:open, is:closed (state), simple title terms.
860-
FORBIDDEN: is:issue, is:pr, assignee:, label:, status:, sprint-name:, parent-issue:, team-name:, priority:, etc.
861-
Examples:
862-
- roadmap is:open
863-
- is:open feature planning (string, optional)
856+
- `query`: Filter projects by title text and open/closed state; permitted qualifiers: is:open, is:closed; examples: "roadmap is:open", "is:open feature planning". (string, optional)
864857

865858
- **update_project_item** - Update project item
866859
- `item_id`: The unique identifier of the project item. This is not the issue or pull request ID. (number, required)

pkg/github/__toolsnaps__/list_project_items.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"type": "number"
4343
},
4444
"query": {
45-
"description": "Query string for advanced filtering of project items. See Projects server instructions (list_project_items query rules) for full construction heuristics, syntax essentials, qualifier glossary, pagination mandate, recovery guidance, and prohibited behaviors.",
45+
"description": "Query string for advanced filtering of project items using GitHub's project filtering syntax.",
4646
"type": "string"
4747
}
4848
},

pkg/github/__toolsnaps__/list_projects.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"type": "number"
3232
},
3333
"query": {
34-
"description": "Filter projects by a search query\n\t\t\t\t\nScope: title text + open/closed state.\nPERMITTED qualifiers: is:open, is:closed (state), simple title terms.\nFORBIDDEN: is:issue, is:pr, assignee:, label:, status:, sprint-name:, parent-issue:, team-name:, priority:, etc.\nExamples:\n\t- roadmap is:open\n\t- is:open feature planning",
34+
"description": "Filter projects by title text and open/closed state; permitted qualifiers: is:open, is:closed; examples: \"roadmap is:open\", \"is:open feature planning\".",
3535
"type": "string"
3636
}
3737
},

pkg/github/instructions.go

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,37 +65,19 @@ Use 'list_discussion_categories' to understand available categories before creat
6565
case "projects":
6666
return `## Projects
6767
68-
Read Tools:
69-
- list_projects
70-
- get_project
71-
- list_project_fields
72-
- get_project_field
73-
- list_project_items
74-
- get_project_item
75-
Write Tools:
76-
- add_project_item
77-
- update_project_item
78-
- delete_project_item
68+
Workflow: 1) list_project_fields (get field IDs), 2) list_project_items (with pagination), 3) optional updates.
7969
8070
Field usage:
8171
- Call list_project_fields first to understand available fields and get IDs/types before filtering.
8272
- Use EXACT returned field names (case-insensitive match). Don't invent names or IDs.
83-
- Iteration synonyms (sprint/cycle/iteration) only if that field exists; map to the actual name (e.g. sprint:@current).
73+
- Iteration synonyms (sprint/cycle) only if that field exists; map to the actual name (e.g. sprint:@current).
8474
- Only include filters for fields that exist and are relevant.
8575
8676
Pagination (mandatory):
87-
Forward (normal) flow:
8877
- Loop while pageInfo.hasNextPage=true using after=pageInfo.nextCursor.
8978
- Keep query, fields, per_page IDENTICAL on every page.
90-
Backward (rare) flow:
9179
- Use before=pageInfo.prevCursor only when explicitly navigating to a previous page.
92-
Parameters:
93-
- per_page: results per page (max 50). Choose a stable value; do not change mid-sequence.
94-
- after: forward cursor from prior response (pageInfo.nextCursor).
95-
- before: backward cursor from prior response (pageInfo.prevCursor); seldom needed.
96-
97-
Fields parameter:
98-
- Include field IDs on EVERY paginated list_project_items call if you need values. Omit → title only.
80+
- Do not analyze until ALL pages fetched.
9981
10082
Counting rules:
10183
- Count items array length after full pagination.
@@ -107,10 +89,6 @@ Summary vs list:
10789
- Summaries ONLY if user uses verbs: analyze | summarize | summary | report | overview | insights.
10890
- Listing verbs (list/show/get/fetch/display/enumerate) → enumerate + total.
10991
110-
Examples:
111-
- list_projects: "roadmap is:open"
112-
- list_project_items: state:open is:issue sprint:@current priority:high updated:>@today-7d
113-
11492
Self-check before returning:
11593
- Paginated fully
11694
- Dedupe by id/node_id
@@ -121,7 +99,7 @@ Self-check before returning:
12199
Return COMPLETE data or state what's missing (e.g. pages skipped).
122100
123101
list_project_items query rules:
124-
Query string - For advanced filtering of project items using GitHub's search syntax:
102+
Query string - For advanced filtering of project items using GitHub's project filtering syntax:
125103
126104
MUST reflect user intent; strongly prefer explicit content type if narrowed:
127105
- "open issues" → state:open is:issue
@@ -154,9 +132,6 @@ Common Qualifier Glossary (items):
154132
priority:p1|high | sprint-name:@current | team-name:"Backend Team" | parent-issue:"org/repo#123" |
155133
updated:>@today-7d | title:*text* | -label:wontfix | label:bug,critical | no:assignee | has:label
156134
157-
Pagination Mandate:
158-
Do not analyze until ALL pages fetched (loop while pageInfo.hasNextPage=true). Always reuse identical query, fields, per_page.
159-
160135
Never:
161136
- Infer field IDs; fetch via list_project_fields.
162137
- Drop 'fields' param on subsequent pages if field values are needed.`

pkg/github/projects.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,7 @@ func ListProjects(getClient GetClientFn, t translations.TranslationHelperFunc) (
4141
mcp.Description("If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive."),
4242
),
4343
mcp.WithString("query",
44-
mcp.Description(`Filter projects by a search query
45-
46-
Scope: title text + open/closed state.
47-
PERMITTED qualifiers: is:open, is:closed (state), simple title terms.
48-
FORBIDDEN: is:issue, is:pr, assignee:, label:, status:, sprint-name:, parent-issue:, team-name:, priority:, etc.
49-
Examples:
50-
- roadmap is:open
51-
- is:open feature planning`),
44+
mcp.Description(`Filter projects by title text and open/closed state; permitted qualifiers: is:open, is:closed; examples: "roadmap is:open", "is:open feature planning".`),
5245
),
5346
mcp.WithNumber("per_page",
5447
mcp.Description(fmt.Sprintf("Results per page (max %d)", MaxProjectsPerPage)),
@@ -396,7 +389,7 @@ func ListProjectItems(getClient GetClientFn, t translations.TranslationHelperFun
396389
mcp.Description("The project's number."),
397390
),
398391
mcp.WithString("query",
399-
mcp.Description(`Query string for advanced filtering of project items. See Projects server instructions (list_project_items query rules) for full construction heuristics, syntax essentials, qualifier glossary, pagination mandate, recovery guidance, and prohibited behaviors.`),
392+
mcp.Description(`Query string for advanced filtering of project items using GitHub's project filtering syntax.`),
400393
),
401394
mcp.WithNumber("per_page",
402395
mcp.Description(fmt.Sprintf("Results per page (max %d)", MaxProjectsPerPage)),

0 commit comments

Comments
 (0)