Skip to main content
Glama

versionHistory

Retrieve app version history and release notes from app stores using the app's unique identifier.

Instructions

Get app version history with release notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesiTunes trackId of the app
countryNoTwo-letter country code (default: us)us

Implementation Reference

  • Main handler function that fetches the version history URL using buildVersionHistoryUrl, parses the data with parseVersionHistory, and returns the formatted JSON response.
    /** * VersionHistory tool - Get app version history */ async function handleVersionHistory(args) { try { const { id, country = 'us' } = args; if (!id) { throw new Error('id is required'); } const url = buildVersionHistoryUrl({ id, country }); const data = await fetchJSON(url); const history = parseVersionHistory(data); return { content: [ { type: 'text', text: JSON.stringify({ id, versionHistory: history, count: history.length, }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ error: error.message }, null, 2), }, ], isError: true, }; } }
  • Input schema definition for the versionHistory tool, specifying required 'id' parameter and optional 'country'.
    { name: 'versionHistory', description: 'Get app version history with release notes', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'iTunes trackId of the app', }, country: { type: 'string', description: 'Two-letter country code (default: us)', default: 'us', }, }, required: ['id'], }, },
  • Dispatch registration in the CallToolRequestSchema handler switch statement that routes calls to handleVersionHistory.
    case 'versionHistory': return await handleVersionHistory(args);
  • Helper function to parse raw version history data from the API response into a normalized array of version objects.
    export function parseVersionHistory(data) { if (!data || !Array.isArray(data)) { return []; } return data.map(version => ({ versionDisplay: version.versionDisplay || version.version || null, releaseNotes: version.releaseNotes || null, releaseDate: version.releaseDate || null, releaseTimestamp: version.releaseTimestamp || null, })); }
  • Helper function to construct the iTunes App Store version history API URL.
    export function buildVersionHistoryUrl(params) { const { id, country = 'us' } = params; if (!id) { throw new Error('id must be provided for version history'); } return `${ITUNES_BASE}/us/app-version-history/${id}.json`; }

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/MiguelAlvRed/mobile-store-scraper-mcp'

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