You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/EverythingServer/Program.cs
+26-3Lines changed: 26 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -38,26 +38,49 @@
38
38
.WithTools<TinyImageTool>()
39
39
.WithPrompts<ComplexPromptType>()
40
40
.WithPrompts<SimplePromptType>()
41
+
.WithListResourcesHandler(async(ctx,ct)=>
42
+
{
43
+
returnnewListResourcesResult
44
+
{
45
+
Resources=
46
+
[
47
+
newModelContextProtocol.Protocol.Types.Resource{Name="Direct Text Resource",Description="A direct text resource",MimeType="text/plain",Uri="test://direct/text/resource"},
48
+
]
49
+
};
50
+
})
41
51
.WithListResourceTemplatesHandler(async(ctx,ct)=>
42
52
{
43
53
returnnewListResourceTemplatesResult
44
54
{
45
55
ResourceTemplates=
46
56
[
47
-
newResourceTemplate{Name="Static Resource",Description="A static resource with a numeric ID",UriTemplate="test://static/resource/{id}"}
57
+
newResourceTemplate{Name="Template Resource",Description="A template resource with a numeric ID",UriTemplate="test://template/resource/{id}"}
[LoggerMessage(Level=LogLevel.Critical,Message="Exceeded static maximum of 10,000 idle connections. Now clearing all inactive connections regardless of timeout.")]
[LoggerMessage(Level=LogLevel.Critical,Message="Exceeded maximum of {maxIdleSessionCount} idle sessions. Now closing sessions active more recently than configured IdleTimeout.")]
0 commit comments