Skip to content

Commit be5a449

Browse files
mattdhollowaySamMorrowDrums
authored andcommitted
fix project tools to add scope to newtool init
1 parent 099f995 commit be5a449

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/github/projects.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ Use this tool to list projects for a user or organization, or list project field
10901090
Required: []string{"method", "owner_type", "owner"},
10911091
},
10921092
},
1093+
[]scopes.Scope{scopes.ReadProject},
10931094
func(ctx context.Context, deps ToolDependencies, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) {
10941095
method, err := RequiredParam[string](args, "method")
10951096
if err != nil {
@@ -1184,6 +1185,7 @@ Use this tool to get details about individual projects, project fields, and proj
11841185
Required: []string{"method", "owner_type", "owner", "project_number"},
11851186
},
11861187
},
1188+
[]scopes.Scope{scopes.ReadProject},
11871189
func(ctx context.Context, deps ToolDependencies, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) {
11881190
method, err := RequiredParam[string](args, "method")
11891191
if err != nil {
@@ -1292,6 +1294,7 @@ func ProjectsWrite(t translations.TranslationHelperFunc) inventory.ServerTool {
12921294
Required: []string{"method", "owner_type", "owner", "project_number"},
12931295
},
12941296
},
1297+
[]scopes.Scope{scopes.Project},
12951298
func(ctx context.Context, deps ToolDependencies, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) {
12961299
method, err := RequiredParam[string](args, "method")
12971300
if err != nil {

0 commit comments

Comments
 (0)