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

Function emitNextStepsHandler

src/runtime/__tests__/tool-invoker.test.ts:159–169  ·  view source on GitHub ↗
(
  text: string,
  nextSteps: ToolResponse['nextSteps'],
  nextStepParams?: ToolResponse['nextStepParams'],
)

Source from the content-addressed store, hash-verified

157}
158
159function emitNextStepsHandler(
160 text: string,
161 nextSteps: ToolResponse['nextSteps'],
162 nextStepParams?: ToolResponse['nextStepParams'],
163): ToolDefinition['handler'] {
164 return vi.fn(async (_params, ctx) => {
165 ctx.structuredOutput = structuredTextOutput(text);
166 if (nextSteps) ctx.nextSteps = nextSteps;
167 if (nextStepParams) ctx.nextStepParams = nextStepParams;
168 });
169}
170
171function emitErrorEventsHandler(events: AnyFragment[]): ToolDefinition['handler'] {
172 return vi.fn(async (_params, ctx) => {

Callers 1

Calls 1

structuredTextOutputFunction · 0.85

Tested by

no test coverage detected