GetToolScopeInfo returns scope information for a specific tool from the global scope map.
(toolName string)
| 40 | |
| 41 | // GetToolScopeInfo returns scope information for a specific tool from the global scope map. |
| 42 | func 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. |