Skip to content

Commit 9c91091

Browse files
Releasing version
Releasing version
2 parents 9adbbc8 + eb56107 commit 9c91091

File tree

205 files changed

+2854
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+2854
-587
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## 3.68.2 - 2025-07-15
7+
### Added
8+
- Support for calling Oracle Cloud Infrastructure services in the ap-delhi-1 region
9+
- Support for Generative Agent Development Kit (ADK) MCP features
10+
611
## 3.68.1 - 2025-07-08
712
### Added
813
- Support for insight of Autonomous Database on Exadata Cloud@Customer (ADB on ExaC@C) in the Operations Insights service

bmc-accessgovernancecp/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.oracle.oci.sdk</groupId>
66
<artifactId>oci-java-sdk</artifactId>
7-
<version>3.68.1</version>
7+
<version>3.68.2</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>oci-java-sdk-accessgovernancecp</artifactId>
@@ -15,7 +15,7 @@
1515
<dependency>
1616
<groupId>com.oracle.oci.sdk</groupId>
1717
<artifactId>oci-java-sdk-common</artifactId>
18-
<version>3.68.1</version>
18+
<version>3.68.2</version>
1919
</dependency>
2020
</dependencies>
2121
</project>

bmc-addons/bmc-adk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.oracle.oci.sdk</groupId>
88
<artifactId>oci-java-sdk-addons</artifactId>
9-
<version>3.68.1</version>
9+
<version>3.68.2</version>
1010
</parent>
1111

1212
<artifactId>oci-java-sdk-addons-adk</artifactId>

bmc-addons/bmc-adk/src/main/java/com/oracle/bmc/adk/agent/Agent.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package com.oracle.bmc.adk.agent;
66

77
import com.fasterxml.jackson.core.JsonProcessingException;
8-
import com.fasterxml.jackson.databind.ObjectMapper;
98
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
109
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
1110
import com.google.gson.Gson;
@@ -18,6 +17,7 @@
1817
import com.oracle.bmc.adk.tools.prebuilt.AgenticRagTool;
1918
import com.oracle.bmc.adk.utils.Console;
2019
import com.oracle.bmc.adk.utils.Constants;
20+
import com.oracle.bmc.adk.utils.JsonUtils;
2121
import com.oracle.bmc.generativeaiagent.model.AgentEndpoint;
2222
import com.oracle.bmc.generativeaiagent.model.Function;
2323
import com.oracle.bmc.generativeaiagent.model.FunctionCallingToolConfig;
@@ -62,8 +62,6 @@ public class Agent {
6262
private final List<FunctionTool> localFunctionTools;
6363
private final AgenticRagTool localRagTool;
6464

65-
private static final ObjectMapper objectMapper = new ObjectMapper();
66-
6765
/**
6866
* Constructor to initialize Agent with basic parameters only. Internal fields (like handler
6967
* functions, rag tools, and endpoint) are not initialized.
@@ -946,7 +944,7 @@ private FunctionCallingPerformedAction executeFunctionCall(
946944
String functionArgsObj = functionCall.getArguments();
947945

948946
Map<String, Object> functionArgs =
949-
objectMapper.readValue((String) functionArgsObj, Map.class);
947+
JsonUtils.OBJECT_MAPPER.readValue((String) functionArgsObj, Map.class);
950948

951949
// Find the appropriate function handler
952950
FunctionTool handler = null;
@@ -975,7 +973,7 @@ private FunctionCallingPerformedAction executeFunctionCall(
975973
// Return the performed action details
976974
return FunctionCallingPerformedAction.builder()
977975
.actionId(action.getActionId())
978-
.functionCallOutput(objectMapper.writeValueAsString(result))
976+
.functionCallOutput(JsonUtils.OBJECT_MAPPER.writeValueAsString(result))
979977
.build();
980978

981979
} catch (JsonProcessingException e) {
@@ -1056,7 +1054,7 @@ private Map<String, Object> responseToMap(ChatResponse response) {
10561054
SimpleFilterProvider filterProvider = new SimpleFilterProvider();
10571055
filterProvider.addFilter("explicitlySetFilter", SimpleBeanPropertyFilter.serializeAll());
10581056

1059-
objectMapper.setFilterProvider(filterProvider);
1060-
return objectMapper.convertValue(response, Map.class);
1057+
JsonUtils.OBJECT_MAPPER.setFilterProvider(filterProvider);
1058+
return JsonUtils.OBJECT_MAPPER.convertValue(response, Map.class);
10611059
}
10621060
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/**
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4+
*/
5+
package com.oracle.bmc.adk.client.mcp;
6+
7+
import com.oracle.bmc.adk.error.McpException;
8+
import com.oracle.bmc.adk.module.McpSchema;
9+
import com.oracle.bmc.adk.tools.FunctionTool;
10+
import com.oracle.bmc.adk.tools.Toolkit;
11+
12+
import java.util.List;
13+
import java.util.Map;
14+
15+
/**
16+
* Interface for a Model Context Protocol (MCP) client.
17+
*
18+
* <p>An MCP client establishes a connection to an MCP server, lists available tools, and invokes
19+
* tools on the remote MCP server.
20+
*/
21+
public interface McpClient extends AutoCloseable {
22+
23+
/**
24+
* Connects to the MCP server. This method must be called before using any other client
25+
* operations.
26+
*
27+
* @throws McpException if a connection failure occurs
28+
*/
29+
void connect() throws McpException;
30+
31+
/**
32+
* Releases resources and closes the connection to the server. This method is idempotent and
33+
* safe to call multiple times.
34+
*/
35+
void close();
36+
37+
/**
38+
* Gets the display name associated with the client or server connection.
39+
*
40+
* @return the display name or {@code null} if not set
41+
*/
42+
String getName();
43+
44+
/**
45+
* Retrieves the list of tools available on the connected MCP server.
46+
*
47+
* @return list of {@link McpSchema.Tool} instances
48+
* @throws McpException if an error occurs during the request
49+
*/
50+
List<McpSchema.Tool> listTools() throws McpException;
51+
52+
/**
53+
* Invokes a tool on the MCP server with the specified arguments.
54+
*
55+
* @param toolName the unique name of the tool to invoke
56+
* @param args arguments to pass to the tool
57+
* @return the result of the tool invocation
58+
* @throws McpException if invocation fails or the client is not connected
59+
*/
60+
McpSchema.CallToolResult callTool(String toolName, Map<String, Object> args)
61+
throws McpException;
62+
63+
/**
64+
* Returns all registered tools as a list of {@link FunctionTool} wrappers for agent
65+
* orchestration.
66+
*
67+
* @return list of converted {@link FunctionTool} objects
68+
*/
69+
List<FunctionTool> asTools();
70+
71+
/**
72+
* Converts the MCP client into a {@link Toolkit} representation, wrapping the client's tools as
73+
* {@link FunctionTool} instances. This allows the MCP client's tools to be used in contexts
74+
* that expect a {@link Toolkit}. The resulting {@link Toolkit} is initialized with the provided
75+
* {@code toolkitName}.
76+
*
77+
* @param toolkitName the name to be used for the resulting {@link Toolkit}
78+
* @return a {@link Toolkit} representation of the MCP client's tools, with the specified name
79+
*/
80+
Toolkit asToolkit(String toolkitName);
81+
}

0 commit comments

Comments
 (0)