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

Function createDebugStackResult

src/mcp/tools/debugging/debug_stack.ts:29–48  ·  view source on GitHub ↗
(params: {
  didError: boolean;
  error?: string;
  diagnosticMessage?: string;
  threads?: DebugThread[];
})

Source from the content-addressed store, hash-verified

27type DebugStackResult = DebugStackResultDomainResult;
28
29function createDebugStackResult(params: {
30 didError: boolean;
31 error?: string;
32 diagnosticMessage?: string;
33 threads?: DebugThread[];
34}): DebugStackResult {
35 return {
36 kind: 'debug-stack-result',
37 didError: params.didError,
38 error: params.error ?? null,
39 ...(params.didError
40 ? {
41 diagnostics: createBasicDiagnostics({
42 errors: [params.diagnosticMessage ?? params.error ?? 'Unknown error'],
43 }),
44 }
45 : {}),
46 ...(params.threads ? { threads: params.threads } : {}),
47 };
48}
49
50function setStructuredOutput(ctx: ToolHandlerContext, result: DebugStackResult): void {
51 ctx.structuredOutput = {

Callers 1

createDebugStackExecutorFunction · 0.85

Calls 1

createBasicDiagnosticsFunction · 0.90

Tested by

no test coverage detected