Skip to main content
Glama
paladini

devutils-mcp-server

lorem_ipsum

Generate placeholder text for design mockups and content layouts. Specify paragraphs, sentences, or words with customizable counts to fill spaces during development.

Instructions

Generate Lorem Ipsum placeholder text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType of output: paragraphs, sentences, or wordsparagraphs
countNoNumber of paragraphs/sentences/words to generate

Implementation Reference

  • The handler implementation for the `lorem_ipsum` tool, which generates placeholder text based on requested type (paragraphs, sentences, or words) and count.
    async ({ type, count }) => {
      const loremWords = [
        "lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing",
        "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore",
        "et", "dolore", "magna", "aliqua", "enim", "ad", "minim", "veniam",
        "quis", "nostrud", "exercitation", "ullamco", "laboris", "nisi",
        "aliquip", "ex", "ea", "commodo", "consequat", "duis", "aute", "irure",
        "in", "reprehenderit", "voluptate", "velit", "esse", "cillum",
        "fugiat", "nulla", "pariatur", "excepteur", "sint", "occaecat",
        "cupidatat", "non", "proident", "sunt", "culpa", "qui", "officia",
        "deserunt", "mollit", "anim", "id", "est", "laborum", "at", "vero",
        "eos", "accusamus", "iusto", "odio", "dignissimos", "ducimus",
        "blanditiis", "praesentium", "voluptatum", "deleniti", "atque",
        "corrupti", "quos", "dolores", "quas", "molestias", "excepturi",
        "obcaecati", "cupiditate", "provident", "similique", "explicabo",
        "nemo", "ipsam", "voluptatem", "quia", "voluptas", "aspernatur",
        "aut", "odit", "fugit", "consequuntur", "magni",
      ];
    
      const randomWord = (i: number): string =>
        loremWords[(i * 7 + 13) % loremWords.length];
    
      const generateSentence = (idx: number): string => {
        const length = 8 + (idx % 7);
        const words = Array.from({ length }, (_, i) => randomWord(idx * 20 + i));
        words[0] = words[0].charAt(0).toUpperCase() + words[0].slice(1);
        return words.join(" ") + ".";
      };
    
      const generateParagraph = (idx: number): string => {
        const sentenceCount = 4 + (idx % 4);
        return Array.from({ length: sentenceCount }, (_, i) =>
          generateSentence(idx * 10 + i)
        ).join(" ");
      };
    
      let text: string;
      if (type === "words") {
        text = Array.from({ length: count }, (_, i) => randomWord(i)).join(" ");
      } else if (type === "sentences") {
        text = Array.from({ length: count }, (_, i) =>
          generateSentence(i)
        ).join(" ");
      } else {
        text = Array.from({ length: count }, (_, i) =>
          generateParagraph(i)
        ).join("\n\n");
      }
    
      return { content: [{ type: "text" as const, text }] };
    }
  • The registration of the `lorem_ipsum` tool using `server.tool` and schema definition for its inputs.
    // Lorem Ipsum generator
    server.tool(
      "lorem_ipsum",
      "Generate Lorem Ipsum placeholder text.",
      {
        type: z
          .enum(["paragraphs", "sentences", "words"])
          .default("paragraphs")
          .describe("Type of output: paragraphs, sentences, or words"),
        count: z
          .number()
          .int()
          .min(1)
          .max(50)
          .default(3)
          .describe("Number of paragraphs/sentences/words to generate"),
      },

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/paladini/devutils-mcp-server'

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