@@ -3,10 +3,10 @@ import { Hono } from "hono";
33import {
44 muppet ,
55 describeTool ,
6- staticResource ,
7- dynamicResource ,
6+ // staticResource,
7+ // dynamicResource,
88 describePrompt ,
9- validator ,
9+ mValidator ,
1010} from "muppet" ;
1111import z from "zod" ;
1212import pino from "pino" ;
@@ -15,13 +15,12 @@ const app = new Hono();
1515
1616// Define a simple hello world tool
1717app . post (
18- "/" ,
18+ "/hello " ,
1919 describeTool ( {
2020 name : "Hello World" ,
2121 description : "A simple hello world route" ,
2222 } ) ,
23- validator (
24- "json" ,
23+ mValidator (
2524 z . object ( {
2625 name : z . string ( ) ,
2726 } ) ,
@@ -40,40 +39,39 @@ app.post(
4039) ;
4140
4241// Define static resources
43- app . post (
44- "/static/*" ,
45- staticResource ( {
46- name : "Static Resource" ,
47- description : "A static resource" ,
48- resource : {
49- path : "E:/dev/muppet/muppet/examples/mcp-sdk/dist/static" ,
50- } ,
51- } ) ,
52- ) ;
42+ // app.post(
43+ // "/static/*",
44+ // staticResource({
45+ // name: "Static Resource",
46+ // description: "A static resource",
47+ // resource: {
48+ // path: "E:/dev/muppet/muppet/examples/mcp-sdk/dist/static",
49+ // },
50+ // }),
51+ // );
5352
54- // Define Dynamic resources
55- app . post (
56- "/dynamic/*" ,
57- dynamicResource ( {
58- name : "Dynamic Resource" ,
59- description : "A dynamic resource" ,
60- } ) ,
61- ( c ) => {
62- return c . json ( [
63- {
64- uri : "file:///logs/app.log" ,
65- name : "Application Logs" ,
66- mimeType : "text/plain" ,
67- } ,
68- ] ) ;
69- } ,
70- ) ;
53+ // // Define Dynamic resources
54+ // app.post(
55+ // "/dynamic/*",
56+ // dynamicResource({
57+ // name: "Dynamic Resource",
58+ // description: "A dynamic resource",
59+ // }),
60+ // (c) => {
61+ // return c.json([
62+ // {
63+ // uri: "file:///logs/app.log",
64+ // name: "Application Logs",
65+ // mimeType: "text/plain",
66+ // },
67+ // ]);
68+ // },
69+ // );
7170
7271// Define a simple prompt
7372app . post (
74- "/propmt" ,
75- validator (
76- "json" ,
73+ "/simple" ,
74+ mValidator (
7775 z . object ( {
7876 name : z . string ( ) ,
7977 } ) ,
@@ -101,7 +99,7 @@ muppet(app, {
10199 transport : new StdioServerTransport ( ) ,
102100 logger : {
103101 stream : pino . destination (
104- "~ /dev/muppet-dev/muppet/examples/mcp-sdk/dist/main.log" ,
102+ "/Users/adityamathur /dev/muppet-dev/muppet/examples/mcp-sdk/dist/main.log" ,
105103 ) ,
106104 } ,
107105} ) ;
0 commit comments