Skip to content

Commit 493a7fb

Browse files
committed
Update based on feedback
1 parent 16c17dd commit 493a7fb

File tree

5 files changed

+234
-90
lines changed

5 files changed

+234
-90
lines changed

src/ModelContextProtocol/Protocol/Messages/RequestId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public RequestId(long value)
3636

3737
/// <inheritdoc />
3838
public override string ToString() =>
39-
_id is string stringValue ? $"\"{stringValue}\"" :
39+
_id is string stringValue ? stringValue :
4040
_id is long longValue ? longValue.ToString(CultureInfo.InvariantCulture) :
4141
string.Empty;
4242

src/ModelContextProtocol/Shared/McpJsonRpcEndpoint.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using ModelContextProtocol.Logging;
44
using ModelContextProtocol.Protocol.Messages;
55
using ModelContextProtocol.Protocol.Transport;
6+
using ModelContextProtocol.Server;
67
using ModelContextProtocol.Utils;
78
using System.Diagnostics.CodeAnalysis;
89

@@ -63,7 +64,7 @@ public Task SendMessageAsync(IJsonRpcMessage message, CancellationToken cancella
6364
protected void StartSession(ITransport sessionTransport)
6465
{
6566
_sessionCts = new CancellationTokenSource();
66-
_session = new McpSession(sessionTransport, EndpointName, _requestHandlers, _notificationHandlers, _logger);
67+
_session = new McpSession(this is IMcpServer, sessionTransport, EndpointName, _requestHandlers, _notificationHandlers, _logger);
6768
MessageProcessingTask = _session.ProcessMessagesAsync(_sessionCts.Token);
6869
}
6970

0 commit comments

Comments
 (0)