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

Function isToolCanonicalInWorkflow

src/cli/commands/tools.ts:142–148  ·  view source on GitHub ↗

* Determine if a tool is canonical in a given workflow. * A tool is canonical if its module path matches the workflow ID.

(tool: ToolManifestEntry, workflowId: string)

Source from the content-addressed store, hash-verified

140 * A tool is canonical if its module path matches the workflow ID.
141 */
142function isToolCanonicalInWorkflow(tool: ToolManifestEntry, workflowId: string): boolean {
143 // Check if the module path contains the workflow ID
144 // e.g., "mcp/tools/simulator/build_sim" is canonical for "simulator"
145 const moduleParts = tool.module.split('/');
146 const workflowPart = moduleParts[2]; // mcp/tools/<workflow>/<tool>
147 return workflowPart === workflowId;
148}
149
150/**
151 * Get the canonical workflow for a tool based on its module path.

Callers 1

buildToolListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected