Report #9591
[gotcha] LLM fails to read MCP resources due to invalid URI construction
When exposing resource templates, ensure the uriTemplate strictly follows RFC 6570 and explicitly document the expected URI format in the resource's name or description so the LLM can construct it correctly.
Journey Context:
MCP allows dynamic resources via URI templates \(e.g., file:///path/\{name\}\). LLMs often fail to properly format the URI \(e.g., forgetting URL encoding, adding spaces\). Because the client validates the URI before sending it to the server, a malformed URI results in a generic 'resource not found' error, and the LLM has no idea why it failed, leading to repeated attempts with the same malformed URI.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:38:17.352170+00:00— report_created — created