Skip to main content
Glama

release-check-versions

Check current app versions across App Store and Google Play to monitor release status and ensure consistent deployment across platforms.

Instructions

Check latest versions from App Store/Google Play.

Input Schema

NameRequiredDescriptionDefault
appNoRegistered app slug
packageNameNoGoogle Play package name
bundleIdNoApp Store bundle ID
storeNoTarget store (default: both)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "app": { "description": "Registered app slug", "type": "string" }, "bundleId": { "description": "App Store bundle ID", "type": "string" }, "packageName": { "description": "Google Play package name", "type": "string" }, "store": { "description": "Target store (default: both)", "enum": [ "appStore", "googlePlay", "both" ], "type": "string" } }, "type": "object" }

Implementation Reference

  • Main handler function for the 'release-check-versions' tool. Resolves app identifiers, determines which stores to check, gathers skip messages if applicable, calls getLatestVersions helper, and returns formatted text response.
    export async function handleCheckLatestVersions(options: CheckVersionsOptions) { const { app, store } = options; let { packageName, bundleId } = options; const { store: selectedStore, includeAppStore, includeGooglePlay, } = getStoreTargets(store); console.error(`[MCP] πŸ” Checking latest versions (store: ${selectedStore})`); const resolved = appResolutionService.resolve({ slug: app, packageName, bundleId, }); if (!resolved.success) { return { content: [ { type: "text" as const, text: resolved.error.message, }, ], }; } const { slug, bundleId: resolvedBundleId, packageName: resolvedPackageName, hasAppStore, hasGooglePlay, } = resolved.data; bundleId = resolvedBundleId; packageName = resolvedPackageName; // Check latest versions (without prompt message since this is a dedicated check tool) console.error(`[MCP] App: ${slug}`); if (bundleId) console.error(`[MCP] App Store bundleId: ${bundleId}`); if (packageName) console.error(`[MCP] Google Play packageName: ${packageName}`); const skips: string[] = []; if (includeAppStore && !hasAppStore) { skips.push(`⏭️ Skipping App Store (not registered for App Store)`); } else if (includeAppStore && !bundleId) { skips.push(`⏭️ Skipping App Store (no bundleId provided)`); } if (includeGooglePlay && !hasGooglePlay) { skips.push(`⏭️ Skipping Google Play (not registered for Google Play)`); } else if (includeGooglePlay && !packageName) { skips.push(`⏭️ Skipping Google Play (no packageName provided)`); } const versionInfo = await getLatestVersions({ bundleId, includePrompt: false, store: selectedStore, packageName, hasAppStore, hasGooglePlay, }); console.error(`[MCP] βœ… Version check completed`); const contentLines = [...skips, ...versionInfo.messages]; return { content: [ { type: "text" as const, text: contentLines.join("\n"), }, ], }; }
  • Core helper function that performs the actual API calls to AppStoreService and GooglePlayService to retrieve the latest version information for the given app identifiers, handling skips and errors, and compiling messages and structured results.
    export async function getLatestVersions( input: LatestVersionsInput ): Promise<LatestVersionsResult> { const { store, bundleId, packageName, hasAppStore, hasGooglePlay, includePrompt = true, } = input; const { includeAppStore, includeGooglePlay } = getStoreTargets(store); const config = loadConfig(); const messages: string[] = []; messages.push(`\nπŸ“‹ Checking latest versions from stores...\n`); const result: LatestVersionsResult = { messages }; if (includeAppStore) { if (!hasAppStore) { const skipped = `⏭️ Skipping App Store (not registered for App Store)`; messages.push(skipped); result.appStore = { found: false, skipped }; } else if (!config.appStore) { const skipped = `⏭️ Skipping App Store (not configured in ~/.config/pabal-mcp/config.json)`; messages.push(skipped); result.appStore = { found: false, skipped }; } else if (!bundleId) { const skipped = `⏭️ Skipping App Store (no bundleId provided)`; messages.push(skipped); result.appStore = { found: false, skipped }; } else { const latest = await appStoreService.getLatestVersion(bundleId); if (!latest.found) { const errMsg = latest.error instanceof Error ? latest.error.message : (latest.error ?? ""); const msg = errMsg ? `🍎 App Store: Check failed - ${errMsg}` : `🍎 App Store: No version found (can create first version)`; messages.push(msg); result.appStore = { found: false, error: errMsg || undefined }; } else { const state = latest.state?.toUpperCase() || "UNKNOWN"; messages.push(`🍎 App Store: ${latest.versionString} (${state})`); result.appStore = { found: true, versionString: latest.versionString, state, }; } } } if (includeGooglePlay) { if (!hasGooglePlay) { const skipped = `⏭️ Skipping Google Play (not registered for Google Play)`; messages.push(skipped); result.googlePlay = { found: false, skipped }; } else if (!config.playStore) { const skipped = `⏭️ Skipping Google Play (not configured in ~/.config/pabal-mcp/config.json)`; messages.push(skipped); result.googlePlay = { found: false, skipped }; } else if (!packageName) { const skipped = `⏭️ Skipping Google Play (no packageName provided)`; messages.push(skipped); result.googlePlay = { found: false, skipped }; } else { const latest = await googlePlayService.getLatestProductionRelease(packageName); if (!latest.found) { const errMsg = latest.error instanceof Error ? latest.error.message : (latest.error ?? ""); const msg = errMsg ? `πŸ€– Google Play: Check failed - ${errMsg}` : `πŸ€– Google Play: No version found (can create first version)`; messages.push(msg); result.googlePlay = { found: false, error: errMsg || undefined }; } else { const versionName = latest.versionName || latest.releaseName || "N/A"; const status = latest.status?.toUpperCase() || "UNKNOWN"; messages.push( `πŸ€– Google Play: ${versionName} (versionCodes: ${latest.versionCodes.join( ", " )}, ${status})` ); result.googlePlay = { found: true, versionName, versionCodes: latest.versionCodes, status, releaseName: latest.releaseName, }; } } } if (includePrompt) { messages.push( `\nπŸ’‘ To create a new version, please provide the 'version' parameter.` ); messages.push(` Example: Call release-create tool with version="1.2.0".`); } return result; }
  • src/index.ts:284-297 (registration)
    Registers the 'release-check-versions' tool with the MCP server, including its name, description, input schema, handler function, and category.
    registerToolWithInfo( "release-check-versions", { description: "Check latest versions from App Store/Google Play.", inputSchema: z.object({ app: z.string().optional().describe("Registered app slug"), packageName: z.string().optional().describe("Google Play package name"), bundleId: z.string().optional().describe("App Store bundle ID"), store: storeSchema.describe("Target store (default: both)"), }), }, handleCheckLatestVersions, "Release Management" );
  • Zod input schema defining optional parameters: app slug, packageName, bundleId, and store (defaults to both). Used for input validation in the tool registration.
    inputSchema: z.object({ app: z.string().optional().describe("Registered app slug"), packageName: z.string().optional().describe("Google Play package name"), bundleId: z.string().optional().describe("App Store bundle ID"), store: storeSchema.describe("Target store (default: both)"), }),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quartz-labs-dev/pabal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server