MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / consumeDynamicParams

Function consumeDynamicParams

src/runtime/tool-invoker.ts:88–105  ·  view source on GitHub ↗
(
  nextStepParams: NextStepParamsMap | undefined,
  toolId: string,
  consumedCounts: Map<string, number>,
)

Source from the content-addressed store, hash-verified

86}
87
88function consumeDynamicParams(
89 nextStepParams: NextStepParamsMap | undefined,
90 toolId: string,
91 consumedCounts: Map<string, number>,
92): NextStepParams | undefined {
93 const candidate = nextStepParams?.[toolId];
94 if (!candidate) {
95 return undefined;
96 }
97
98 if (Array.isArray(candidate)) {
99 const current = consumedCounts.get(toolId) ?? 0;
100 consumedCounts.set(toolId, current + 1);
101 return candidate[current];
102 }
103
104 return candidate;
105}
106
107function mergeTemplateAndResponseNextSteps(
108 templateSteps: BuiltTemplateNextStep[],

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected