MCPcopy
hub / github.com/codeaashu/claude-code / getDenyRuleForTool

Function getDenyRuleForTool

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

Source from the content-addressed store, hash-verified

285 * Check if the tool is listed in the always deny rules
286 */
287export function getDenyRuleForTool(
288 context: ToolPermissionContext,
289 tool: Pick<Tool, 'name' | 'mcpInfo'>,
290): PermissionRule | null {
291 return getDenyRules(context).find(rule => toolMatchesRule(tool, rule)) || null
292}
293
294/**
295 * Check if the tool is listed in the always ask rules

Callers 3

filterToolsByDenyRulesFunction · 0.85

Calls 2

getDenyRulesFunction · 0.85
toolMatchesRuleFunction · 0.85

Tested by

no test coverage detected