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
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -820,6 +820,7 @@ Options are:
820
820
-`project_number`: The project's number. (number, required)
821
821
822
822
-**get_project_item** - Get project item
823
+
-`fields`: Specific list of field IDs to include in the response (e.g. ["102589", "985201", "169875"]). If not provided, only the title field is included. (string[], optional)
823
824
-`item_id`: The item's ID. (number, required)
824
825
-`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)
825
826
-`owner_type`: Owner type (string, required)
@@ -832,6 +833,7 @@ Options are:
832
833
-`project_number`: The project's number. (number, required)
833
834
834
835
-**list_project_items** - List project items
836
+
-`fields`: Specific list of field IDs to include in the response (e.g. ["102589", "985201", "169875"]). If not provided, only the title field is included. (string[], optional)
835
837
-`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)
836
838
-`owner_type`: Owner type (string, required)
837
839
-`per_page`: Number of results per page (max 100, default: 30) (number, optional)
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/get_project_item.snap
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@
6
6
"description": "Get a specific Project item for a user or org",
7
7
"inputSchema": {
8
8
"properties": {
9
+
"fields": {
10
+
"description": "Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included.",
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/list_project_items.snap
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,13 @@
6
6
"description": "List Project items for a user or org",
7
7
"inputSchema": {
8
8
"properties": {
9
+
"fields": {
10
+
"description": "Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included.",
11
+
"items": {
12
+
"type": "string"
13
+
},
14
+
"type": "array"
15
+
},
9
16
"owner": {
10
17
"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.",
returnnil, fmt.Errorf("failed to add options to request: %w", err)
@@ -257,7 +257,8 @@ func ListProjectFields(getClient GetClientFn, t translations.TranslationHelperFu
257
257
}
258
258
projectFields:= []projectV2Field{}
259
259
260
-
opts:=listProjectsOptions{PerPage: perPage}
260
+
opts:=paginationOptions{PerPage: perPage}
261
+
261
262
url, err=addOptions(url, opts)
262
263
iferr!=nil {
263
264
returnnil, fmt.Errorf("failed to add options to request: %w", err)
@@ -402,6 +403,10 @@ func ListProjectItems(getClient GetClientFn, t translations.TranslationHelperFun
402
403
mcp.WithNumber("per_page",
403
404
mcp.Description("Number of results per page (max 100, default: 30)"),
404
405
),
406
+
mcp.WithArray("fields",
407
+
mcp.Description("Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included."),
returnnil, fmt.Errorf("failed to add options to request: %w", err)
@@ -504,6 +516,10 @@ func GetProjectItem(getClient GetClientFn, t translations.TranslationHelperFunc)
504
516
mcp.Required(),
505
517
mcp.Description("The item's ID."),
506
518
),
519
+
mcp.WithArray("fields",
520
+
mcp.Description("Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included."),
mcp.WithPromptDescription(t("PROMPT_MANAGE_PROJECT_ITEMS_DESCRIPTION", "Guide for working with GitHub Projects, including listing projects, viewing fields, querying items, and updating field values.")),
1021
+
mcp.WithArgument("owner", mcp.ArgumentDescription("The owner of the project (user or organization name)"), mcp.RequiredArgument()),
1022
+
mcp.WithArgument("owner_type", mcp.ArgumentDescription("Type of owner: 'user' or 'org'"), mcp.RequiredArgument()),
Content: mcp.NewTextContent("You are an assistant helping users work with GitHub Projects V2. Your role is to help them discover projects, understand project fields, query items, and update field values on project items."),
1031
+
},
1032
+
{
1033
+
Role: "user",
1034
+
Content: mcp.NewTextContent(fmt.Sprintf("I want to work with projects owned by %s (owner_type: %s). Please help me understand what projects are available.", owner, ownerType)),
1035
+
},
1036
+
{
1037
+
Role: "assistant",
1038
+
Content: mcp.NewTextContent(fmt.Sprintf("I'll help you explore the projects for %s. Let me start by listing the available projects.", owner)),
1039
+
},
1040
+
{
1041
+
Role: "user",
1042
+
Content: mcp.NewTextContent("Great! Once you show me the projects, I'd like to understand the fields available in a specific project."),
1043
+
},
1044
+
{
1045
+
Role: "assistant",
1046
+
Content: mcp.NewTextContent("Perfect! After showing you the projects, I can help you:\n\n1. π List all fields in a project (using `list_project_fields`)\n2. π Get details about specific fields including their IDs, data types, and options\n3. π Query project items with specific field values (using `list_project_items`)\n\nIMPORTANT: When querying project items, you must provide a list of field IDs in the 'fields' parameter to access field values. For example: fields=[\"198354254\", \"198354255\"] to get Status and Assignees. Without this parameter, only the title field is returned."),
1047
+
},
1048
+
{
1049
+
Role: "user",
1050
+
Content: mcp.NewTextContent("How do I update field values on project items?"),
1051
+
},
1052
+
{
1053
+
Role: "assistant",
1054
+
Content: mcp.NewTextContent("To update field values on project items, you'll use the `update_project_item` tool. Here's what you need to know:\n\n1. **Get the item_id**: Use `list_project_items` to find the internal project item ID (not the issue/PR number)\n2. **Get the field_id**: Use `list_project_fields` to find the ID of the field you want to update\n3. **Update the field**: Call `update_project_item` with:\n - project_number: The project's number\n - item_id: The internal project item ID\n - updated_field: An object with {\"id\": <field_id>, \"value\": <new_value>}\n\nFor single_select fields, the value should be the option name (e.g., \"In Progress\").\nFor text fields, provide a string value.\nFor number fields, provide a numeric value.\nTo clear a field, set \"value\" to null."),
1055
+
},
1056
+
{
1057
+
Role: "user",
1058
+
Content: mcp.NewTextContent("Can you give me an example workflow for finding items and updating their status?"),
1059
+
},
1060
+
{
1061
+
Role: "assistant",
1062
+
Content: mcp.NewTextContent(fmt.Sprintf("Absolutely! Here's a complete workflow:\n\n**Step 1: Find your project**\nUse `list_projects` with owner=\"%s\" and owner_type=\"%s\"\n\n**Step 2: Get the Status field ID**\nUse `list_project_fields` with the project_number from step 1\nLook for the field with name=\"Status\" and note its ID (e.g., 198354254)\n\n**Step 3: Query items with the Status field**\nUse `list_project_items` with fields=[\"198354254\"] to see current status values\nOptionally add a query parameter to filter items (e.g., query=\"assignee:@me\")\n\n**Step 4: Update an item's status**\nUse `update_project_item` with:\n- item_id: The ID from the item you want to update\n- updated_field: {\"id\": 198354254, \"value\": \"In Progress\"}\n\nLet me start by listing your projects now.", owner, ownerType)),
0 commit comments