This repository was archived by the owner on May 15, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { McpServerUse , McpServer , McpTool } from "@roo-code/types"
22
3- /**
4- * Checks if a tool name matches a pattern (supports wildcard "*")
5- * @param toolName The name of the tool to check
6- * @param pattern The pattern to match against (can be "*" for wildcard)
7- * @returns True if the tool name matches the pattern
8- */
9- function matchesPattern ( toolName : string , pattern : string ) : boolean {
10- if ( pattern === "*" ) {
11- return true
12- }
13- return toolName === pattern
14- }
15-
163export function isMcpToolAlwaysAllowed ( mcpServerUse : McpServerUse , mcpServers : McpServer [ ] | undefined ) : boolean {
174 if ( mcpServerUse . type === "use_mcp_tool" && mcpServerUse . toolName ) {
185 const server = mcpServers ?. find ( ( s : McpServer ) => s . name === mcpServerUse . serverName )
You can’t perform that action at this time.
0 commit comments