MCPcopy Create free account
hub / github.com/Noumena-Network/code / getDenyRuleForTool

Function getDenyRuleForTool

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

Source from the content-addressed store, hash-verified

289 * Check if the tool is listed in the always deny rules
290 */
291export function getDenyRuleForTool(
292 context: ToolPermissionContext,
293 tool: Pick<Tool, 'name' | 'mcpInfo'>,
294): PermissionRule | null {
295 return getDenyRules(context).find(rule => toolMatchesRule(tool, rule)) || null
296}
297
298/**
299 * 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