get_feedback_detail
Retrieve comprehensive details for a TestFlight feedback submission, including device information, tester details, screenshot assets, or crash log references.
Instructions
Get detailed information about a specific feedback submission, including device info, tester details, screenshot asset, or crash log reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| submission_id | Yes | The feedback submission ID | |
| type | Yes | Type of feedback submission |
Implementation Reference
- Zod schema defining the input for get_feedback_detail: requires submission_id (string) and type (enum: 'screenshot' | 'crash').
export const getFeedbackDetailSchema = z.object({ submission_id: z.string().describe("The feedback submission ID"), type: z .enum(["screenshot", "crash"]) .describe("Type of feedback submission"), }); - src/tools/get-feedback-detail.ts:12-94 (handler)Handler function that fetches a feedback detail from App Store Connect API, resolves included betaTester and build relationships, and returns a structured response with device info, tester details, screenshot asset, or crash log reference.
export async function handleGetFeedbackDetail( client: AppStoreConnectClient, args: z.infer<typeof getFeedbackDetailSchema> ) { const endpoint = args.type === "screenshot" ? `/betaFeedbackScreenshotSubmissions/${args.submission_id}` : `/betaFeedbackCrashSubmissions/${args.submission_id}`; const response = await client.request<JsonApiResource>(endpoint, { include: "betaTester,build", "fields[betaTesters]": "firstName,lastName,email", "fields[builds]": "version,uploadedDate", }); const data = response.data; const included = response.included ?? []; const attrs = data.attributes as Record<string, unknown>; const testerRef = data.relationships?.betaTester?.data; const buildRef = data.relationships?.build?.data; const tester = testerRef && !Array.isArray(testerRef) ? included.find((r) => r.type === "betaTesters" && r.id === testerRef.id) : null; const build = buildRef && !Array.isArray(buildRef) ? included.find((r) => r.type === "builds" && r.id === buildRef.id) : null; const testerAttrs = tester?.attributes as | { firstName?: string; lastName?: string; email?: string } | undefined; const buildAttrs = build?.attributes as | { version?: string; uploadedDate?: string } | undefined; return { id: data.id, type: args.type, timestamp: attrs.timestamp, comment: attrs.comment ?? null, tester: testerAttrs ? { name: `${testerAttrs.firstName ?? ""} ${testerAttrs.lastName ?? ""}`.trim(), email: testerAttrs.email, } : null, build: buildAttrs ? { version: buildAttrs.version, uploadedDate: buildAttrs.uploadedDate, } : null, device: { model: attrs.deviceModel, osVersion: attrs.osVersion, locale: attrs.locale, carrier: attrs.carrier, timezone: attrs.timezone, architecture: attrs.architecture, connectionStatus: attrs.connectionStatus, batteryPercentage: attrs.batteryPercentage, appUptime: attrs.appUptime, screenResolution: attrs.screenWidth != null ? `${attrs.screenWidth}x${attrs.screenHeight}` : null, diskSpaceFree: attrs.diskSpaceFree, }, screenshot: args.type === "screenshot" && attrs.screenshotAsset ? attrs.screenshotAsset : null, crashLog: args.type === "crash" ? { url: `https://api.appstoreconnect.apple.com/v1/betaFeedbackCrashSubmissions/${data.id}/relationships/crashLog`, } : null, }; } - src/index.ts:100-110 (registration)Registration of the 'get_feedback_detail' tool with the MCP server, wiring the schema and handler together.
server.tool( "get_feedback_detail", "Get detailed information about a specific feedback submission, including device info, tester details, screenshot asset, or crash log reference.", getFeedbackDetailSchema.shape, async (args) => { const result = await handleGetFeedbackDetail(client, args); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } ); - src/tools/get-feedback-detail.ts:1-3 (helper)Imports for the file: zod for validation, AppStoreConnectClient type, and JsonApiResource type.
import { z } from "zod"; import type { AppStoreConnectClient } from "../api/client.js"; import type { JsonApiResource } from "../api/types.js";