MCPcopy Index your code
hub / github.com/codeaashu/claude-code / toolAlwaysAllowedRule

Function toolAlwaysAllowedRule

src/utils/permissions/permissions.ts:275–282  ·  view source on GitHub ↗
(
  context: ToolPermissionContext,
  tool: Pick<Tool, 'name' | 'mcpInfo'>,
)

Source from the content-addressed store, hash-verified

273 * For example, this finds "Bash" but not "Bash(prefix:*)" for BashTool
274 */
275export function toolAlwaysAllowedRule(
276 context: ToolPermissionContext,
277 tool: Pick<Tool, 'name' | 'mcpInfo'>,
278): PermissionRule | null {
279 return (
280 getAllowRules(context).find(rule => toolMatchesRule(tool, rule)) || null
281 )
282}
283
284/**
285 * Check if the tool is listed in the always deny rules

Callers 1

Calls 2

getAllowRulesFunction · 0.85
toolMatchesRuleFunction · 0.85

Tested by

no test coverage detected