Skip to content

Commit 2b1aec6

Browse files
authored
[9.2] [API docs][agent builder] Add warnings to MCP + A2A REST routes (#241856) (#242093)
{defaultPrDescription} <!--BACKPORT {commits} BACKPORT-->
1 parent e505018 commit 2b1aec6

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

oas_docs/bundle.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@
860860
},
861861
"/api/agent_builder/a2a/{agentId}": {
862862
"post": {
863-
"description": "Handle A2A (Agent-to-Agent) task requests. Use this endpoint to process inter-agent communication using JSON-RPC 2.0 protocol.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
863+
"description": "WARNING: This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
864864
"operationId": "post-agent-builder-a2a-agentid",
865865
"parameters": [
866866
{
@@ -878,7 +878,7 @@
878878
"application/json": {
879879
"examples": {
880880
"a2aTaskRequestExample": {
881-
"description": "Example request for A2A Task Endpoint",
881+
"description": "WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with A2A using an A2A SDK or A2A Inspector instead.",
882882
"value": {
883883
"id": "task-123",
884884
"jsonrpc": "2.0",
@@ -1967,15 +1967,15 @@
19671967
},
19681968
"/api/agent_builder/mcp": {
19691969
"post": {
1970-
"description": "Communicate with the MCP server via JSON-RPC 2.0. MCP is designed for AI clients like Claude Desktop, Cursor, and VS Code extensions to access your Elastic tools. Use this endpoint for testing MCP connectivity or debugging protocol communication. This endpoint requires JSON-RPC formatting and will not work from the Dev Tools Console.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
1970+
"description": "WARNING: This endpoint is designed for MCP clients (Claude Desktop, Cursor, VS Code, etc.) and should not be used directly via REST APIs. Use MCP Inspector or native MCP clients instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
19711971
"operationId": "post-agent-builder-mcp",
19721972
"parameters": [],
19731973
"requestBody": {
19741974
"content": {
19751975
"application/json": {
19761976
"examples": {
19771977
"mcpInitializeRequestExample": {
1978-
"description": "Example request to initalise communication over MCP protocol",
1978+
"description": "WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with MCP using MCP Inspector or native MCP clients (Claude Desktop, Cursor, VS Code) instead.",
19791979
"value": {
19801980
"id": 1,
19811981
"jsonrpc": "2.0",

oas_docs/bundle.serverless.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@
860860
},
861861
"/api/agent_builder/a2a/{agentId}": {
862862
"post": {
863-
"description": "Handle A2A (Agent-to-Agent) task requests. Use this endpoint to process inter-agent communication using JSON-RPC 2.0 protocol.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
863+
"description": "WARNING: This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
864864
"operationId": "post-agent-builder-a2a-agentid",
865865
"parameters": [
866866
{
@@ -878,7 +878,7 @@
878878
"application/json": {
879879
"examples": {
880880
"a2aTaskRequestExample": {
881-
"description": "Example request for A2A Task Endpoint",
881+
"description": "WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with A2A using an A2A SDK or A2A Inspector instead.",
882882
"value": {
883883
"id": "task-123",
884884
"jsonrpc": "2.0",
@@ -1967,15 +1967,15 @@
19671967
},
19681968
"/api/agent_builder/mcp": {
19691969
"post": {
1970-
"description": "Communicate with the MCP server via JSON-RPC 2.0. MCP is designed for AI clients like Claude Desktop, Cursor, and VS Code extensions to access your Elastic tools. Use this endpoint for testing MCP connectivity or debugging protocol communication. This endpoint requires JSON-RPC formatting and will not work from the Dev Tools Console.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
1970+
"description": "WARNING: This endpoint is designed for MCP clients (Claude Desktop, Cursor, VS Code, etc.) and should not be used directly via REST APIs. Use MCP Inspector or native MCP clients instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.",
19711971
"operationId": "post-agent-builder-mcp",
19721972
"parameters": [],
19731973
"requestBody": {
19741974
"content": {
19751975
"application/json": {
19761976
"examples": {
19771977
"mcpInitializeRequestExample": {
1978-
"description": "Example request to initalise communication over MCP protocol",
1978+
"description": "WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with MCP using MCP Inspector or native MCP clients (Claude Desktop, Cursor, VS Code) instead.",
19791979
"value": {
19801980
"id": 1,
19811981
"jsonrpc": "2.0",

oas_docs/output/kibana.serverless.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ paths:
893893

894894
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
895895

896-
Handle A2A (Agent-to-Agent) task requests. Use this endpoint to process inter-agent communication using JSON-RPC 2.0 protocol.<br/><br/>[Required authorization] Route required privileges: read_onechat.
896+
WARNING: This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.
897897
operationId: post-agent-builder-a2a-agentid
898898
parameters:
899899
- description: The unique identifier of the agent to send the A2A task to.
@@ -907,7 +907,7 @@ paths:
907907
application/json:
908908
examples:
909909
a2aTaskRequestExample:
910-
description: Example request for A2A Task Endpoint
910+
description: 'WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with A2A using an A2A SDK or A2A Inspector instead.'
911911
value:
912912
id: task-123
913913
jsonrpc: '2.0'
@@ -1751,15 +1751,15 @@ paths:
17511751

17521752
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
17531753

1754-
Communicate with the MCP server via JSON-RPC 2.0. MCP is designed for AI clients like Claude Desktop, Cursor, and VS Code extensions to access your Elastic tools. Use this endpoint for testing MCP connectivity or debugging protocol communication. This endpoint requires JSON-RPC formatting and will not work from the Dev Tools Console.<br/><br/>[Required authorization] Route required privileges: read_onechat.
1754+
WARNING: This endpoint is designed for MCP clients (Claude Desktop, Cursor, VS Code, etc.) and should not be used directly via REST APIs. Use MCP Inspector or native MCP clients instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.
17551755
operationId: post-agent-builder-mcp
17561756
parameters: []
17571757
requestBody:
17581758
content:
17591759
application/json:
17601760
examples:
17611761
mcpInitializeRequestExample:
1762-
description: Example request to initalise communication over MCP protocol
1762+
description: 'WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with MCP using MCP Inspector or native MCP clients (Claude Desktop, Cursor, VS Code) instead.'
17631763
value:
17641764
id: 1
17651765
jsonrpc: '2.0'

oas_docs/output/kibana.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ paths:
958958

959959
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
960960

961-
Handle A2A (Agent-to-Agent) task requests. Use this endpoint to process inter-agent communication using JSON-RPC 2.0 protocol.<br/><br/>[Required authorization] Route required privileges: read_onechat.
961+
WARNING: This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.
962962
operationId: post-agent-builder-a2a-agentid
963963
parameters:
964964
- description: The unique identifier of the agent to send the A2A task to.
@@ -972,7 +972,7 @@ paths:
972972
application/json:
973973
examples:
974974
a2aTaskRequestExample:
975-
description: Example request for A2A Task Endpoint
975+
description: 'WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with A2A using an A2A SDK or A2A Inspector instead.'
976976
value:
977977
id: task-123
978978
jsonrpc: '2.0'
@@ -1816,15 +1816,15 @@ paths:
18161816

18171817
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
18181818

1819-
Communicate with the MCP server via JSON-RPC 2.0. MCP is designed for AI clients like Claude Desktop, Cursor, and VS Code extensions to access your Elastic tools. Use this endpoint for testing MCP connectivity or debugging protocol communication. This endpoint requires JSON-RPC formatting and will not work from the Dev Tools Console.<br/><br/>[Required authorization] Route required privileges: read_onechat.
1819+
WARNING: This endpoint is designed for MCP clients (Claude Desktop, Cursor, VS Code, etc.) and should not be used directly via REST APIs. Use MCP Inspector or native MCP clients instead.<br/><br/>[Required authorization] Route required privileges: read_onechat.
18201820
operationId: post-agent-builder-mcp
18211821
parameters: []
18221822
requestBody:
18231823
content:
18241824
application/json:
18251825
examples:
18261826
mcpInitializeRequestExample:
1827-
description: Example request to initalise communication over MCP protocol
1827+
description: 'WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with MCP using MCP Inspector or native MCP clients (Claude Desktop, Cursor, VS Code) instead.'
18281828
value:
18291829
id: 1
18301830
jsonrpc: '2.0'

x-pack/platform/plugins/shared/onechat/server/routes/a2a.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function registerA2ARoutes({
8383
access: 'public',
8484
summary: 'Send A2A task',
8585
description:
86-
'Handle A2A (Agent-to-Agent) task requests. Use this endpoint to process inter-agent communication using JSON-RPC 2.0 protocol.',
86+
'WARNING: This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.',
8787
options: {
8888
tags: ['a2a', 'oas-tag:agent builder'],
8989
xsrfRequired: false,

x-pack/platform/plugins/shared/onechat/server/routes/examples/a2a_task.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requestBody:
33
application/json:
44
examples:
55
a2aTaskRequestExample:
6-
description: "Example request for A2A Task Endpoint"
6+
description: "WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with A2A using an A2A SDK or A2A Inspector instead."
77
value:
88
jsonrpc: "2.0"
99
method: "complete"

x-pack/platform/plugins/shared/onechat/server/routes/examples/mcp_initialize.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requestBody:
33
application/json:
44
examples:
55
mcpInitializeRequestExample:
6-
description: "Example request to initalise communication over MCP protocol"
6+
description: "WARNING: DO NOT USE THIS ENDPOINT VIA REST API. These examples are auto-generated and should not be run. Integrate with MCP using MCP Inspector or native MCP clients (Claude Desktop, Cursor, VS Code) instead."
77
value:
88
jsonrpc: "2.0"
99
method: "initialize"

x-pack/platform/plugins/shared/onechat/server/routes/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function registerMCPRoutes({ router, getInternalServices, logger }: Route
3131
access: 'public',
3232
summary: 'MCP server',
3333
description:
34-
'Communicate with the MCP server via JSON-RPC 2.0. MCP is designed for AI clients like Claude Desktop, Cursor, and VS Code extensions to access your Elastic tools. Use this endpoint for testing MCP connectivity or debugging protocol communication. This endpoint requires JSON-RPC formatting and will not work from the Dev Tools Console.',
34+
'WARNING: This endpoint is designed for MCP clients (Claude Desktop, Cursor, VS Code, etc.) and should not be used directly via REST APIs. Use MCP Inspector or native MCP clients instead.',
3535
options: {
3636
tags: ['mcp', 'oas-tag:agent builder'],
3737
xsrfRequired: false,

0 commit comments

Comments
 (0)