MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / resolve

Function resolve

src/runtime/tool-catalog.ts:60–86  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

58 },
59
60 resolve(input: string): ToolResolution {
61 const normalized = input.toLowerCase().trim();
62
63 // Try exact CLI name match first
64 const exact = byCliName.get(normalized);
65 if (exact) {
66 return { tool: exact };
67 }
68
69 // Try kebab-case of MCP name (alias)
70 const mcpKebab = toKebabCase(normalized);
71 const aliasMatches = byMcpKebab.get(mcpKebab);
72 if (aliasMatches && aliasMatches.length === 1) {
73 return { tool: aliasMatches[0] };
74 }
75 if (aliasMatches && aliasMatches.length > 1) {
76 return { ambiguous: aliasMatches.map((t) => t.cliName) };
77 }
78
79 // Try matching by MCP name directly (for underscore-style names)
80 const byMcpDirect = tools.find((t) => t.mcpName.toLowerCase() === normalized);
81 if (byMcpDirect) {
82 return { tool: byMcpDirect };
83 }
84
85 return { notFound: true };
86 },
87 };
88}
89

Callers 15

checkExistingDaemonFunction · 0.85
listParentDirectoriesFunction · 0.85
resolveAxePathFromConfigFunction · 0.85
settleFunction · 0.85
defaultExecutorFunction · 0.85
logger.tsFile · 0.85
createTimeoutPromiseFunction · 0.85
finishFunction · 0.85
runWithTimeoutMethod · 0.85
waitForEventMethod · 0.85
checkPendingMethod · 0.85

Calls 2

toKebabCaseFunction · 0.90
getMethod · 0.80

Tested by 4

onCloseFunction · 0.68
waitForUnexpectedExitFunction · 0.68
listenFunction · 0.68
listenFunction · 0.68