MCPcopy
hub / github.com/github/github-mcp-server / ListIssues

Function ListIssues

pkg/github/issues.go:2436–2693  ·  view source on GitHub ↗

ListIssues creates a tool to list and filter repository issues. It exposes the Issues 2.0 field_filters input plus field_values output enrichment.

(t translations.TranslationHelperFunc)

Source from the content-addressed store, hash-verified

2434// ListIssues creates a tool to list and filter repository issues. It exposes the
2435// Issues 2.0 field_filters input plus field_values output enrichment.
2436func ListIssues(t translations.TranslationHelperFunc) inventory.ServerTool {
2437 schema := &jsonschema.Schema{
2438 Type: "object",
2439 Properties: map[string]*jsonschema.Schema{
2440 "owner": {
2441 Type: "string",
2442 Description: "Repository owner",
2443 },
2444 "repo": {
2445 Type: "string",
2446 Description: "Repository name",
2447 },
2448 "state": {
2449 Type: "string",
2450 Description: "Filter by state, by default both open and closed issues are returned when not provided",
2451 Enum: []any{"OPEN", "CLOSED"},
2452 },
2453 "labels": {
2454 Type: "array",
2455 Description: "Filter by labels",
2456 Items: &jsonschema.Schema{
2457 Type: "string",
2458 },
2459 },
2460 "orderBy": {
2461 Type: "string",
2462 Description: "Order issues by field. If provided, the 'direction' also needs to be provided.",
2463 Enum: []any{"CREATED_AT", "UPDATED_AT", "COMMENTS"},
2464 },
2465 "direction": {
2466 Type: "string",
2467 Description: "Order direction. If provided, the 'orderBy' also needs to be provided.",
2468 Enum: []any{"ASC", "DESC"},
2469 },
2470 "since": {
2471 Type: "string",
2472 Description: "Filter by date (ISO 8601 timestamp)",
2473 },
2474 "field_filters": {
2475 Type: "array",
2476 Description: "Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD date).",
2477 Items: &jsonschema.Schema{
2478 Type: "object",
2479 Properties: map[string]*jsonschema.Schema{
2480 "field_name": {
2481 Type: "string",
2482 Description: "Name of the custom field (e.g. \"Priority\"). Case-insensitive.",
2483 },
2484 "value": {
2485 Type: "string",
2486 Description: "Value to filter on. For single-select fields, the option name (e.g. \"P1\"). For dates, YYYY-MM-DD. For numbers, the numeric value as a string. For text, the text value.",
2487 },
2488 },
2489 Required: []string{"field_name", "value"},
2490 },
2491 },
2492 },
2493 Required: []string{"owner", "repo"},

Callers 4

AllToolsFunction · 0.85
Test_ListIssuesFunction · 0.85

Calls 15

NewToolResultErrorFunction · 0.92
LabelListIssuesFunction · 0.92
WithCursorPaginationFunction · 0.85
NewToolFunction · 0.85
OptionalStringArrayParamFunction · 0.85
parseISOTimestampFunction · 0.85
parseRawFieldFiltersFunction · 0.85
fetchIssueFieldsFunction · 0.85
resolveFieldFiltersFunction · 0.85
getIssueQueryTypeFunction · 0.85

Tested by 3

Test_ListIssuesFunction · 0.68