Add framework for conceptual docs (#708)
Add framework for conceptual docs plus article on elicitation Co-authored-by: Stephen Halter <halter73@gmail.com>
This commit is contained in:
parent
b067261ca7
commit
15f8e89ac3
1 changed files with 441 additions and 3 deletions
24
docs/concepts/elicitation/samples/server/Program.cs
Normal file
24
docs/concepts/elicitation/samples/server/Program.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using Elicitation.Tools;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddMcpServer()
|
||||
.WithHttpTransport(options =>
|
||||
options.IdleTimeout = Timeout.InfiniteTimeSpan // Never timeout
|
||||
)
|
||||
.WithTools<InteractiveTools>();
|
||||
|
||||
builder.Logging.AddConsole(options =>
|
||||
{
|
||||
options.LogToStandardErrorThreshold = LogLevel.Information;
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.MapMcp();
|
||||
|
||||
app.Run();
|
||||
Loading…
Reference in a new issue