Skip to main content
Glama

Analyze Post Performance

analyze_post_performance
Read-only

Analyze post text to predict engagement scores, assess hook and CTA strength, evaluate readability, and receive improvement suggestions for social media platforms.

Instructions

Analyze a post's text for predicted engagement. Returns estimated engagement score (0-100), hook strength, CTA strength, readability, and actionable improvement suggestions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe post text to analyze
platformYesTarget platform

Implementation Reference

  • Handler for the analyze_post_performance tool. It calls analyzeEngagement and formats the output.
      async ({ text, platform }) => {
        const analysis = analyzeEngagement(text, platform);
    
        const output = [
          `=== Analyse Post ${platform.toUpperCase()} ===`,
          "",
          `Score engagement estime: ${analysis.score}/100`,
          "",
          `Hook: ${analysis.hook_strength.toUpperCase()}`,
          `CTA: ${analysis.cta_strength.toUpperCase()}`,
          `Lisibilite: ${analysis.readability.toUpperCase()}`,
          "",
          `Longueur: ${text.length}/${PLATFORM_LIMITS[platform]?.maxChars || "?"} caracteres`,
          "",
          "--- Suggestions d'amelioration ---",
          ...analysis.suggestions.map((s) => `  - ${s}`),
          "",
          "--- Regles StressZero ---",
          ...BRAND.tone_rules.map((r) => `  - ${r}`),
        ].join("\n");
    
        return {
          content: [{ type: "text" as const, text: output }],
        };
      },
    );
  • src/index.ts:1021-1034 (registration)
    Registration of the analyze_post_performance tool.
    server.registerTool(
      "analyze_post_performance",
      {
        title: "Analyze Post Performance",
        description:
          "Analyze a post's text for predicted engagement. " +
          "Returns estimated engagement score (0-100), hook strength, CTA strength, " +
          "readability, and actionable improvement suggestions.",
        inputSchema: {
          text: z.string().describe("The post text to analyze"),
          platform: z.enum(["linkedin", "instagram", "x", "tiktok"]).describe("Target platform"),
        },
        annotations: { readOnlyHint: true, openWorldHint: false, destructiveHint: false },
      },
Behavior4/5

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

Adds substantial behavioral context beyond annotations: specifies exact return metrics (engagement score 0-100, hook strength, CTA strength, readability, suggestions). Annotations only indicate read-only safety; description explains what the analysis actually evaluates.

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?

Two sentences with zero waste: first states purpose, second details return values. Front-loaded and appropriately sized for a 2-parameter tool.

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

Completeness4/5

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

No output schema exists, but description compensates by detailing return structure (scores and suggestions). Adequate for a simple, read-only analysis tool with 2 well-documented parameters and clear safety annotations.

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 has 100% description coverage ('The post text to analyze', 'Target platform'). Description mentions 'post's text' aligning with the text parameter, but adds no additional semantic constraints, format details, or platform-specific behaviors beyond what the enum already provides. Baseline 3 appropriate for high schema coverage.

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

Purpose5/5

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

Clear specific verb ('Analyze') with resource ('post's text'/'engagement') and distinguishes from siblings—all siblings are content creation/management tools (draft_post, generate_carousel, schedule_content) while this is analytical/evaluative.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance, nor naming of alternatives. Usage is implied by the analysis focus (vs. creation focus of siblings), but lacks explicit guidance like 'use before posting to optimize' or 'use instead of generate_carousel when evaluating existing text'.

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/gomessoaresemmanuel-cpu/content-distribution-mcp'

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