Interface McpResourceTemplateHandler.ReadFunction

Enclosing interface:
McpResourceTemplateHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

A three-argument function from (uri, variables, ctx) to a McpResourceOutcome, matching read(String, Map, BeanStore)'s signature.

A dedicated functional interface rather than BiFunction because read(...) takes three parameters, not two.

  • Method Details

    • read

      Reads the resource body for a concrete URI matched against the template.
      Parameters:
      uri - The original concrete URI from the resources/read request.
      variables - An immutable, insertion-ordered map of the template's declared variables to their decoded values, captured from uri.
      ctx - Per-request bean store. Never null.
      Returns:
      The resource contents, or null if this template does not serve uri.