Class Tool.Mcp.Builder
-
- All Implemented Interfaces:
public final class Tool.Mcp.Builder
A builder for Mcp.
-
-
Method Summary
Modifier and Type Method Description final Tool.Mcp.Builder
serverLabel(String serverLabel)
A label for this MCP server, used to identify it in tool calls. final Tool.Mcp.Builder
serverLabel(JsonField<String> serverLabel)
Sets Builder.serverLabel to an arbitrary JSON value. final Tool.Mcp.Builder
serverUrl(String serverUrl)
The URL for the MCP server. final Tool.Mcp.Builder
serverUrl(JsonField<String> serverUrl)
Sets Builder.serverUrl to an arbitrary JSON value. final Tool.Mcp.Builder
type(JsonValue type)
Sets the field to an arbitrary JSON value. final Tool.Mcp.Builder
allowedTools(Tool.Mcp.AllowedTools allowedTools)
List of allowed tool names or a filter object. final Tool.Mcp.Builder
allowedTools(Optional<Tool.Mcp.AllowedTools> allowedTools)
Alias for calling Builder.allowedTools with allowedTools.orElse(null)
.final Tool.Mcp.Builder
allowedTools(JsonField<Tool.Mcp.AllowedTools> allowedTools)
Sets Builder.allowedTools to an arbitrary JSON value. final Tool.Mcp.Builder
allowedTools(Tool.Mcp.AllowedTools.McpAllowedToolsFilter mcpAllowedToolsFilter)
Alias for calling allowedTools with AllowedTools.ofMcpAllowedToolsFilter(mcpAllowedToolsFilter)
.final Tool.Mcp.Builder
allowedToolsOfMcp(List<String> mcp)
Alias for calling allowedTools with AllowedTools.ofMcp(mcp)
.final Tool.Mcp.Builder
headers(Tool.Mcp.Headers headers)
Optional HTTP headers to send to the MCP server. final Tool.Mcp.Builder
headers(Optional<Tool.Mcp.Headers> headers)
Alias for calling Builder.headers with headers.orElse(null)
.final Tool.Mcp.Builder
headers(JsonField<Tool.Mcp.Headers> headers)
Sets Builder.headers to an arbitrary JSON value. final Tool.Mcp.Builder
requireApproval(Tool.Mcp.RequireApproval requireApproval)
Specify which of the MCP server's tools require approval. final Tool.Mcp.Builder
requireApproval(Optional<Tool.Mcp.RequireApproval> requireApproval)
Alias for calling Builder.requireApproval with requireApproval.orElse(null)
.final Tool.Mcp.Builder
requireApproval(JsonField<Tool.Mcp.RequireApproval> requireApproval)
Sets Builder.requireApproval to an arbitrary JSON value. final Tool.Mcp.Builder
requireApproval(Tool.Mcp.RequireApproval.McpToolApprovalFilter mcpToolApprovalFilter)
Alias for calling requireApproval with RequireApproval.ofMcpToolApprovalFilter(mcpToolApprovalFilter)
.final Tool.Mcp.Builder
requireApproval(Tool.Mcp.RequireApproval.McpToolApprovalSetting mcpToolApprovalSetting)
Alias for calling requireApproval with RequireApproval.ofMcpToolApprovalSetting(mcpToolApprovalSetting)
.final Tool.Mcp.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final Tool.Mcp.Builder
putAdditionalProperty(String key, JsonValue value)
final Tool.Mcp.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final Tool.Mcp.Builder
removeAdditionalProperty(String key)
final Tool.Mcp.Builder
removeAllAdditionalProperties(Set<String> keys)
final Tool.Mcp
build()
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)
.
-
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)
-
-
-
-