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
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | The topic to generate hooks for |
Implementation Reference
- src/index.ts:69-83 (handler)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"], }, },
- src/index.ts:26-32 (schema)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"], },