Skip to content

Fix URI template derivation and lookup#530

Merged
eiriktsarpalis merged 9 commits intomodelcontextprotocol:mainfrom
eiriktsarpalis:use-lowercase-derived-uritemplaes
Jun 23, 2025
Merged

Fix URI template derivation and lookup#530
eiriktsarpalis merged 9 commits intomodelcontextprotocol:mainfrom
eiriktsarpalis:use-lowercase-derived-uritemplaes

Conversation

@eiriktsarpalis
Copy link
Copy Markdown
Member

Makes the following changes:

  • When deriving a resource URI template, converts the host component to lowercase.
  • Defaults the mimetype to "application/octetstream".

This should mitigate some of the issues described in #516.

Comment thread src/ModelContextProtocol.Core/Server/AIFunctionMcpServerResource.cs Outdated
Comment thread src/ModelContextProtocol.Core/Server/McpServerPrimitiveCollection.cs Outdated
Comment thread src/ModelContextProtocol.Core/UriTemplate.cs Outdated
Comment thread src/ModelContextProtocol.Core/UriTemplate.cs
@eiriktsarpalis eiriktsarpalis changed the title Use lowercase host in resource URI template derivation. Fix URI template derivation and lookup Jun 23, 2025
Comment thread src/ModelContextProtocol.Core/UriTemplate.cs
Comment thread src/ModelContextProtocol.Core/UriTemplate.cs Outdated
@eiriktsarpalis eiriktsarpalis merged commit 0b26b7b into modelcontextprotocol:main Jun 23, 2025
7 checks passed
@eiriktsarpalis eiriktsarpalis deleted the use-lowercase-derived-uritemplaes branch June 23, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP Resources without parameters don't work without mime-type specified

3 participants