@@ -61,6 +61,9 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
6161 mcp .WithString ("before" ,
6262 mcp .Description ("Cursor for pagination, use the 'before' field from the previous response" ),
6363 ),
64+ mcp .WithBoolean ("answered" ,
65+ mcp .Description ("Filter by whether discussions have been answered or not" ),
66+ ),
6467 ),
6568 func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
6669 // Decode params
@@ -75,6 +78,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
7578 Last int32
7679 After string
7780 Before string
81+ Answered bool
7882 }
7983 if err := mapstructure .Decode (request .Params .Arguments , & params ); err != nil {
8084 return mcp .NewToolResultError (err .Error ()), nil
@@ -109,7 +113,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
109113 } `graphql:"category"`
110114 URL githubv4.String `graphql:"url"`
111115 }
112- } `graphql:"discussions(categoryId: $categoryId, orderBy: {field: $sort, direction: $direction}, first: $first, after: $after, last: $last, before: $before)"`
116+ } `graphql:"discussions(categoryId: $categoryId, orderBy: {field: $sort, direction: $direction}, first: $first, after: $after, last: $last, before: $before, answered: $answered )"`
113117 } `graphql:"repository(owner: $owner, name: $repo)"`
114118 }
115119 // Build query variables
@@ -123,6 +127,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
123127 "last" : githubv4 .Int (params .Last ),
124128 "after" : githubv4 .String (params .After ),
125129 "before" : githubv4 .String (params .Before ),
130+ "answered" : githubv4 .Boolean (params .Answered ),
126131 }
127132 // Execute query
128133 if err := client .Query (ctx , & q , vars ); err != nil {
0 commit comments