diff --git a/mcp-server/src/index.ts b/mcp-server/src/index.ts index 65fbf49..a473877 100644 --- a/mcp-server/src/index.ts +++ b/mcp-server/src/index.ts @@ -80,10 +80,7 @@ class PenpotMcpServer { * the internal registry for later execution. */ private registerTools(): void { - const toolInstances: Tool[] = [ - new HelloWorldTool(), - new ToolPrintText(this.connectedClients), - ]; + const toolInstances: Tool[] = [new HelloWorldTool(), new ToolPrintText(this.connectedClients)]; for (const tool of toolInstances) { this.tools.set(tool.definition.name, tool); @@ -150,9 +147,7 @@ class PenpotMcpServer { * streamable HTTP transport protocol. */ private async handleStreamableHttpRequest(req: any, res: any): Promise { - const { StreamableHTTPServerTransport } = await import( - "@modelcontextprotocol/sdk/server/streamableHttp.js" - ); + const { StreamableHTTPServerTransport } = await import("@modelcontextprotocol/sdk/server/streamableHttp.js"); const { randomUUID } = await import("node:crypto"); const { isInitializeRequest } = await import("@modelcontextprotocol/sdk/types.js"); @@ -321,9 +316,7 @@ async function main(): Promise { } else if (args[i] === "--help" || args[i] === "-h") { console.log("Usage: node dist/index.js [options]"); console.log("Options:"); - console.log( - " --port, -p Port number for the HTTP/SSE server (default: 4401)" - ); + console.log(" --port, -p Port number for the HTTP/SSE server (default: 4401)"); console.log(" --help, -h Show this help message"); process.exit(0); } diff --git a/mcp-server/src/interfaces/Tool.ts b/mcp-server/src/interfaces/Tool.ts index dcff4cb..d4bcb1e 100644 --- a/mcp-server/src/interfaces/Tool.ts +++ b/mcp-server/src/interfaces/Tool.ts @@ -130,10 +130,7 @@ export abstract class TypeSafeTool implements Tool { propertyNames.push(...Object.getOwnPropertyNames(prototype)); return propertyNames.filter( - (name) => - name !== "constructor" && - !name.startsWith("_") && - typeof (instance as any)[name] !== "function" + (name) => name !== "constructor" && !name.startsWith("_") && typeof (instance as any)[name] !== "function" ); } @@ -210,7 +207,5 @@ export abstract class TypeSafeTool implements Tool { * * @param args - The validated, strongly-typed arguments */ - protected abstract executeTypeSafe( - args: TArgs - ): Promise<{ content: Array<{ type: string; text: string }> }>; + protected abstract executeTypeSafe(args: TArgs): Promise<{ content: Array<{ type: string; text: string }> }>; } diff --git a/mcp-server/src/tools/HelloWorldTool.ts b/mcp-server/src/tools/HelloWorldTool.ts index 0de3bb1..d248971 100644 --- a/mcp-server/src/tools/HelloWorldTool.ts +++ b/mcp-server/src/tools/HelloWorldTool.ts @@ -41,9 +41,7 @@ export class HelloWorldTool extends TypeSafeTool { * * @param args - The validated HelloWorldArgs instance */ - protected async executeTypeSafe( - args: HelloWorldArgs - ): Promise<{ content: Array<{ type: string; text: string }> }> { + protected async executeTypeSafe(args: HelloWorldArgs): Promise<{ content: Array<{ type: string; text: string }> }> { return { content: [ { diff --git a/mcp-server/src/tools/ToolPrintText.ts b/mcp-server/src/tools/ToolPrintText.ts index d919990..9a45dcc 100644 --- a/mcp-server/src/tools/ToolPrintText.ts +++ b/mcp-server/src/tools/ToolPrintText.ts @@ -50,9 +50,7 @@ export class ToolPrintText extends TypeSafeTool { * * @param args - The validated PrintTextArgs instance */ - protected async executeTypeSafe( - args: PrintTextArgs - ): Promise<{ content: Array<{ type: string; text: string }> }> { + protected async executeTypeSafe(args: PrintTextArgs): Promise<{ content: Array<{ type: string; text: string }> }> { try { // Create the plugin task const taskParams = new PluginTaskPrintTextParams(args.text);