Skip to main content
Glama

versionHistory

Retrieve app version history and release notes from app stores by providing the app's track ID and country code.

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

  • The main handler function that executes the versionHistory tool: validates input, builds URL, fetches and parses data, returns formatted JSON response or error.
    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, }; } }
  • Registration of the versionHistory tool in the ListToolsRequestSchema response, including name, description, and input schema.
    { 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'], }, },
  • Input schema definition for the versionHistory tool, specifying required 'id' parameter and optional 'country'.
    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'], },
  • Helper function to parse and normalize the raw version history data from the App Store API.
    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 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