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

Function buildCliToolCatalog

src/cli/cli-tool-catalog.ts:177–196  ·  view source on GitHub ↗
(opts: BuildCliToolCatalogOptions)

Source from the content-addressed store, hash-verified

175 * CLI visibility is determined by manifest availability and predicates.
176 */
177export async function buildCliToolCatalog(opts: BuildCliToolCatalogOptions): Promise<ToolCatalog> {
178 const manifestCatalog = await buildCliToolCatalogFromManifest();
179
180 if (!opts.cliExposedWorkflowIds.includes('xcode-ide')) {
181 return manifestCatalog;
182 }
183
184 const dynamicTools = await loadDaemonBackedXcodeProxyTools(opts);
185 if (dynamicTools.length === 0) {
186 return manifestCatalog;
187 }
188
189 const existingCliNames = new Set(manifestCatalog.tools.map((tool) => tool.cliName));
190 const mergedTools = [
191 ...manifestCatalog.tools,
192 ...dynamicTools.filter((tool) => !existingCliNames.has(tool.cliName)),
193 ];
194
195 return createToolCatalog(mergedTools);
196}

Callers 1

mainFunction · 0.90

Calls 3

createToolCatalogFunction · 0.90

Tested by

no test coverage detected