Skip to content

Enumerate strings in schema #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkg/github/issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,23 @@ func searchIssues(client *github.Client, t translations.TranslationHelperFunc) (
),
mcp.WithString("sort",
mcp.Description("Sort field (comments, reactions, created, etc.)"),
mcp.Enum(
"comments",
"reactions",
"reactions-+1",
"reactions--1",
"reactions-smile",
"reactions-thinking_face",
"reactions-heart",
"reactions-tada",
"interactions",
"created",
"updated",
),
),
mcp.WithString("order",
mcp.Description("Sort order ('asc' or 'desc')"),
mcp.Enum("asc", "desc"),
),
mcp.WithNumber("per_page",
mcp.Description("Results per page (max 100)"),
Expand Down Expand Up @@ -322,6 +336,7 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
),
mcp.WithString("state",
mcp.Description("Filter by state ('open', 'closed', 'all')"),
mcp.Enum("open", "closed", "all"),
),
mcp.WithArray("labels",
mcp.Description("Filter by labels"),
Expand All @@ -333,9 +348,11 @@ func listIssues(client *github.Client, t translations.TranslationHelperFunc) (to
),
mcp.WithString("sort",
mcp.Description("Sort by ('created', 'updated', 'comments')"),
mcp.Enum("created", "updated", "comments"),
),
mcp.WithString("direction",
mcp.Description("Sort direction ('asc', 'desc')"),
mcp.Enum("asc", "desc"),
),
mcp.WithString("since",
mcp.Description("Filter by date (ISO 8601 timestamp)"),
Expand Down
3 changes: 3 additions & 0 deletions pkg/github/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func searchCode(client *github.Client, t translations.TranslationHelperFunc) (to
),
mcp.WithString("order",
mcp.Description("Sort order ('asc' or 'desc')"),
mcp.Enum("asc", "desc"),
),
mcp.WithNumber("per_page",
mcp.Description("Results per page (max 100)"),
Expand Down Expand Up @@ -156,9 +157,11 @@ func searchUsers(client *github.Client, t translations.TranslationHelperFunc) (t
),
mcp.WithString("sort",
mcp.Description("Sort field (followers, repositories, joined)"),
mcp.Enum("followers", "repositories", "joined"),
),
mcp.WithString("order",
mcp.Description("Sort order ('asc' or 'desc')"),
mcp.Enum("asc", "desc"),
),
mcp.WithNumber("per_page",
mcp.Description("Results per page (max 100)"),
Expand Down