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

Function formatNextStepForMcp

src/utils/responses/next-step-formatting.ts:76–91  ·  view source on GitHub ↗
(step: NextStep)

Source from the content-addressed store, hash-verified

74}
75
76function formatNextStepForMcp(step: NextStep): string {
77 if (!step.tool) {
78 return resolveLabel(step);
79 }
80
81 const paramEntries = Object.entries(step.params ?? {});
82 if (paramEntries.length === 0) {
83 return `${step.tool}()`;
84 }
85
86 const paramsStr = paramEntries
87 .map(([key, value]) => `${key}: ${formatMcpValue(value)}`)
88 .join(', ');
89
90 return `${step.tool}({ ${paramsStr} })`;
91}
92
93export function formatNextStep(step: NextStep, options: FormatNextStepOptions): string {
94 const formatted =

Callers 1

formatNextStepFunction · 0.85

Calls 2

resolveLabelFunction · 0.85
formatMcpValueFunction · 0.85

Tested by

no test coverage detected