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

Function createDebugDetachResult

src/mcp/tools/debugging/debug_detach.ts:23–50  ·  view source on GitHub ↗
(params: {
  didError: boolean;
  error?: string;
  diagnosticMessage?: string;
  debugSessionId?: string;
})

Source from the content-addressed store, hash-verified

21type DebugDetachResult = DebugSessionActionDomainResult;
22
23function createDebugDetachResult(params: {
24 didError: boolean;
25 error?: string;
26 diagnosticMessage?: string;
27 debugSessionId?: string;
28}): DebugDetachResult {
29 return {
30 kind: 'debug-session-action',
31 didError: params.didError,
32 error: params.error ?? null,
33 ...(params.didError
34 ? {
35 diagnostics: createBasicDiagnostics({
36 errors: [params.diagnosticMessage ?? params.error ?? 'Unknown error'],
37 }),
38 }
39 : {}),
40 action: 'detach',
41 ...(params.debugSessionId
42 ? {
43 session: {
44 debugSessionId: params.debugSessionId,
45 connectionState: 'detached',
46 },
47 }
48 : {}),
49 };
50}
51
52function setStructuredOutput(ctx: ToolHandlerContext, result: DebugDetachResult): void {
53 ctx.structuredOutput = {

Callers 1

Calls 1

createBasicDiagnosticsFunction · 0.90

Tested by

no test coverage detected