Skip to main content
Glama

Generate Thread

generate_thread
Read-only

Create multi-post threads for X/Twitter or LinkedIn with numbered posts, transitions, hooks, content posts, and CTAs to distribute content effectively.

Instructions

Generate a multi-post thread for X/Twitter or LinkedIn. Creates numbered posts with transitions, including hook, content posts, and CTA finale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesThread topic
posts_countNoNumber of posts in the thread (3-10)
platformNoPlatform (linkedin or x)linkedin

Implementation Reference

  • The handler function for the generate_thread tool, which calls the generateThread helper and formats the thread output.
    async ({ topic, posts_count, platform }) => {
      const posts = generateThread(topic, posts_count, platform);
      const limits = PLATFORM_LIMITS[platform];
    
      const output = [
        `=== THREAD ${platform.toUpperCase()} (${posts.length} posts) ===`,
        `Sujet: ${topic}`,
        `Limite par post: ${limits?.maxChars || "?"} caracteres`,
        "",
      ];
    
      posts.forEach((post, i) => {
        output.push(`--- Post ${i + 1}/${posts.length} (${post.length} chars) ---`);
        output.push(post);
        output.push("");
    
        if (post.length > (limits?.maxChars || 3000)) {
          output.push(`ATTENTION: Ce post depasse la limite de ${limits?.maxChars} caracteres !`);
          output.push("");
        }
      });
    
      output.push(`--- Thread total: ${posts.length} posts ---`);
      output.push(`Identite: ${BRAND.identity}`);
    
      return {
        content: [{ type: "text" as const, text: output.join("\n") }],
      };
    },
  • src/index.ts:1064-1077 (registration)
    The registration of the generate_thread tool with its schema, title, description, and input parameters.
    server.registerTool(
      "generate_thread",
      {
        title: "Generate Thread",
        description:
          "Generate a multi-post thread for X/Twitter or LinkedIn. " +
          "Creates numbered posts with transitions, including hook, content posts, and CTA finale.",
        inputSchema: {
          topic: z.string().describe("Thread topic"),
          posts_count: z.number().min(3).max(10).default(5).describe("Number of posts in the thread (3-10)"),
          platform: z.enum(["linkedin", "x"]).default("linkedin").describe("Platform (linkedin or x)"),
        },
        annotations: { readOnlyHint: true, openWorldHint: false, destructiveHint: false },
      },
Behavior4/5

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

With readOnlyHint=true confirming safe text generation without side effects, the description adds valuable structural context about output format: numbered posts, transitions, hook/CTA structure. This behavioral detail about content organization supplements the annotations well. Does not contradict readOnlyHint status despite using 'Generate' (understood as text creation, not state mutation).

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?

Optimal two-sentence structure with zero redundancy. First sentence establishes platforms and general function; second sentence details output structure. Every phrase earns its place—platform alternatives, post numbering, transitions, and structural components (hook/CTA) are all front-loaded and essential.

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?

Given 100% schema coverage and readOnlyHint annotations, the description adequately explains output structure (numbered posts, transitions, CTA). Missing only explicit mention of return value format (string/text vs object), though this is reasonably inferred from 'Generate.' Appropriate scope for a 3-parameter generation tool without output schema.

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 coverage is 100%, establishing a baseline of 3. The description mentions platform support (X/Twitter/LinkedIn) and multi-post nature, but these merely echo the schema's existing enum values and parameter purposes. Does not add syntactic details, validation rationale (why 3-10 posts), or semantic guidance beyond what the schema already provides.

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?

Excellent specificity: 'Generate a multi-post thread' provides clear verb+resource, explicitly names target platforms (X/Twitter or LinkedIn), and distinguishes from sibling draft_post by emphasizing 'multi-post' structure. The additional detail about 'numbered posts with transitions, including hook, content posts, and CTA finale' precisely defines the output format.

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?

Provides implicit usage context by specifying 'multi-post thread' and platform options (linkedin/x), which suggests when to use this versus single-post tools. However, lacks explicit guidance contrasting with sibling draft_post or criteria for choosing between platforms. No 'when not to use' or explicit alternative recommendations provided.

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