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

Function GetToolScopeInfo

pkg/scopes/map.go:42–48  ·  view source on GitHub ↗

GetToolScopeInfo returns scope information for a specific tool from the global scope map.

(toolName string)

Source from the content-addressed store, hash-verified

40
41// GetToolScopeInfo returns scope information for a specific tool from the global scope map.
42func GetToolScopeInfo(toolName string) (*ToolScopeInfo, error) {
43 m, err := GetToolScopeMap()
44 if err != nil {
45 return nil, err
46 }
47 return m[toolName], nil
48}
49
50// GetToolScopeMapFromInventory builds a tool scope map from an inventory.
51// This extracts scope information from ServerTool.RequiredScopes and ServerTool.AcceptedScopes.

Callers 2

WithScopeChallengeFunction · 0.92
TestGetToolScopeInfoFunction · 0.85

Calls 1

GetToolScopeMapFunction · 0.85

Tested by 1

TestGetToolScopeInfoFunction · 0.68