Revert "Merge pull request #334 from m-paternostro/mp/notifier"

This reverts commit 3ef902328a, reversing
changes made to 5b6d35eb12.
This commit is contained in:
Justin Spahr-Summers 2025-04-22 11:35:49 +01:00
commit 21f492f531
No known key found for this signature in database

View file

@ -1,8 +1,8 @@
import express, { Request, Response } from 'express';
import { randomUUID } from 'node:crypto';
import { z } from 'zod';
import { McpServer } from '../../server/mcp.js';
import { StreamableHTTPServerTransport } from '../../server/streamableHttp.js';
import { z } from 'zod';
import { CallToolResult, GetPromptResult, isInitializeRequest, ReadResourceResult } from '../../types.js';
import { InMemoryEventStore } from '../shared/inMemoryEventStore.js';
@ -13,21 +13,6 @@ const getServer = () => {
version: '1.0.0',
}, { capabilities: { logging: {} } });
// Log the capability invocation details
server.onCapabilityChange((event) => {
switch (event.action) {
case 'invoked':
console.log(`${event.capabilityType} invocation ${event.invocationIndex}: '${event.capabilityName}' started`);
break;
case 'completed':
console.log(`${event.capabilityType} invocation ${event.invocationIndex}: '${event.capabilityName}' completed in ${event.durationMs}ms`);
break;
case 'error':
console.log(`${event.capabilityType} invocation ${event.invocationIndex}: '${event.capabilityName}' failed in ${event.durationMs}ms: ${event.error}`);
break;
}
});
// Register a simple tool that returns a greeting
server.tool(
'greet',