UNPKG

firebase-tools

Version:
34 lines (33 loc) 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.get_issue_details = void 0; const zod_1 = require("zod"); const tool_1 = require("../../tool"); const util_1 = require("../../util"); const getIssueDetails_1 = require("../../../crashlytics/getIssueDetails"); exports.get_issue_details = (0, tool_1.tool)({ name: "get_issue_details", description: "Gets the details about a specific crashlytics issue.", inputSchema: zod_1.z.object({ app_id: zod_1.z .string() .describe("The AppID for which the issues list should be fetched. For an Android application, read the mobilesdk_app_id value specified in the google-services.json file for the current package name. For an iOS Application, read the GOOGLE_APP_ID from GoogleService-Info.plist. If neither is available, use the `firebase_list_apps` tool to find an app_id to pass to this tool."), issue_id: zod_1.z .string() .describe("The issue ID for which the details needs to be fetched. This is the value of the field `id` in the list of issues. Defaults to the first id in the list of issues."), }), annotations: { title: "Gets the details of a specific issue.", readOnlyHint: true, }, _meta: { requiresAuth: true, requiresProject: false, }, }, async ({ app_id, issue_id }) => { if (!app_id) return (0, util_1.mcpError)(`Must specify 'app_id' parameter.`); if (!issue_id) return (0, util_1.mcpError)(`Must specify 'issue_id' parameter.`); return (0, util_1.toContent)(await (0, getIssueDetails_1.getIssueDetails)(app_id, issue_id)); });