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

Function getAskRuleForTool

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

Source from the content-addressed store, hash-verified

295 * Check if the tool is listed in the always ask rules
296 */
297export function getAskRuleForTool(
298 context: ToolPermissionContext,
299 tool: Pick<Tool, 'name' | 'mcpInfo'>,
300): PermissionRule | null {
301 return getAskRules(context).find(rule => toolMatchesRule(tool, rule)) || null
302}
303
304/**
305 * Check if a specific agent is denied via Agent(agentType) syntax.

Callers 2

Calls 2

getAskRulesFunction · 0.85
toolMatchesRuleFunction · 0.85

Tested by

no test coverage detected