mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-18 16:13:22 +02:00
* Updated architecture.md * Refactor / renamed all addXPrompt, addXTool, and addXResource functions to registerX... * Added the add tool
23 lines
493 B
TypeScript
23 lines
493 B
TypeScript
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
|
export const registerSimplePrompt = (server: McpServer) => {
|
|
server.registerPrompt(
|
|
"simple-prompt",
|
|
{
|
|
title: "Simple Prompt",
|
|
description: "A prompt with no arguments",
|
|
},
|
|
() => ({
|
|
messages: [
|
|
{
|
|
role: "user",
|
|
content: {
|
|
type: "text",
|
|
text: "This is a simple prompt without arguments.",
|
|
},
|
|
},
|
|
],
|
|
})
|
|
);
|
|
};
|