Skip to content

Commit 21f492f

Browse files
committed
Revert "Merge pull request #334 from m-paternostro/mp/notifier"
This reverts commit 3ef9023, reversing changes made to 5b6d35e.
1 parent 66884e1 commit 21f492f

File tree

6 files changed

+61
-1701
lines changed

6 files changed

+61
-1701
lines changed

src/examples/server/simpleStreamableHttp.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import express, { Request, Response } from 'express';
22
import { randomUUID } from 'node:crypto';
3+
import { z } from 'zod';
34
import { McpServer } from '../../server/mcp.js';
45
import { StreamableHTTPServerTransport } from '../../server/streamableHttp.js';
5-
import { z } from 'zod';
66
import { CallToolResult, GetPromptResult, isInitializeRequest, ReadResourceResult } from '../../types.js';
77
import { InMemoryEventStore } from '../shared/inMemoryEventStore.js';
88

@@ -13,21 +13,6 @@ const getServer = () => {
1313
version: '1.0.0',
1414
}, { capabilities: { logging: {} } });
1515

16-
// Log the capability invocation details
17-
server.onCapabilityChange((event) => {
18-
switch (event.action) {
19-
case 'invoked':
20-
console.log(`${event.capabilityType} invocation ${event.invocationIndex}: '${event.capabilityName}' started`);
21-
break;
22-
case 'completed':
23-
console.log(`${event.capabilityType} invocation ${event.invocationIndex}: '${event.capabilityName}' completed in ${event.durationMs}ms`);
24-
break;
25-
case 'error':
26-
console.log(`${event.capabilityType} invocation ${event.invocationIndex}: '${event.capabilityName}' failed in ${event.durationMs}ms: ${event.error}`);
27-
break;
28-
}
29-
});
30-
3116
// Register a simple tool that returns a greeting
3217
server.tool(
3318
'greet',

src/server/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ export class Server<
104104
);
105105
}
106106

107-
/**
108-
* The server's name and version.
109-
*/
110-
getVersion(): { readonly name: string; readonly version: string } {
111-
return this._serverInfo;
112-
}
113-
114107
/**
115108
* Registers new capabilities. This can only be called before connecting to a transport.
116109
*

0 commit comments

Comments
 (0)