get_crash_log
Retrieve crash log content from a TestFlight beta feedback submission by providing the crash submission ID.
Instructions
Download the crash log content for a specific beta feedback crash submission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crash_submission_id | Yes | The beta feedback crash submission ID |
Implementation Reference
- src/tools/get-crash-log.ts:11-17 (handler)The handler function that executes the get_crash_log tool logic. It receives the crash_submission_id from the validated args, calls the API helper, and returns the crash log content.
export async function handleGetCrashLog( client: AppStoreConnectClient, args: z.infer<typeof getCrashLogSchema> ) { const content = await getCrashLog(client, args.crash_submission_id); return { crashLog: content }; } - src/tools/get-crash-log.ts:5-9 (schema)Zod schema defining the input for get_crash_log. Takes a single required parameter: crash_submission_id (string).
export const getCrashLogSchema = z.object({ crash_submission_id: z .string() .describe("The beta feedback crash submission ID"), }); - src/index.ts:112-122 (registration)Registration of the 'get_crash_log' tool on the MCP server. Maps the tool name to the schema and handler, and returns the result as text content.
server.tool( "get_crash_log", "Download the crash log content for a specific beta feedback crash submission.", getCrashLogSchema.shape, async (args) => { const result = await handleGetCrashLog(client, args); return { content: [{ type: "text", text: result.crashLog }], }; } ); - src/api/feedback.ts:81-91 (helper)The API helper function that fetches the crash log content from the App Store Connect API. Calls the endpoint /betaFeedbackCrashSubmissions/{id}/relationships/crashLog and extracts the content attribute.
export async function getCrashLog( client: AppStoreConnectClient, crashSubmissionId: string ): Promise<string> { const response = await client.request<JsonApiResource>( `/betaFeedbackCrashSubmissions/${crashSubmissionId}/relationships/crashLog` ); // The crash log is returned as a resource with content attribute const attrs = response.data?.attributes as Record<string, unknown> | undefined; return (attrs?.content as string) ?? "No crash log content available."; }