Files
servers-modelcontextprotocol-1/src/everything/prompts/simple.ts
cliffhall 7b2ff6b064 [WIP] Refactor everything server to be more modular and use recommended APIs.
* Updated architecture.md

* Refactor/renamed static.ts to file.ts

* Refactor/renamed complex.ts to args.ts

* Refactor/renamed template.ts to templates.ts.

* In resource.ts,
  -  improved registerEmbeddedResourcePrompt to allow selection of blob or text resource type.

* In file.ts
  - refactor/renamed registerStaticResources to registerFileResources to highlight the fact that it is using files as resources.

* In args.ts
  - refactor/renamed registerComplexPrompt to registerArgumentsPrompt to highlight the fact that it is demonstrating prompt arguments.

* Updated inline documentation throughout
2025-12-06 15:48:39 -05:00

30 lines
656 B
TypeScript

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
/**
* Register a simple prompt with no arguments
* - Returns the fixed text of the prompt with no modifications
*
* @param server
*/
export const registerSimplePrompt = (server: McpServer) => {
// Register the prompt
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.",
},
},
],
})
);
};