@@ -4,6 +4,8 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
4
4
import { VERSION } from "./common/version.js" ;
5
5
import {
6
6
CallToolRequestSchema ,
7
+ GetPromptRequestSchema ,
8
+ ListPromptsRequestSchema ,
7
9
ListToolsRequestSchema ,
8
10
} from "@modelcontextprotocol/sdk/types.js" ;
9
11
import { zodToJsonSchema } from "zod-to-json-schema" ;
@@ -25,10 +27,79 @@ const server = new Server(
25
27
{
26
28
capabilities : {
27
29
tools : { } ,
30
+ prompts : { } ,
28
31
} ,
29
32
} ,
30
33
) ;
31
34
35
+ enum PromptName {
36
+ LIST_MEETINGS = "list_meetings" ,
37
+ CREATE_A_MEETING = "create_meeting" ,
38
+ DELETE_A_MEETING = "delete_a_meeting" ,
39
+ }
40
+
41
+ server . setRequestHandler ( ListPromptsRequestSchema , async ( ) => {
42
+ return {
43
+ prompts : [
44
+ {
45
+ name : PromptName . LIST_MEETINGS ,
46
+ description : "A prompt to list meetings" ,
47
+ } ,
48
+ {
49
+ name : PromptName . CREATE_A_MEETING ,
50
+ description : "A prompt to create a meeting" ,
51
+ } ,
52
+ {
53
+ name : PromptName . DELETE_A_MEETING ,
54
+ description : "A prompt to delete a meeting" ,
55
+ } ,
56
+ ] ,
57
+ } ;
58
+ } ) ;
59
+
60
+ server . setRequestHandler ( GetPromptRequestSchema , async ( request ) => {
61
+ const { name, arguments : args } = request . params ;
62
+
63
+ if ( name === PromptName . LIST_MEETINGS ) {
64
+ return {
65
+ messages : [
66
+ {
67
+ role : "user" ,
68
+ content : {
69
+ type : "text" ,
70
+ text : "List my zoom meetings" ,
71
+ } ,
72
+ } ,
73
+ ] ,
74
+ } ;
75
+ } else if ( name === PromptName . CREATE_A_MEETING ) {
76
+ return {
77
+ messages : [
78
+ {
79
+ role : "user" ,
80
+ content : {
81
+ type : "text" ,
82
+ text : "Create a zoom meeting" ,
83
+ } ,
84
+ } ,
85
+ ] ,
86
+ } ;
87
+ } else if ( name === PromptName . DELETE_A_MEETING ) {
88
+ return {
89
+ messages : [
90
+ {
91
+ role : "user" ,
92
+ content : {
93
+ type : "text" ,
94
+ text : "Delete a zoom meeting" ,
95
+ } ,
96
+ } ,
97
+ ] ,
98
+ } ;
99
+ }
100
+ throw new Error ( `Unknown prompt: ${ name } ` ) ;
101
+ } ) ;
102
+
32
103
server . setRequestHandler ( ListToolsRequestSchema , async ( ) => {
33
104
return {
34
105
tools : [
0 commit comments