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

Function filterToolsByDenyRules

src/tools.ts:262–269  ·  view source on GitHub ↗
(tools: readonly T[], permissionContext: ToolPermissionContext)

Source from the content-addressed store, hash-verified

260 * before the model sees them — not just at call time.
261 */
262export function filterToolsByDenyRules<
263 T extends {
264 name: string
265 mcpInfo?: { serverName: string; toolName: string }
266 },
267>(tools: readonly T[], permissionContext: ToolPermissionContext): T[] {
268 return tools.filter(tool => !getDenyRuleForTool(permissionContext, tool))
269}
270
271export const getTools = (permissionContext: ToolPermissionContext): Tools => {
272 // Simple mode: only Bash, Read, and Edit tools

Callers 3

getToolsFunction · 0.85
assembleToolPoolFunction · 0.85
runHeadlessFunction · 0.85

Calls 1

getDenyRuleForToolFunction · 0.85

Tested by

no test coverage detected