Fix URI template derivation and lookup (#530)
* Use lowercase host in resource URI template derivation. * Address feedback * Add casing testing for non-templated resource lookups. * Fix uri primitive lookup * Use a hardcoded mcp hostname in derived resource template URIs and ensure built-in resources work with the VS Code client. * Address feedback * Fix equality comparison * Use dedicated type for resource collections.
This commit is contained in:
parent
283a052e3f
commit
0b26b7bf22
1 changed files with 174 additions and 75 deletions
|
|
@ -2,12 +2,14 @@ using OpenTelemetry;
|
|||
using OpenTelemetry.Metrics;
|
||||
using OpenTelemetry.Trace;
|
||||
using TestServerWithHosting.Tools;
|
||||
using TestServerWithHosting.Resources;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Services.AddMcpServer()
|
||||
.WithHttpTransport()
|
||||
.WithTools<EchoTool>()
|
||||
.WithTools<SampleLlmTool>();
|
||||
.WithTools<SampleLlmTool>()
|
||||
.WithResources<SimpleResourceType>();
|
||||
|
||||
builder.Services.AddOpenTelemetry()
|
||||
.WithTracing(b => b.AddSource("*")
|
||||
|
|
|
|||
Loading…
Reference in a new issue