Skip to main content
Glama
LassiterJ
by LassiterJ
index.ts.ejs.t1.53 kB
--- to: src/prompts/<%= name %>.ts --- /** * @module Prompts/<%= h.changeCase.pascalCase(name) %> * @category Prompts */ import { z } from "zod"; import type { RegisterableModule } from "../registry/types.js"; import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; /** * Schema for <%= name %> prompt arguments * @internal */ const <%= h.changeCase.camelCase(name) %>Schema = { topic: z.string().min(1).describe("Topic to generate content about"), } as const; /** * <%= description %> * * @example * ```typescript * // Usage in MCP client * const prompt = await client.getPrompt("<%= name %>", { * topic: "example topic" * }); * ``` */ const <%= h.changeCase.camelCase(name) %>Module: RegisterableModule = { type: "prompt", name: "<%= name %>", description: "<%= description %>", register(server: McpServer) { server.registerPrompt( "<%= name %>", { title: "<%= h.changeCase.titleCase(name.replace(/-/g, ' ')) %>", description: "<%= description %>", argsSchema: <%= h.changeCase.camelCase(name) %>Schema, }, ({ topic }) => { return { messages: [ { role: "user", content: { type: "text", text: `<%= description %> Topic: ${topic} Please provide a comprehensive response about the topic above.`, }, }, ], }; } ); } }; export default <%= h.changeCase.camelCase(name) %>Module;

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/LassiterJ/mcp-playground'

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