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

Function buildTemplateNextSteps

src/runtime/tool-invoker.ts:47–86  ·  view source on GitHub ↗
(
  tool: ToolDefinition,
  catalog: ToolCatalog,
)

Source from the content-addressed store, hash-verified

45}
46
47function buildTemplateNextSteps(
48 tool: ToolDefinition,
49 catalog: ToolCatalog,
50): BuiltTemplateNextStep[] {
51 if (!tool.nextStepTemplates || tool.nextStepTemplates.length === 0) {
52 return [];
53 }
54
55 const built: BuiltTemplateNextStep[] = [];
56 for (const template of tool.nextStepTemplates) {
57 if (!template.toolId) {
58 built.push({
59 step: {
60 label: template.label,
61 priority: template.priority,
62 when: template.when,
63 },
64 });
65 continue;
66 }
67
68 const target = catalog.getByToolId(template.toolId);
69 if (!target) {
70 continue;
71 }
72
73 built.push({
74 step: {
75 tool: target.mcpName,
76 label: template.label,
77 params: template.params ?? {},
78 priority: template.priority,
79 when: template.when,
80 },
81 templateToolId: template.toolId,
82 });
83 }
84
85 return built;
86}
87
88function consumeDynamicParams(
89 nextStepParams: NextStepParamsMap | undefined,

Callers 1

postProcessSessionFunction · 0.85

Calls 2

pushMethod · 0.80
getByToolIdMethod · 0.80

Tested by

no test coverage detected