Interface McpResourceReadContext


Immutable routed input for one MCP resource-read invocation.

The URI and template variables remain application input. Routing does not authorize the current principal, establish filesystem containment, or say that the URI is safe for direct client loading. A handler must apply its own delivery-intent URI allowlist and, for filesystem-backed resources, canonicalize and contain the target before authorization and opening.

Author:
Mark Allen
  • Method Details

    • getUri

      Returns the exact routed resource URI supplied by the client.
      Returns:
      exact resource URI; not an authorization or dereference decision
    • getUriTemplateVariables

      Returns URI-template variables captured while routing this resource. Values are UTF-8 percent-decoded exactly once: an encoded slash (%2F) becomes /, while %252F becomes the literal string %2F. getUri() retains the original client URI. Captures can be empty and can contain decoded NUL, CR or LF; validate values for the intended application use before using them. Capturing a variable does not authorize filesystem access or establish that a decoded path is safe.
      Returns:
      immutable variable map, empty for an exact-URI registration