Class StructuredElicitResult.Builder<T>

java.lang.Object
org.springaicommunity.mcp.context.StructuredElicitResult.Builder<T>
Enclosing class:
StructuredElicitResult<T>

public static class StructuredElicitResult.Builder<T> extends Object
  • Method Details

    • action

      public StructuredElicitResult.Builder<T> action(io.modelcontextprotocol.spec.McpSchema.ElicitResult.Action action)
      Sets the action.
      Parameters:
      action - the action to set
      Returns:
      this builder instance
    • structuredContent

      public <U> StructuredElicitResult.Builder<U> structuredContent(U structuredContent)
      Sets the structured content.
      Type Parameters:
      U - the type of the structured content
      Parameters:
      structuredContent - the structured content to set
      Returns:
      this builder instance with the correct type
    • meta

      Sets the meta map.
      Parameters:
      meta - the meta map to set
      Returns:
      this builder instance
    • addMeta

      public StructuredElicitResult.Builder<T> addMeta(String key, Object value)
      Adds a single meta entry.
      Parameters:
      key - the meta key
      value - the meta value
      Returns:
      this builder instance
    • build

      public StructuredElicitResult<T> build()
      Builds the StructuredElicitResult instance.
      Returns:
      a new StructuredElicitResult instance