Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
1decd77
remove claude web
tommaso-moro Dec 24, 2025
43bea59
Change list workflow runs to allow empty resource id to list all runs…
mattdholloway Dec 29, 2025
73a8f98
build(deps): bump actions/github-script from 7 to 8
dependabot[bot] Dec 29, 2025
af5a6df
Update README.md to hyperlink Open AI Codex installation guide
s-sanjay Dec 28, 2025
587d829
docs: add Docker image name to Prerequisites section
majiayu000 Dec 30, 2025
953d26f
fix: use gh pr checkout to handle fork PRs in license-check workflow
Copilot Dec 31, 2025
2cc6911
refactor: use consistent snake_case for issue_number parameter
majiayu000 Dec 30, 2025
30712de
docs: regenerate README after parameter rename
majiayu000 Dec 31, 2025
762845a
Add API Error annotations to GitHub issue errors (#1566)
omgitsads Jan 2, 2026
92bdc28
add docs for Rovo Dev CLI installation
kunchenguid Aug 13, 2025
116c574
fix: filterToolsByName returns all matching tools for feature flag fi…
majiayu000 Jan 1, 2026
cac11f2
exclude tools requiring ff from docs
mattdholloway Jan 2, 2026
6f7bf27
refactor docs toolset gen
mattdholloway Jan 2, 2026
67f3427
Update cmd/github-mcp-server/generate_docs.go
mattdholloway Jan 2, 2026
905a08f
Update cmd/github-mcp-server/generate_docs.go
mattdholloway Jan 2, 2026
2b352ab
Improvements to push_files tool (#1676)
almaleksia Jan 5, 2026
eb6db0f
Add scopes package and update ServerTool struct with scope fields
Copilot Dec 23, 2025
1e5931a
Update most tools with OAuth scope information
Copilot Dec 23, 2025
db9f4e8
Complete OAuth scope implementation for all tools
Copilot Dec 23, 2025
db179be
Simplify scope implementation per feedback
Copilot Dec 23, 2025
c765101
refresh readme after rebase
SamMorrowDrums Jan 5, 2026
7796c08
Add scope hierarchy and auto-derive accepted scopes
SamMorrowDrums Jan 5, 2026
3d1ae30
refres readme after update
SamMorrowDrums Jan 5, 2026
df9fc6a
Use repo scope for star/unstar tools instead of public_repo
SamMorrowDrums Jan 5, 2026
cec5a1a
Fix conflict and regenerate docs after rebase
SamMorrowDrums Jan 5, 2026
48744ca
Sort scope slices for deterministic output
SamMorrowDrums Jan 5, 2026
46b8cb6
Add PAT scope filtering for stdio server
SamMorrowDrums Jan 5, 2026
a19a159
Enable scope filtering by default
SamMorrowDrums Jan 5, 2026
f45b94a
Make scope filtering always enabled (remove flag)
SamMorrowDrums Jan 5, 2026
8afb4fb
Only check scopes for classic PATs (ghp_ prefix)
SamMorrowDrums Jan 5, 2026
39fed35
Remove manual scope-to-tools table from docs
SamMorrowDrums Jan 5, 2026
c2450ce
Update pkg/scopes/filter.go
SamMorrowDrums Jan 5, 2026
acd7929
Document that GitHub App and server-to-server tokens are not filtered
SamMorrowDrums Jan 5, 2026
f14f507
Add tip about editing PAT scopes in GitHub UI
SamMorrowDrums Jan 5, 2026
4deaa83
Remove empty filter.go and document OAuth scope challenges
SamMorrowDrums Jan 5, 2026
9aef435
Fix server-configuration.md scope filtering description
SamMorrowDrums Jan 5, 2026
c809766
Mention OAuth scope challenges in server-configuration.md
SamMorrowDrums Jan 5, 2026
c428f72
Don't filter read-only repo tools (work on public repos without scope)
SamMorrowDrums Jan 5, 2026
7d4a4a6
Document public repo access quirk for read-only tools
SamMorrowDrums Jan 5, 2026
80b0306
Replace go-github-mock with stretchr/testify for actions/issues/proje…
Copilot Jan 6, 2026
66a0164
initial projects consolidation
mattdholloway Dec 31, 2025
3cd0be2
update tool aliases
mattdholloway Dec 31, 2025
304f074
hold-bac feature flag
mattdholloway Jan 5, 2026
7b30c93
update docs
mattdholloway Jan 5, 2026
099f995
revert "hold-bac feature flag"
mattdholloway Jan 5, 2026
be5a449
fix project tools to add scope to newtool init
mattdholloway Jan 5, 2026
a57b472
add http resp code checking for getProjectItem
mattdholloway Jan 6, 2026
71862a9
update tests to use new mock pattern
mattdholloway Jan 6, 2026
ab23070
Update command instructions for terminal usage
floriangrousset Oct 25, 2025
cc9e864
Fix nil pointer dereference in completion handler
SamMorrowDrums Jan 7, 2026
f2ff9d2
updated (#1756)
tommaso-moro Jan 8, 2026
ee8f4e6
Add list-scopes command using inventory architecture
Copilot Jan 6, 2026
d2df189
Add list_scopes.go implementation file
Copilot Jan 6, 2026
cd75b9b
Refactor formatToolsetName to shared helper function
Copilot Jan 6, 2026
33014a6
Add helpers.go with shared formatToolsetName function
Copilot Jan 6, 2026
ff0e67e
Add formatScopeDisplay helper and improve empty scope handling
Copilot Jan 6, 2026
e335503
Update Claude Code installation command to use add-json format for v2…
Copilot Jan 8, 2026
c061804
Use default scope in examples and clarify --scope flag is optional
Copilot Jan 8, 2026
b1ab893
bug fix (#1775)
tommaso-moro Jan 9, 2026
44d9e13
Bringing back local mcp server registry config (#1767)
almaleksia Jan 9, 2026
8058d30
Update automation to use toolset IDs instead of display names
Copilot Jan 10, 2026
676956f
Fix resource handler to use deps from context
SamMorrowDrums Jan 9, 2026
53a6720
fix: keep all resources registered for resources/read requests
SamMorrowDrums Jan 12, 2026
c44ce2e
chore: remove unused filterResourcesByURI function
SamMorrowDrums Jan 12, 2026
88d117b
Add base_ref support to assign_copilot_to_issue tool
Copilot Jan 10, 2026
d18f26e
Add GraphQL-Features header support for agent assignment API
Copilot Jan 12, 2026
f62ff63
Regenerate documentation TOCs
SamMorrowDrums Jan 12, 2026
31b541e
chore: remove binary files
alexandear Jan 12, 2026
87a1110
Implement recursive JSON key sorting for toolsnaps
Copilot Jan 15, 2026
0bf791a
Regenerate toolsnaps with deterministic sorting
Copilot Jan 15, 2026
3ea9bfc
Add test for struct field ordering in toolsnaps
Copilot Jan 15, 2026
19beb33
Bug fix: invalid tool should error out (#1776)
tommaso-moro Jan 15, 2026
d88eb83
Add custom_instructions parameter to assign_copilot_to_issue tool
Copilot Jan 13, 2026
ccf5191
Fix dismiss_notification to accept HTTP 204 No Content response
Copilot Jan 16, 2026
3af1129
adding feature flag on dependency level (#1801)
tonytrg Jan 16, 2026
09adfc7
feat: poll for linked PR after assigning Copilot to issue
SamMorrowDrums Jan 14, 2026
bece2b5
fix: filter PRs by timestamp to avoid returning stale results
SamMorrowDrums Jan 14, 2026
92d8d51
fix: remove tool name reference from pending note message
SamMorrowDrums Jan 14, 2026
d3ff0a2
fix: address review feedback
SamMorrowDrums Jan 14, 2026
f1d33d5
refactor: use GraphQLFeaturesTransport internally
SamMorrowDrums Jan 14, 2026
a663a6b
feat: add progress notifications during PR polling in assign_copilot_…
SamMorrowDrums Jan 16, 2026
7c053f1
Add default label to all new issues (#1828)
JoannaaKL Jan 16, 2026
950b1eb
build(deps): bump github.com/go-viper/mapstructure/v2 from 2.4.0 to 2…
dependabot[bot] Jan 19, 2026
e81f120
Add tool search CLI (#1839)
JoannaaKL Jan 19, 2026
fc079ee
Build full package in Dockerfile to include all commands (#1844)
SamMorrowDrums Jan 20, 2026
dbf983e
Add -t option to docker run command
JoannaaKL Jan 20, 2026
64752fd
Update README.md
JoannaaKL Jan 20, 2026
238b143
initial OSS insiders docs (#1857)
mattdholloway Jan 22, 2026
eaaf1ea
Update consolidated projects tools: make owner_type optional and fix …
Copilot Jan 12, 2026
5e5ff27
Address PR review feedback
SamMorrowDrums Jan 16, 2026
5fd65a2
ci: use mcp-conformance-action for conformance tests
SamMorrowDrums Jan 16, 2026
a70165b
fix: use correct action input names
SamMorrowDrums Jan 16, 2026
c09815f
fix: address review feedback
SamMorrowDrums Jan 16, 2026
21eff0b
fix: update action SHA to include subshell fix
SamMorrowDrums Jan 16, 2026
fbfc025
fix: update action SHA to include stderr logging
SamMorrowDrums Jan 16, 2026
6f2f155
chore: use immutable semver tag v1.4.0
SamMorrowDrums Jan 16, 2026
148d51f
chore: update mcp-conformance-action to v1.4.1
SamMorrowDrums Jan 16, 2026
d074f7f
chore: update mcp-conformance-action to v1.4.2
SamMorrowDrums Jan 16, 2026
aec726b
chore: update mcp-conformance-action to v1.4.3
SamMorrowDrums Jan 16, 2026
5ab8874
chore: update mcp-conformance-action to v1.4.4
SamMorrowDrums Jan 16, 2026
bd541e3
chore: update mcp-conformance-action to v1.4.6
SamMorrowDrums Jan 16, 2026
2c2613c
ci: update to mcp-conformance-action@v2.0.0
SamMorrowDrums Jan 16, 2026
a236b66
chore: update conformance action to v2.0.1 with transport fix
SamMorrowDrums Jan 16, 2026
e1cde28
chore: update conformance action to v2.0.2 with Zod schema fix
SamMorrowDrums Jan 16, 2026
4bbd84e
ci: upgrade mcp-conformance-action to v2.2.0
SamMorrowDrums Jan 17, 2026
f244b8a
chore: update mcp-conformance-action to v2.3.0
SamMorrowDrums Jan 17, 2026
f850ce3
chore: update mcp-conformance-action to v2.3.2
SamMorrowDrums Jan 17, 2026
55d22d8
chore: update mcp-conformance-action to v2 for security fixes
SamMorrowDrums Jan 18, 2026
adfd83b
Rename to mcp-diff.yml (action renamed to mcp-server-diff)
SamMorrowDrums Jan 20, 2026
e559a36
Rename workflow for mcp-server-diff action
SamMorrowDrums Jan 20, 2026
afc2396
Fix mcp-diff workflow triggers
SamMorrowDrums Jan 22, 2026
15e66b3
Generate server instructions in Inventory (#1869)
tommaso-moro Jan 23, 2026
0a62aab
default to consolidated actions/projects toolsets and add hold back flag
mattdholloway Jan 26, 2026
8287d5f
update docs
mattdholloway Jan 26, 2026
c7c0ee6
docs update (2)
mattdholloway Jan 26, 2026
1410dc1
chore: remove unused github.com/fatih/color
alexandear Jan 23, 2026
b1d4aa3
chore: workaround LF for Windows
alexandear Jan 23, 2026
51745c5
Fix typo in OpenAI Codex installation guide link
leereilly Jan 24, 2026
7569d5c
Update Go version requirement in mcpcurl to 1.24
alexandear Jan 13, 2026
0caa265
docs: add Windows notes for Claude MCP HTTP setup
loktar00 Jan 22, 2026
60a8c21
remove old flags
mattdholloway Jan 26, 2026
7af51a0
adding correct insiders-mode name
tonytrg Jan 26, 2026
a4670b0
fix naming
tonytrg Jan 26, 2026
40e21ec
Fix generateInstructions to use only enabled toolsets
SamMorrowDrums Jan 26, 2026
e2640de
Update mcp-server-diff action to v2.2.0
SamMorrowDrums Jan 26, 2026
b1a2b74
Add more toolset configurations to mcp-diff workflow
SamMorrowDrums Jan 26, 2026
53a5f60
build(deps): bump SamMorrowDrums/mcp-server-diff from 2.2.0 to 2.3.5
dependabot[bot] Jan 26, 2026
51fc176
build(deps): bump golang from 1.25.4-alpine to 1.25.6-alpine
dependabot[bot] Jan 26, 2026
a1e82e7
add line length truncate buffer
mattdholloway Jan 26, 2026
4bb1ba9
consolidate buffer logic
mattdholloway Jan 26, 2026
47412e5
Refactor buffer processing for clarity and add edge case tests
SamMorrowDrums Jan 27, 2026
fb9cceb
docs: add Copilot CLI installation guide
GeekTrainer Jan 27, 2026
4bb9691
Update docs/installation-guides/install-copilot-cli.md
GeekTrainer Jan 27, 2026
1820a0f
Apply suggestion from @GeekTrainer
GeekTrainer Jan 27, 2026
9fcf932
adding trailing slash to uploads url (#1947)
tonytrg Feb 3, 2026
fb53abd
replace context.Background() (#1948)
kerobbi Feb 3, 2026
5aae851
Initial plan
Copilot Feb 3, 2026
bfcd9ad
Merge main into copilot/sub-pr-1681 and resolve conflicts
Copilot Feb 3, 2026
de467d4
Remove leftover conflict markers from actions.go
Copilot Feb 3, 2026
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
Prev Previous commit
Next Next commit
Simplify scope implementation per feedback
- Replace NewToolWithScopes with updated NewTool that includes scope parameters
- All tools now use the same constructor with explicit scope requirements
- Documentation only shows accepted scopes when they differ from required
- Removed NewToolWithScopes and NewToolFromHandlerWithScopes helper functions

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
  • Loading branch information
Copilot and SamMorrowDrums committed Jan 5, 2026
commit db179be4c3fc59343b5aa76a57f3448c2c7b9fe8
74 changes: 0 additions & 74 deletions README.md

Large diffs are not rendered by default.

32 changes: 27 additions & 5 deletions cmd/github-mcp-server/generate_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
fmt.Fprintf(buf, "- **%s** - %s\n", tool.Tool.Name, tool.Tool.Annotations.Title)

// OAuth scopes if present
if len(tool.RequiredScopes) > 0 || len(tool.AcceptedScopes) > 0 {
if len(tool.RequiredScopes) > 0 {
fmt.Fprintf(buf, " - **Required OAuth Scopes**: `%s`\n", strings.Join(tool.RequiredScopes, "`, `"))
}
if len(tool.AcceptedScopes) > 0 {
if len(tool.RequiredScopes) > 0 {
fmt.Fprintf(buf, " - **Required OAuth Scopes**: `%s`\n", strings.Join(tool.RequiredScopes, "`, `"))

// Only show accepted scopes if they differ from required scopes
if len(tool.AcceptedScopes) > 0 && !scopesEqual(tool.RequiredScopes, tool.AcceptedScopes) {
fmt.Fprintf(buf, " - **Accepted OAuth Scopes**: `%s`\n", strings.Join(tool.AcceptedScopes, "`, `"))
}
}
Expand Down Expand Up @@ -290,6 +290,28 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
}
}

// scopesEqual checks if two scope slices contain the same elements (order-independent)
func scopesEqual(a, b []string) bool {
if len(a) != len(b) {
return false
}

// Create a map for quick lookup
aMap := make(map[string]bool, len(a))
for _, scope := range a {
aMap[scope] = true
}

// Check if all elements in b are in a
for _, scope := range b {
if !aMap[scope] {
return false
}
}

return true
}

func contains(slice []string, item string) bool {
for _, s := range slice {
if s == item {
Expand Down
36 changes: 18 additions & 18 deletions pkg/github/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const (

// ListWorkflows creates a tool to list workflows in a repository
func ListWorkflows(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "list_workflows",
Expand Down Expand Up @@ -124,7 +124,7 @@ func ListWorkflows(t translations.TranslationHelperFunc) inventory.ServerTool {

// ListWorkflowRuns creates a tool to list workflow runs for a specific workflow
func ListWorkflowRuns(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "list_workflow_runs",
Expand Down Expand Up @@ -280,7 +280,7 @@ func ListWorkflowRuns(t translations.TranslationHelperFunc) inventory.ServerTool

// RunWorkflow creates a tool to run an Actions workflow
func RunWorkflow(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "run_workflow",
Expand Down Expand Up @@ -394,7 +394,7 @@ func RunWorkflow(t translations.TranslationHelperFunc) inventory.ServerTool {

// GetWorkflowRun creates a tool to get details of a specific workflow run
func GetWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "get_workflow_run",
Expand Down Expand Up @@ -464,7 +464,7 @@ func GetWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool {

// GetWorkflowRunLogs creates a tool to download logs for a specific workflow run
func GetWorkflowRunLogs(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "get_workflow_run_logs",
Expand Down Expand Up @@ -544,7 +544,7 @@ func GetWorkflowRunLogs(t translations.TranslationHelperFunc) inventory.ServerTo

// ListWorkflowJobs creates a tool to list jobs for a specific workflow run
func ListWorkflowJobs(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "list_workflow_jobs",
Expand Down Expand Up @@ -646,7 +646,7 @@ func ListWorkflowJobs(t translations.TranslationHelperFunc) inventory.ServerTool

// GetJobLogs creates a tool to download logs for a specific workflow job or efficiently get all failed job logs for a workflow run
func GetJobLogs(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "get_job_logs",
Expand Down Expand Up @@ -913,7 +913,7 @@ func downloadLogContent(ctx context.Context, logURL string, tailLines int, maxLi

// RerunWorkflowRun creates a tool to re-run an entire workflow run
func RerunWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "rerun_workflow_run",
Expand Down Expand Up @@ -990,7 +990,7 @@ func RerunWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool

// RerunFailedJobs creates a tool to re-run only the failed jobs in a workflow run
func RerunFailedJobs(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "rerun_failed_jobs",
Expand Down Expand Up @@ -1067,7 +1067,7 @@ func RerunFailedJobs(t translations.TranslationHelperFunc) inventory.ServerTool

// CancelWorkflowRun creates a tool to cancel a workflow run
func CancelWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "cancel_workflow_run",
Expand Down Expand Up @@ -1146,7 +1146,7 @@ func CancelWorkflowRun(t translations.TranslationHelperFunc) inventory.ServerToo

// ListWorkflowRunArtifacts creates a tool to list artifacts for a workflow run
func ListWorkflowRunArtifacts(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "list_workflow_run_artifacts",
Expand Down Expand Up @@ -1228,7 +1228,7 @@ func ListWorkflowRunArtifacts(t translations.TranslationHelperFunc) inventory.Se

// DownloadWorkflowRunArtifact creates a tool to download a workflow run artifact
func DownloadWorkflowRunArtifact(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "download_workflow_run_artifact",
Expand Down Expand Up @@ -1307,7 +1307,7 @@ func DownloadWorkflowRunArtifact(t translations.TranslationHelperFunc) inventory

// DeleteWorkflowRunLogs creates a tool to delete logs for a workflow run
func DeleteWorkflowRunLogs(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "delete_workflow_run_logs",
Expand Down Expand Up @@ -1385,7 +1385,7 @@ func DeleteWorkflowRunLogs(t translations.TranslationHelperFunc) inventory.Serve

// GetWorkflowRunUsage creates a tool to get usage metrics for a workflow run
func GetWorkflowRunUsage(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "get_workflow_run_usage",
Expand Down Expand Up @@ -1455,7 +1455,7 @@ func GetWorkflowRunUsage(t translations.TranslationHelperFunc) inventory.ServerT

// ActionsList returns the tool and handler for listing GitHub Actions resources.
func ActionsList(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "actions_list",
Expand Down Expand Up @@ -1652,7 +1652,7 @@ Use this tool to list workflows in a repository, or list workflow runs, jobs, an

// ActionsGet returns the tool and handler for getting GitHub Actions resources.
func ActionsGet(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "actions_get",
Expand Down Expand Up @@ -1762,7 +1762,7 @@ Use this tool to get details about individual workflows, workflow runs, jobs, an

// ActionsRunTrigger returns the tool and handler for triggering GitHub Actions workflows.
func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "actions_run_trigger",
Expand Down Expand Up @@ -1882,7 +1882,7 @@ func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerToo

// ActionsGetJobLogs returns the tool and handler for getting workflow job logs.
func ActionsGetJobLogs(t translations.TranslationHelperFunc) inventory.ServerTool {
tool := NewToolWithScopes(
tool := NewTool(
ToolsetMetadataActions,
mcp.Tool{
Name: "get_job_logs",
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/code_scanning.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

func GetCodeScanningAlert(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataCodeSecurity,
mcp.Tool{
Name: "get_code_scanning_alert",
Expand Down Expand Up @@ -95,7 +95,7 @@ func GetCodeScanningAlert(t translations.TranslationHelperFunc) inventory.Server
}

func ListCodeScanningAlerts(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataCodeSecurity,
mcp.Tool{
Name: "list_code_scanning_alerts",
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/context_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type UserDetails struct {

// GetMe creates a tool to get details of the authenticated user.
func GetMe(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataContext,
mcp.Tool{
Name: "get_me",
Expand Down Expand Up @@ -113,7 +113,7 @@ type OrganizationTeams struct {
}

func GetTeams(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataContext,
mcp.Tool{
Name: "get_teams",
Expand Down Expand Up @@ -212,7 +212,7 @@ func GetTeams(t translations.TranslationHelperFunc) inventory.ServerTool {
}

func GetTeamMembers(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataContext,
mcp.Tool{
Name: "get_team_members",
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/dependabot.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

func GetDependabotAlert(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataDependabot,
mcp.Tool{
Name: "get_dependabot_alert",
Expand Down Expand Up @@ -96,7 +96,7 @@ func GetDependabotAlert(t translations.TranslationHelperFunc) inventory.ServerTo
}

func ListDependabotAlerts(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataDependabot,
mcp.Tool{
Name: "list_dependabot_alerts",
Expand Down
26 changes: 6 additions & 20 deletions pkg/github/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,9 @@ func (d BaseDeps) GetContentWindowSize() int { return d.ContentWindowSize }
//
// The handler function receives deps extracted from context via MustDepsFromContext.
// Ensure ContextWithDeps is called to inject deps before any tool handlers are invoked.
func NewTool[In, Out any](toolset inventory.ToolsetMetadata, tool mcp.Tool, handler func(ctx context.Context, deps ToolDependencies, req *mcp.CallToolRequest, args In) (*mcp.CallToolResult, Out, error)) inventory.ServerTool {
return inventory.NewServerToolWithContextHandler(tool, toolset, func(ctx context.Context, req *mcp.CallToolRequest, args In) (*mcp.CallToolResult, Out, error) {
deps := MustDepsFromContext(ctx)
return handler(ctx, deps, req, args)
})
}

// NewToolWithScopes creates a ServerTool with OAuth scope requirements.
// This is like NewTool but also accepts required and accepted scopes.
func NewToolWithScopes[In, Out any](
//
// All tools must explicitly specify their OAuth scope requirements, even if empty (nil).
func NewTool[In, Out any](
toolset inventory.ToolsetMetadata,
tool mcp.Tool,
requiredScopes []string,
Expand All @@ -178,16 +171,9 @@ func NewToolWithScopes[In, Out any](
//
// The handler function receives deps extracted from context via MustDepsFromContext.
// Ensure ContextWithDeps is called to inject deps before any tool handlers are invoked.
func NewToolFromHandler(toolset inventory.ToolsetMetadata, tool mcp.Tool, handler func(ctx context.Context, deps ToolDependencies, req *mcp.CallToolRequest) (*mcp.CallToolResult, error)) inventory.ServerTool {
return inventory.NewServerToolWithRawContextHandler(tool, toolset, func(ctx context.Context, req *mcp.CallToolRequest) (*mcp.CallToolResult, error) {
deps := MustDepsFromContext(ctx)
return handler(ctx, deps, req)
})
}

// NewToolFromHandlerWithScopes creates a ServerTool with OAuth scope requirements.
// This is like NewToolFromHandler but also accepts required and accepted scopes.
func NewToolFromHandlerWithScopes(
//
// All tools must explicitly specify their OAuth scope requirements, even if empty (nil).
func NewToolFromHandler(
toolset inventory.ToolsetMetadata,
tool mcp.Tool,
requiredScopes []string,
Expand Down
8 changes: 4 additions & 4 deletions pkg/github/discussions.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func getQueryType(useOrdering bool, categoryID *githubv4.ID) any {
}

func ListDiscussions(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataDiscussions,
mcp.Tool{
Name: "list_discussions",
Expand Down Expand Up @@ -278,7 +278,7 @@ func ListDiscussions(t translations.TranslationHelperFunc) inventory.ServerTool
}

func GetDiscussion(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataDiscussions,
mcp.Tool{
Name: "get_discussion",
Expand Down Expand Up @@ -383,7 +383,7 @@ func GetDiscussion(t translations.TranslationHelperFunc) inventory.ServerTool {
}

func GetDiscussionComments(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataDiscussions,
mcp.Tool{
Name: "get_discussion_comments",
Expand Down Expand Up @@ -511,7 +511,7 @@ func GetDiscussionComments(t translations.TranslationHelperFunc) inventory.Serve
}

func ListDiscussionCategories(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataDiscussions,
mcp.Tool{
Name: "list_discussion_categories",
Expand Down
8 changes: 4 additions & 4 deletions pkg/github/gists.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

// ListGists creates a tool to list gists for a user
func ListGists(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataGists,
mcp.Tool{
Name: "list_gists",
Expand Down Expand Up @@ -107,7 +107,7 @@ func ListGists(t translations.TranslationHelperFunc) inventory.ServerTool {

// GetGist creates a tool to get the content of a gist
func GetGist(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataGists,
mcp.Tool{
Name: "get_gist",
Expand Down Expand Up @@ -166,7 +166,7 @@ func GetGist(t translations.TranslationHelperFunc) inventory.ServerTool {

// CreateGist creates a tool to create a new gist
func CreateGist(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataGists,
mcp.Tool{
Name: "create_gist",
Expand Down Expand Up @@ -270,7 +270,7 @@ func CreateGist(t translations.TranslationHelperFunc) inventory.ServerTool {

// UpdateGist creates a tool to edit an existing gist
func UpdateGist(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataGists,
mcp.Tool{
Name: "update_gist",
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type TreeResponse struct {

// GetRepositoryTree creates a tool to get the tree structure of a GitHub repository.
func GetRepositoryTree(t translations.TranslationHelperFunc) inventory.ServerTool {
return NewToolWithScopes(
return NewTool(
ToolsetMetadataGit,
mcp.Tool{
Name: "get_repository_tree",
Expand Down
Loading