Skip to main content
Glama
sharozdawa

content-optimizer-mcp

get_content_recommendations

Analyze content against a target keyword to generate prioritized optimization recommendations for better search visibility.

Instructions

Get a prioritized list of specific improvements to optimize content for a target keyword.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe content to analyze
keywordYesThe target keyword

Implementation Reference

  • The `get_content_recommendations` tool is registered and implemented within `mcp-server/src/index.ts`. It takes `content` and `keyword` as inputs, uses `scoreContent`, `analyzeSERP`, and `countWords` to evaluate the content, then generates and prioritizes a list of recommendations based on SERP benchmarks and content scores.
    server.tool(
      "get_content_recommendations",
      "Get a prioritized list of specific improvements to optimize content for a target keyword.",
      {
        content: z.string().describe("The content to analyze"),
        keyword: z.string().describe("The target keyword"),
      },
      async ({ content, keyword }) => {
        const { overallScore, categories, recommendations } = scoreContent(content, keyword);
        const serp = analyzeSERP(keyword);
        const words = countWords(content);
    
        const prioritized: { priority: "high" | "medium" | "low"; recommendation: string }[] = [];
    
        // High priority: low-scoring categories
        for (const [name, cat] of Object.entries(categories)) {
          const ratio = cat.score / cat.maxScore;
          if (ratio < 0.4) {
            prioritized.push({ priority: "high", recommendation: `[${name}] ${cat.details}` });
          }
        }
    
        // Word count gap
        if (words < serp.averages.recommendedWordCount * 0.7) {
          prioritized.push({
            priority: "high",
            recommendation: `Content is ${words} words. Top-ranking pages average ${serp.averages.wordCount} words. Aim for ${serp.averages.recommendedWordCount}+.`,
          });
        }
    
        // Add scored recommendations
        for (const rec of recommendations) {
          const isHigh = rec.toLowerCase().includes("keyword") && rec.toLowerCase().includes("first paragraph");
          prioritized.push({ priority: isHigh ? "high" : "medium", recommendation: rec });
        }
    
        // Missing topics
        const topics = getKeywordTopics(keyword);
        const contentLower = content.toLowerCase();
        const missing = topics.filter((t) => !contentLower.includes(t.toLowerCase()));
        if (missing.length > topics.length * 0.5) {
          prioritized.push({
            priority: "high",
            recommendation: `Missing ${missing.length}/${topics.length} key topics. Add sections on: ${missing.slice(0, 5).join(", ")}.`,
          });
        }
    
        // Deduplicate
        const seen = new Set<string>();
        const unique = prioritized.filter((r) => {
          if (seen.has(r.recommendation)) return false;
          seen.add(r.recommendation);
          return true;
        });
    
        // Sort by priority
        const order = { high: 0, medium: 1, low: 2 };
        unique.sort((a, b) => order[a.priority] - order[b.priority]);
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                overallScore,
                targetKeyword: keyword,
                recommendations: unique,
                serpBenchmark: {
                  avgWordCount: serp.averages.wordCount,
                  recommendedWordCount: serp.averages.recommendedWordCount,
                  avgHeadings: serp.averages.headingCount,
                },
              }, null, 2),
            },
          ],
        };
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. It mentions the tool returns a prioritized list of improvements, but does not disclose behavioral traits such as whether it's read-only, performance characteristics, or any limitations like content length constraints or rate limits.

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 is front-loaded with the core purpose, with no wasted words or unnecessary elaboration.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It explains the purpose but lacks behavioral context and output details, which are necessary for effective use by an AI agent.

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%, so the schema already documents both parameters ('content' and 'keyword'). The description adds no additional meaning beyond what the schema provides, such as format details or examples, meeting the baseline for high 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?

The description clearly states the tool's purpose with specific verbs ('get a prioritized list of specific improvements') and resource ('content'), and distinguishes it from siblings by focusing on optimization for a target keyword rather than analysis, readability, or other aspects.

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?

The description implies usage for optimizing content for a keyword, but does not explicitly state when to use this tool versus alternatives like 'analyze_keyword' or 'score_content', nor does it provide exclusions or prerequisites.

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/sharozdawa/content-optimizer'

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