Skip to main content
Glama

generate_hooks

Create viral X (Twitter) thread hooks from any topic to boost engagement and visibility for social media content.

Instructions

Generate viral hooks for X (Twitter) threads based on a topic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesThe topic to generate hooks for

Implementation Reference

  • The handler logic for the 'generate_hooks' tool. It extracts the topic from arguments, uses predefined templates to generate viral hooks, stringifies them as JSON, and returns as text content.
    if (name === "generate_hooks") { const topic = String(args?.topic || ""); const templates = [ `Stop doing ${topic} the hard way. Here is the easy way... ๐Ÿงต`, `I spent 100 hours learning ${topic} so you don't have to. Here is what I found... ๐Ÿ‘‡`, `Most people get ${topic} wrong. Here is how to do it right...`, `The secret to ${topic} is not what you think. A thread ๐Ÿงต`, `If you want to master ${topic}, read this thread...`, `10 tools for ${topic} that feel illegal to know ๐Ÿคฏ`, `How to crush ${topic} in 2024 (Step-by-step guide)`, ]; return { content: [{ type: "text", text: JSON.stringify(templates, null, 2) }], }; }
  • src/index.ts:23-33 (registration)
    Registration of the 'generate_hooks' tool in the TOOLS array, including its name, description, and input schema. This is used by the ListTools handler.
    { name: "generate_hooks", description: "Generate viral hooks for X (Twitter) threads based on a topic.", inputSchema: { type: "object", properties: { topic: { type: "string", description: "The topic to generate hooks for" }, }, required: ["topic"], }, },
  • Input schema definition for the 'generate_hooks' tool, specifying the required 'topic' string parameter.
    inputSchema: { type: "object", properties: { topic: { type: "string", description: "The topic to generate hooks for" }, }, required: ["topic"], },

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/samusilv/growth-hacker-mcp'

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