#!/usr/bin/env node

/**
 * {{ description }}
 */

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({
  name: "{{ service_name }}_mcp",
  version: "0.1.0",
});

server.tool(
  "{{ tool_prefix }}_hello",
  "Say hello. Use this tool to greet someone by name.",
  {
    name: z.string().default("World").describe("The name to greet."),
  },
  async ({ name }) => {
    return {
      content: [
        {
          type: "text",
          text: `Hello, ${name}! Welcome to {{ service_name }}_mcp.`,
        },
      ],
    };
  }
);

async function main() {
  const transport = new StdioServerTransport();
  await server.connect(transport);
}

main().catch(console.error);
