java.lang.Object
com.google.genai.gaos.models.interactions.MCPServer
All Implemented Interfaces:
AgentTool, Tool

public class MCPServer extends Object implements AgentTool, Tool
MCPServer

A MCPServer is a server that can be called by the model to perform actions.

  • Constructor Details

  • Method Details

    • allowedTools

      public Optional<List<AllowedTools>> allowedTools()
      The allowed tools.
    • headers

      public Optional<Map<String,String>> headers()
      Optional: Fields for authentication headers, timeouts, etc., if needed.
    • name

      public Optional<String> name()
      The name of the MCPServer.
    • type

      public String type()
      Specified by:
      type in interface AgentTool
      Specified by:
      type in interface Tool
    • url

      public Optional<String> url()
      The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
    • builder

      public static MCPServer.Builder builder()
    • withAllowedTools

      public MCPServer withAllowedTools(@Nullable List<AllowedTools> allowedTools)
      The allowed tools.
    • withHeaders

      public MCPServer withHeaders(@Nullable Map<String,String> headers)
      Optional: Fields for authentication headers, timeouts, etc., if needed.
    • withName

      public MCPServer withName(@Nullable String name)
      The name of the MCPServer.
    • withUrl

      public MCPServer withUrl(@Nullable String url)
      The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object