Skip to main content
Glama
wspotter

MCP Art Supply Store

by wspotter

analyze_post_performance

Analyze individual social media post performance to identify which content resonates best with your audience and compare results to account averages.

Instructions

Analyze individual post performance with insights on what content performs best.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compareToAverageNoCompare to account average (default: true)
postIdYesFacebook or Instagram post ID

Implementation Reference

  • src/index.ts:475-486 (registration)
    Registration of the 'analyze_post_performance' tool including name, description, and input schema definition.
    {
      name: 'analyze_post_performance',
      description: 'Analyze individual post performance with insights on what content performs best.',
      inputSchema: {
        type: 'object',
        properties: {
          postId: { type: 'string', description: 'Facebook or Instagram post ID' },
          compareToAverage: { type: 'boolean', description: 'Compare to account average (default: true)' },
        },
        required: ['postId'],
      },
    },
  • Handler implementation for 'analyze_post_performance' tool. Validates input, generates mock performance metrics for the given post ID, compares to account average if requested, and returns formatted analysis insights.
    case 'analyze_post_performance': {
      const postId = String(args?.postId || '');
      const compareToAverage = Boolean(args?.compareToAverage ?? true);
      
      if (!postId) {
        return {
          content: [{
            type: 'text',
            text: `āŒ Please provide a post ID to analyze.`
          }]
        };
      }
    
      // Mock analysis (real implementation would call Meta Graph API)
      const mockAnalysis = {
        postId,
        reach: 2340,
        impressions: 3120,
        engagement: 187,
        likes: 156,
        comments: 23,
        shares: 8,
        engagementRate: 8.0,
        accountAverage: {
          reach: 1850,
          engagementRate: 5.5
        }
      };
    
      const performance = mockAnalysis.engagementRate > mockAnalysis.accountAverage.engagementRate ? 'šŸ“ˆ Above' : 'šŸ“‰ Below';
    
      return {
        content: [{
          type: 'text',
          text: `šŸ“Š Post Performance Analysis\nšŸ†” Post ID: ${postId}\n\nšŸ“ˆ Metrics:\n  šŸ‘„ Reach: ${mockAnalysis.reach.toLocaleString()}\n  šŸ‘ļø Impressions: ${mockAnalysis.impressions.toLocaleString()}\n  šŸ’¬ Engagement: ${mockAnalysis.engagement} (${mockAnalysis.engagementRate}%)\n  ā¤ļø Likes: ${mockAnalysis.likes}\n  šŸ’¬ Comments: ${mockAnalysis.comments}\n  šŸ”„ Shares: ${mockAnalysis.shares}\n\n${compareToAverage ? `šŸ“Š vs Account Average:\n  ${performance} average (${mockAnalysis.engagementRate}% vs ${mockAnalysis.accountAverage.engagementRate}%)\n  Reach ${mockAnalysis.reach > mockAnalysis.accountAverage.reach ? '+' : ''}${((mockAnalysis.reach / mockAnalysis.accountAverage.reach - 1) * 100).toFixed(1)}%\n\n` : ''}šŸ’” Insight: ${mockAnalysis.engagementRate > 7 ? 'Great post! Create more content like this.' : 'Try experimenting with different content types or posting times.'}`
        }]
      };
    }
  • Input schema definition for the 'analyze_post_performance' tool, specifying postId as required string and optional compareToAverage boolean.
    inputSchema: {
      type: 'object',
      properties: {
        postId: { type: 'string', description: 'Facebook or Instagram post ID' },
        compareToAverage: { type: 'boolean', description: 'Compare to account average (default: true)' },
      },
      required: ['postId'],
  • src/dashboard.ts:82-82 (registration)
    Mock registration of the tool in the dashboard for display purposes.
    { name: 'analyze_post_performance', description: 'Analyze individual posts', category: 'Social Media Management' },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'insights on what content performs best', which hints at analytical output, but fails to describe key behaviors: whether it's read-only or mutative, what data sources it uses (e.g., Facebook/Instagram as per schema), response format, or any limitations like rate limits or authentication needs. This leaves significant gaps for an agent to understand how to invoke it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse. Every part of the sentence contributes to understanding, with no wasted verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of analyzing social media performance, the description is incomplete. No annotations are provided to clarify safety or behavior, and there is no output schema to describe return values. The description lacks details on what 'insights' entail, how results are structured, or any contextual constraints. This makes it inadequate for an agent to fully grasp the tool's operation and output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear documentation for both parameters: 'postId' as a Facebook or Instagram post ID and 'compareToAverage' as a boolean for comparing to account average. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or usage tips. Baseline score of 3 is appropriate since the schema adequately covers parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as analyzing individual post performance with insights on content performance. It specifies the verb 'analyze' and resource 'individual post performance', making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_social_analytics' or 'track_competitor_activity', which might also involve performance analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for analysis, or compare it to sibling tools such as 'get_social_analytics' or 'generate_post_ideas' that might overlap in functionality. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/wspotter/mcpart'

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