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
|
|
@ -0,0 +1,5 @@
|
|||
namespace ModelContextProtocol.Server;
|
||||
|
||||
/// <summary>Provides a thread-safe collection of <see cref="McpServerResource"/> instances, indexed by their URI templates.</summary>
|
||||
public sealed class McpServerResourceCollection()
|
||||
: McpServerPrimitiveCollection<McpServerResource>(UriTemplate.UriTemplateComparer.Instance);
|
||||
Loading…
Reference in a new issue