Skip to main content
Glama
sharozdawa

content-optimizer-mcp

check_readability

Analyze content readability by calculating Flesch-Kincaid scores, grade levels, sentence statistics, and reading time to optimize text clarity.

Instructions

Analyze content readability. Returns Flesch-Kincaid score, grade level, sentence stats, and reading time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe content to analyze

Implementation Reference

  • The implementation of the check_readability tool, including input schema definition, readability score calculation, and result construction.
    server.tool(
      "check_readability",
      "Analyze content readability. Returns Flesch-Kincaid score, grade level, sentence stats, and reading time.",
      {
        content: z.string().describe("The content to analyze"),
      },
      async ({ content }) => {
        const words = countWords(content);
        const sentences = countSentences(content);
        const paragraphs = content.split(/\n\n+/).filter((p) => p.trim().length > 0).length;
        const { score, gradeLevel } = fleschKincaidScore(content);
        const avgSentenceLength = words / sentences;
        const allWords = content.split(/\s+/).filter((w) => w.length > 0);
        const avgWordLength = allWords.reduce((sum, w) => sum + w.replace(/[^a-zA-Z]/g, "").length, 0) / Math.max(allWords.length, 1);
        const readingTime = Math.ceil(words / 250);
    
        let level: string;
        if (score >= 80) level = "Very Easy — suitable for 5th graders and above";
        else if (score >= 70) level = "Easy — conversational English";
        else if (score >= 60) level = "Standard — suitable for most web content";
        else if (score >= 50) level = "Fairly Difficult — may lose casual readers";
        else if (score >= 30) level = "Difficult — college-level reading";
        else level = "Very Difficult — academic or technical writing";
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                fleschKincaidScore: score,
                gradeLevel,
                readabilityLevel: level,
                avgSentenceLength: Math.round(avgSentenceLength * 10) / 10,
                avgWordLength: Math.round(avgWordLength * 10) / 10,
                wordCount: words,
                sentenceCount: sentences,
                paragraphCount: paragraphs,
                readingTime: `${readingTime} min`,
                suggestions: [
                  ...(avgSentenceLength > 20 ? ["Shorten sentences — aim for 15-20 words per sentence."] : []),
                  ...(score < 60 ? ["Use simpler vocabulary and shorter sentences to improve readability."] : []),
                  ...(gradeLevel > 10 ? [`Grade level ${gradeLevel} is high for web content. Target grade 8-10.`] : []),
                  ...(paragraphs < 3 ? ["Break content into more paragraphs (1-3 sentences each)."] : []),
                ],
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool returns but doesn't cover important aspects like whether it's a read-only operation, potential rate limits, authentication requirements, error conditions, or how it handles different content types/lengths. The description is minimal and lacks behavioral context.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that efficiently state the purpose and outputs. It's front-loaded with the core function and wastes no words, though it could be slightly more structured by separating purpose from output details.

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 (readability analysis with multiple metrics), no annotations, and no output schema, the description is minimally adequate. It specifies what metrics are returned but doesn't explain their meaning, units, or interpretation. For a tool with no structured output documentation, more detail about return values would be helpful.

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?

The input schema has 100% description coverage, with the single parameter 'content' clearly documented as 'The content to analyze'. The description doesn't add any parameter-specific information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

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: 'Analyze content readability' with specific outputs listed (Flesch-Kincaid score, grade level, sentence stats, reading time). It uses a specific verb ('Analyze') and resource ('content readability'), though it doesn't explicitly distinguish from sibling tools like 'score_content' which might have overlapping functionality.

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 sibling tools like 'score_content' or 'analyze_keyword', nor does it specify prerequisites, exclusions, or appropriate contexts for readability analysis versus other content evaluation tools.

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