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

Function sessionToToolResponse

src/utils/tool-registry.ts:47–70  ·  view source on GitHub ↗
(session: RenderSession)

Source from the content-addressed store, hash-verified

45}
46
47function sessionToToolResponse(session: RenderSession): ToolResponse {
48 const text = session.finalize();
49 const attachments = session.getAttachments();
50
51 const content: ToolResponse['content'] = [];
52 if (text) {
53 content.push({ type: 'text' as const, text });
54 }
55 for (const attachment of attachments) {
56 content.push({
57 type: 'image' as const,
58 data: attachment.data,
59 mimeType: attachment.mimeType,
60 });
61 }
62
63 const structuredContent = buildStructuredContent(session);
64
65 return {
66 content,
67 isError: session.isError() || undefined,
68 ...(structuredContent ? { structuredContent } : {}),
69 };
70}
71
72export interface RuntimeToolInfo {
73 enabledWorkflows: string[];

Callers 1

invokeRegisteredToolFunction · 0.85

Calls 5

buildStructuredContentFunction · 0.85
pushMethod · 0.80
finalizeMethod · 0.65
getAttachmentsMethod · 0.65
isErrorMethod · 0.65

Tested by

no test coverage detected