Class Tool.Mcp.Builder
-
- All Implemented Interfaces:
public final class Tool.Mcp.BuilderA builder for Mcp.
-
-
Method Summary
Modifier and Type Method Description final Tool.Mcp.BuilderserverLabel(String serverLabel)A label for this MCP server, used to identify it in tool calls. final Tool.Mcp.BuilderserverLabel(JsonField<String> serverLabel)Sets Builder.serverLabel to an arbitrary JSON value. final Tool.Mcp.BuilderserverUrl(String serverUrl)The URL for the MCP server. final Tool.Mcp.BuilderserverUrl(JsonField<String> serverUrl)Sets Builder.serverUrl to an arbitrary JSON value. final Tool.Mcp.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final Tool.Mcp.BuilderallowedTools(Tool.Mcp.AllowedTools allowedTools)List of allowed tool names or a filter object. final Tool.Mcp.BuilderallowedTools(Optional<Tool.Mcp.AllowedTools> allowedTools)Alias for calling Builder.allowedTools with allowedTools.orElse(null).final Tool.Mcp.BuilderallowedTools(JsonField<Tool.Mcp.AllowedTools> allowedTools)Sets Builder.allowedTools to an arbitrary JSON value. final Tool.Mcp.BuilderallowedTools(Tool.Mcp.AllowedTools.McpAllowedToolsFilter mcpAllowedToolsFilter)Alias for calling allowedTools with AllowedTools.ofMcpAllowedToolsFilter(mcpAllowedToolsFilter).final Tool.Mcp.BuilderallowedToolsOfMcp(List<String> mcp)Alias for calling allowedTools with AllowedTools.ofMcp(mcp).final Tool.Mcp.Builderheaders(Tool.Mcp.Headers headers)Optional HTTP headers to send to the MCP server. final Tool.Mcp.Builderheaders(Optional<Tool.Mcp.Headers> headers)Alias for calling Builder.headers with headers.orElse(null).final Tool.Mcp.Builderheaders(JsonField<Tool.Mcp.Headers> headers)Sets Builder.headers to an arbitrary JSON value. final Tool.Mcp.BuilderrequireApproval(Tool.Mcp.RequireApproval requireApproval)Specify which of the MCP server's tools require approval. final Tool.Mcp.BuilderrequireApproval(Optional<Tool.Mcp.RequireApproval> requireApproval)Alias for calling Builder.requireApproval with requireApproval.orElse(null).final Tool.Mcp.BuilderrequireApproval(JsonField<Tool.Mcp.RequireApproval> requireApproval)Sets Builder.requireApproval to an arbitrary JSON value. final Tool.Mcp.BuilderrequireApproval(Tool.Mcp.RequireApproval.McpToolApprovalFilter mcpToolApprovalFilter)Alias for calling requireApproval with RequireApproval.ofMcpToolApprovalFilter(mcpToolApprovalFilter).final Tool.Mcp.BuilderrequireApproval(Tool.Mcp.RequireApproval.McpToolApprovalSetting mcpToolApprovalSetting)Alias for calling requireApproval with RequireApproval.ofMcpToolApprovalSetting(mcpToolApprovalSetting).final Tool.Mcp.BuilderserverDescription(String serverDescription)Optional description of the MCP server, used to provide more context. final Tool.Mcp.BuilderserverDescription(JsonField<String> serverDescription)Sets Builder.serverDescription to an arbitrary JSON value. final Tool.Mcp.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final Tool.Mcp.BuilderputAdditionalProperty(String key, JsonValue value)final Tool.Mcp.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final Tool.Mcp.BuilderremoveAdditionalProperty(String key)final Tool.Mcp.BuilderremoveAllAdditionalProperties(Set<String> keys)final Tool.Mcpbuild()Returns an immutable instance of Mcp. -
-
Method Detail
-
serverLabel
final Tool.Mcp.Builder serverLabel(String serverLabel)
A label for this MCP server, used to identify it in tool calls.
-
serverLabel
final Tool.Mcp.Builder serverLabel(JsonField<String> serverLabel)
Sets Builder.serverLabel to an arbitrary JSON value.
You should usually call Builder.serverLabel with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
serverUrl
final Tool.Mcp.Builder serverUrl(String serverUrl)
The URL for the MCP server.
-
serverUrl
final Tool.Mcp.Builder serverUrl(JsonField<String> serverUrl)
Sets Builder.serverUrl to an arbitrary JSON value.
You should usually call Builder.serverUrl with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final Tool.Mcp.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("mcp")This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedTools
final Tool.Mcp.Builder allowedTools(Tool.Mcp.AllowedTools allowedTools)
List of allowed tool names or a filter object.
-
allowedTools
final Tool.Mcp.Builder allowedTools(Optional<Tool.Mcp.AllowedTools> allowedTools)
Alias for calling Builder.allowedTools with
allowedTools.orElse(null).
-
allowedTools
final Tool.Mcp.Builder allowedTools(JsonField<Tool.Mcp.AllowedTools> allowedTools)
Sets Builder.allowedTools to an arbitrary JSON value.
You should usually call Builder.allowedTools with a well-typed AllowedTools value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedTools
final Tool.Mcp.Builder allowedTools(Tool.Mcp.AllowedTools.McpAllowedToolsFilter mcpAllowedToolsFilter)
Alias for calling allowedTools with
AllowedTools.ofMcpAllowedToolsFilter(mcpAllowedToolsFilter).
-
allowedToolsOfMcp
final Tool.Mcp.Builder allowedToolsOfMcp(List<String> mcp)
Alias for calling allowedTools with
AllowedTools.ofMcp(mcp).
-
headers
final Tool.Mcp.Builder headers(Tool.Mcp.Headers headers)
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
-
headers
final Tool.Mcp.Builder headers(Optional<Tool.Mcp.Headers> headers)
Alias for calling Builder.headers with
headers.orElse(null).
-
headers
final Tool.Mcp.Builder headers(JsonField<Tool.Mcp.Headers> headers)
Sets Builder.headers to an arbitrary JSON value.
You should usually call Builder.headers with a well-typed Headers value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
requireApproval
final Tool.Mcp.Builder requireApproval(Tool.Mcp.RequireApproval requireApproval)
Specify which of the MCP server's tools require approval.
-
requireApproval
final Tool.Mcp.Builder requireApproval(Optional<Tool.Mcp.RequireApproval> requireApproval)
Alias for calling Builder.requireApproval with
requireApproval.orElse(null).
-
requireApproval
final Tool.Mcp.Builder requireApproval(JsonField<Tool.Mcp.RequireApproval> requireApproval)
Sets Builder.requireApproval to an arbitrary JSON value.
You should usually call Builder.requireApproval with a well-typed RequireApproval value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
requireApproval
final Tool.Mcp.Builder requireApproval(Tool.Mcp.RequireApproval.McpToolApprovalFilter mcpToolApprovalFilter)
Alias for calling requireApproval with
RequireApproval.ofMcpToolApprovalFilter(mcpToolApprovalFilter).
-
requireApproval
final Tool.Mcp.Builder requireApproval(Tool.Mcp.RequireApproval.McpToolApprovalSetting mcpToolApprovalSetting)
Alias for calling requireApproval with
RequireApproval.ofMcpToolApprovalSetting(mcpToolApprovalSetting).
-
serverDescription
final Tool.Mcp.Builder serverDescription(String serverDescription)
Optional description of the MCP server, used to provide more context.
-
serverDescription
final Tool.Mcp.Builder serverDescription(JsonField<String> serverDescription)
Sets Builder.serverDescription to an arbitrary JSON value.
You should usually call Builder.serverDescription with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final Tool.Mcp.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Tool.Mcp.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Tool.Mcp.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Tool.Mcp.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Tool.Mcp.Builder removeAllAdditionalProperties(Set<String> keys)
-
-
-
-