You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: posts/2026-03-10-26.0.0.3-beta.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ The link:{url-about}[Open Liberty] 26.0.0.3-beta includes the following beta fea
25
25
* <<encoders, Encode responses with ContentEncoder and ToolResponseEncoder>>
26
26
* <<requestid, Access the request ID from a tool>>
27
27
28
+
The link:https://modelcontextprotocol.io/docs/getting-started/intro[Model Context Protocol (MCP)] is an open standard that enables AI applications to access real-time information from external sources. The Liberty MCP Server feature (`mcpServer-1.0`) allows developers to expose the business logic of their applications, allowing it to be integrated into agentic AI workflows.
29
+
28
30
See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta blog posts].
29
31
30
32
// // // // DO NOT MODIFY THIS COMMENT BLOCK <GHA-BLOG-TOPIC> // // // //
@@ -34,14 +36,12 @@ See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta
34
36
[#encoders]
35
37
== Encode responses with ContentEncoder and ToolResponseEncoder
36
38
37
-
The link:https://modelcontextprotocol.io/docs/getting-started/intro[Model Context Protocol (MCP)] is an open standard that enables AI applications to access real-time information from external sources. The Liberty MCP Server feature (`mcpServer-1.0`) allows developers to expose the business logic of their applications, allowing it to be integrated into agentic AI workflows.
38
-
39
39
When a client calls a tool, the object that is returned by the tool method is converted to a `ToolResponse`, which usually contains one or more `Content` objects. The `ToolResponse` maps directly to the result returned in the response.
40
40
41
41
If you need more control over the response from your tool, you can return a `ToolResponse` or `Content` object directly. Now it is also possible to register encoders to control how other objects are converted into a response.
42
42
43
43
* Use `ToolResponseEncoder` to convert an object into a `ToolResponse`, which gives you complete control over the whole response.
44
-
* Use `ContentEncoder` only when you need to convert an object into a `Content` that is included in the response. You can also return a list of objects, and each object is individually converted into a `Content` and included in the response.
44
+
* Use `ContentEncoder` when you only need to convert an object into a `Content` that is included in the response. You can also return a list of objects, and each object is individually converted into a `Content` and included in the response.
45
45
46
46
If a tool method returns an object for which no encoder is provided, JSON-B encodes the object as JSON, which is returned as text content.
0 commit comments