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

Function getToolNameForPermissionCheck

src/services/mcp/mcpStringUtils.ts:60–67  ·  view source on GitHub ↗
(tool: {
  name: string
  mcpInfo?: { serverName: string; toolName: string }
})

Source from the content-addressed store, hash-verified

58 * replacements that share the same display name. Falls back to `tool.name`.
59 */
60export function getToolNameForPermissionCheck(tool: {
61 name: string
62 mcpInfo?: { serverName: string; toolName: string }
63}): string {
64 return tool.mcpInfo
65 ? buildMcpToolName(tool.mcpInfo.serverName, tool.mcpInfo.toolName)
66 : tool.name
67}
68
69/*
70 * Extracts the display name from an MCP tool/command name

Callers 2

toolMatchesRuleFunction · 0.85
getRuleByContentsForToolFunction · 0.85

Calls 1

buildMcpToolNameFunction · 0.85

Tested by

no test coverage detected