Class MCPResource

java.lang.Object
com.google.genkit.plugins.mcp.MCPResource

public class MCPResource extends Object
Represents an MCP resource.

Resources in MCP are data sources that can be read by clients. They have a URI, name, optional description, and MIME type.

  • Constructor Details

    • MCPResource

      public MCPResource(String uri, String name, String description, String mimeType)
      Creates a new MCP resource.
      Parameters:
      uri - the resource URI
      name - the resource name
      description - the resource description
      mimeType - the MIME type
  • Method Details

    • getUri

      public String getUri()
      Gets the resource URI.
      Returns:
      the URI
    • getName

      public String getName()
      Gets the resource name.
      Returns:
      the name
    • getDescription

      public String getDescription()
      Gets the resource description.
      Returns:
      the description
    • getMimeType

      public String getMimeType()
      Gets the MIME type.
      Returns:
      the MIME type
    • toString

      public String toString()
      Overrides:
      toString in class Object