Skip to main content
Glama
grzetich

AI Developer Tools MCP Server

by grzetich

get_tool_history

Retrieve historical adoption data and growth trends for AI developer tools to analyze usage patterns and inform tool selection decisions.

Instructions

Get historical adoption data and growth trends for a specific AI developer tool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYesTool ID to get history for
monthsNoNumber of months of history to return (3-12)

Implementation Reference

  • The main handler function that executes the get_tool_history tool. It processes input arguments, retrieves historical data from mock sources, calculates growth metrics, and generates a formatted markdown report with timelines, analysis, and current stats.
    async execute(args) {
      const { tool, months = 6 } = args;
    
      // Validate tool exists
      if (!TOOLS[tool]) {
        throw new Error(`Unknown tool: ${tool}`);
      }
    
      const toolInfo = TOOLS[tool];
      const history = HISTORICAL_DATA[tool];
      const currentMetrics = CURRENT_METRICS[tool];
    
      if (!history || history.length === 0) {
        return `No historical data available for ${toolInfo.name}`;
      }
    
      // Get the requested number of months (or all available if less)
      const dataPoints = history.slice(-months);
    
      // Calculate overall growth
      const firstMonth = dataPoints[0];
      const lastMonth = dataPoints[dataPoints.length - 1];
      const totalGrowth = calculateGrowth(lastMonth.downloads, firstMonth.downloads);
    
      // Format output
      let output = `📈 ${toolInfo.name} - Historical Adoption\n\n`;
    
      output += `**${toolInfo.description}**\n`;
      output += `Package: \`${toolInfo.package}\`\n`;
      output += `Category: ${toolInfo.category}\n\n`;
    
      // Timeline
      output += `**Download History (Monthly)**\n`;
      dataPoints.forEach(point => {
        const date = new Date(point.month + '-01');
        const monthStr = date.toLocaleDateString('en-US', { year: 'numeric', month: 'short' });
        output += `• ${monthStr}: ${formatNumber(point.downloads)}\n`;
      });
      output += '\n';
    
      // Growth analysis
      output += `**Growth Analysis**\n`;
      output += `• Period: ${formatDate(firstMonth.month)} to ${formatDate(lastMonth.month)}\n`;
      output += `• Total Growth: ${totalGrowth > 0 ? '+' : ''}${totalGrowth.toFixed(1)}%\n`;
      output += `• Growth Rate: ${(totalGrowth / months).toFixed(1)}% per month\n\n`;
    
      // Current metrics
      output += `**Current Metrics**\n`;
      output += `• Monthly Downloads: ${formatNumber(currentMetrics.npm_downloads_monthly)}\n`;
      output += `• GitHub Stars: ${formatNumber(currentMetrics.github_stars)}\n`;
      output += `• Community Activity: ${currentMetrics.stackoverflow_questions_30d} SO questions, ${currentMetrics.reddit_mentions_30d} Reddit mentions (30d)\n`;
    
      output += `\n_Last updated: ${currentMetrics.last_updated}_`;
    
      return output;
    }
  • Input schema defining parameters for the get_tool_history tool: a required 'tool' from a predefined enum and optional 'months' (default 6).
    inputSchema: {
      type: 'object',
      properties: {
        tool: {
          type: 'string',
          enum: ['openai', 'anthropic', 'cursor', 'copilot', 'langchain'],
          description: 'Tool ID to get history for'
        },
        months: {
          type: 'integer',
          minimum: 3,
          maximum: 12,
          default: 6,
          description: 'Number of months of history to return (3-12)'
        }
      },
      required: ['tool']
    },
  • src/index.js:65-70 (registration)
    Registration of the get_tool_history tool (as historyTool) in the central tools array used by the MCP server to handle list and call requests.
    const tools = [
      compareTool,
      trendingTool,
      historyTool,
      searchTool
    ];
  • Helper function to format numeric values (downloads, stars) into human-readable K/M notation for the tool output.
    function formatNumber(num) {
      if (num >= 1_000_000) {
        return `${(num / 1_000_000).toFixed(1)}M`;
      } else if (num >= 1_000) {
        return `${(num / 1_000).toFixed(0)}K`;
      }
      return num.toString();
    }
  • Helper function to format month strings into readable date labels (e.g., 'Jan 2024') for the history timeline.
    function formatDate(monthStr) {
      const date = new Date(monthStr + '-01');
      return date.toLocaleDateString('en-US', { year: 'numeric', month: 'short' });
    }

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/grzetich/ai-developer-tools-mcp'

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