Skip to content

Commit 0e5a9fb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e7be59c of spec repo
1 parent 023d93e commit 0e5a9fb

19 files changed

Lines changed: 911 additions & 10 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16334,6 +16334,7 @@ components:
1633416334
- udp
1633516335
- icmp
1633616336
- websocket
16337+
- mcp
1633716338
example: http
1633816339
type: string
1633916340
x-enum-varnames:
@@ -16345,6 +16346,7 @@ components:
1634516346
- UDP
1634616347
- ICMP
1634716348
- WEBSOCKET
16349+
- MCP
1634816350
SyntheticsAPITestType:
1634916351
default: "api"
1635016352
description: Type of the Synthetic test, `api`.
@@ -16467,6 +16469,8 @@ components:
1646716469
- $ref: "#/components/schemas/SyntheticsAssertionJSONSchemaTarget"
1646816470
- $ref: "#/components/schemas/SyntheticsAssertionXPathTarget"
1646916471
- $ref: "#/components/schemas/SyntheticsAssertionJavascript"
16472+
- $ref: "#/components/schemas/SyntheticsAssertionMCPServerCapabilitiesTarget"
16473+
- $ref: "#/components/schemas/SyntheticsAssertionMCPRespectsSpecification"
1647016474
SyntheticsAssertionBodyHashOperator:
1647116475
description: Assertion operator to apply.
1647216476
enum:
@@ -16602,6 +16606,49 @@ components:
1660216606
type: string
1660316607
x-enum-varnames:
1660416608
- JAVASCRIPT
16609+
SyntheticsAssertionMCPRespectsSpecification:
16610+
description: An assertion that verifies the MCP server response respects the MCP specification.
16611+
properties:
16612+
type:
16613+
$ref: "#/components/schemas/SyntheticsAssertionMCPRespectsSpecificationType"
16614+
required:
16615+
- type
16616+
type: object
16617+
SyntheticsAssertionMCPRespectsSpecificationType:
16618+
description: Type of the assertion.
16619+
enum:
16620+
- mcpRespectsSpecification
16621+
example: mcpRespectsSpecification
16622+
type: string
16623+
x-enum-varnames:
16624+
- MCP_RESPECTS_SPECIFICATION
16625+
SyntheticsAssertionMCPServerCapabilitiesTarget:
16626+
description: An assertion which checks that an MCP server advertises the expected capabilities.
16627+
properties:
16628+
operator:
16629+
$ref: "#/components/schemas/SyntheticsAssertionOperator"
16630+
target:
16631+
description: List of MCP server capabilities to assert against.
16632+
example:
16633+
- completions
16634+
items:
16635+
$ref: "#/components/schemas/SyntheticsMCPServerCapability"
16636+
type: array
16637+
type:
16638+
$ref: "#/components/schemas/SyntheticsAssertionMCPServerCapabilitiesType"
16639+
required:
16640+
- type
16641+
- operator
16642+
- target
16643+
type: object
16644+
SyntheticsAssertionMCPServerCapabilitiesType:
16645+
description: Type of the assertion.
16646+
enum:
16647+
- mcpServerCapabilities
16648+
example: mcpServerCapabilities
16649+
type: string
16650+
x-enum-varnames:
16651+
- MCP_SERVER_CAPABILITIES
1660516652
SyntheticsAssertionOperator:
1660616653
description: Assertion operator to apply.
1660716654
enum:
@@ -16704,6 +16751,8 @@ components:
1670416751
- connection
1670516752
- multiNetworkHop
1670616753
- jitter
16754+
- mcpToolNameLength
16755+
- mcpToolCount
1670716756
example: statusCode
1670816757
type: string
1670916758
x-enum-varnames:
@@ -16728,6 +16777,8 @@ components:
1672816777
- CONNECTION
1672916778
- MULTI_NETWORK_HOP
1673016779
- JITTER
16780+
- MCP_TOOL_NAME_LENGTH
16781+
- MCP_TOOL_COUNT
1673116782
SyntheticsAssertionXPathOperator:
1673216783
description: Assertion operator to apply.
1673316784
enum:
@@ -18036,6 +18087,31 @@ components:
1803618087
$ref: "#/components/schemas/SyntheticsLocation"
1803718088
type: array
1803818089
type: object
18090+
SyntheticsMCPProtocolVersion:
18091+
description: The MCP protocol version used by the step. See https://modelcontextprotocol.io/specification.
18092+
enum:
18093+
- "2025-06-18"
18094+
example: "2025-06-18"
18095+
type: string
18096+
x-enum-varnames:
18097+
- VERSION_2025_06_18
18098+
SyntheticsMCPServerCapability:
18099+
description: A capability advertised by an MCP server.
18100+
enum:
18101+
- completions
18102+
- experimental
18103+
- logging
18104+
- prompts
18105+
- resources
18106+
- tools
18107+
type: string
18108+
x-enum-varnames:
18109+
- COMPLETIONS
18110+
- EXPERIMENTAL
18111+
- LOGGING
18112+
- PROMPTS
18113+
- RESOURCES
18114+
- TOOLS
1803918115
SyntheticsMobileStep:
1804018116
description: The steps used in a Synthetic mobile test.
1804118117
properties:
@@ -18925,15 +19001,24 @@ components:
1892519001
- UPLOAD_FILES
1892619002
- WAIT
1892719003
SyntheticsTestCallType:
18928-
description: The type of gRPC call to perform.
19004+
description: |-
19005+
The type of call to perform. Used by gRPC steps (`healthcheck`, `unary`)
19006+
and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on
19007+
the parent step's `subtype`.
1892919008
enum:
1893019009
- healthcheck
1893119010
- unary
19011+
- init
19012+
- tool_list
19013+
- tool_call
1893219014
example: unary
1893319015
type: string
1893419016
x-enum-varnames:
1893519017
- HEALTHCHECK
1893619018
- UNARY
19019+
- INIT
19020+
- TOOL_LIST
19021+
- TOOL_CALL
1893719022
SyntheticsTestCiOptions:
1893819023
description: CI/CD options for a Synthetic test.
1893919024
properties:
@@ -19434,6 +19519,8 @@ components:
1943419519
isMessageBase64Encoded:
1943519520
description: Whether the message is base64 encoded.
1943619521
type: boolean
19522+
mcpProtocolVersion:
19523+
$ref: "#/components/schemas/SyntheticsMCPProtocolVersion"
1943719524
message:
1943819525
description: Message to send for UDP or WebSocket tests.
1943919526
type: string
@@ -19478,6 +19565,14 @@ components:
1947819565
description: Timeout in seconds for the test.
1947919566
format: double
1948019567
type: number
19568+
toolArgs:
19569+
additionalProperties: {}
19570+
description: Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.
19571+
type: object
19572+
toolName:
19573+
description: The name of the MCP tool to call. Required when `callType` is `tool_call`.
19574+
example: search
19575+
type: string
1948119576
url:
1948219577
description: URL to perform the test with.
1948319578
example: "https://example.com"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-05-19T12:57:16.691Z

cassettes/features/v1/synthetics/Create-an-API-test-with-MCP-steps-returns-OK-Returns-the-created-test-details-response.yml

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Create an API test with MCP steps returns "OK - Returns the created test details." response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5+
6+
body = DatadogAPIClient::V1::SyntheticsAPITest.new({
7+
config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
8+
steps: [
9+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
10+
name: "Initialize MCP session",
11+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::MCP,
12+
allow_failure: false,
13+
is_critical: true,
14+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
15+
count: 0,
16+
interval: 300,
17+
}),
18+
assertions: [
19+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
20+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
21+
type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
22+
target: 200,
23+
}),
24+
DatadogAPIClient::V1::SyntheticsAssertionMCPRespectsSpecification.new({
25+
type: DatadogAPIClient::V1::SyntheticsAssertionMCPRespectsSpecificationType::MCP_RESPECTS_SPECIFICATION,
26+
}),
27+
DatadogAPIClient::V1::SyntheticsAssertionMCPServerCapabilitiesTarget.new({
28+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::CONTAINS,
29+
type: DatadogAPIClient::V1::SyntheticsAssertionMCPServerCapabilitiesType::MCP_SERVER_CAPABILITIES,
30+
target: [
31+
DatadogAPIClient::V1::SyntheticsMCPServerCapability::TOOLS,
32+
],
33+
}),
34+
],
35+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
36+
url: "https://example.org/mcp",
37+
call_type: DatadogAPIClient::V1::SyntheticsTestCallType::INIT,
38+
mcp_protocol_version: DatadogAPIClient::V1::SyntheticsMCPProtocolVersion::VERSION_2025_06_18,
39+
headers: {
40+
"DD-API-KEY" => "fake-api-key", "DD-APPLICATION-KEY" => "fake-app-key",
41+
},
42+
}),
43+
}),
44+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
45+
name: "List MCP tools",
46+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::MCP,
47+
allow_failure: false,
48+
is_critical: true,
49+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
50+
count: 0,
51+
interval: 300,
52+
}),
53+
assertions: [
54+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
55+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
56+
type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
57+
target: 200,
58+
}),
59+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
60+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::MORE_THAN,
61+
type: DatadogAPIClient::V1::SyntheticsAssertionType::MCP_TOOL_COUNT,
62+
target: 0,
63+
}),
64+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
65+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
66+
type: DatadogAPIClient::V1::SyntheticsAssertionType::MCP_TOOL_NAME_LENGTH,
67+
target: 64,
68+
}),
69+
DatadogAPIClient::V1::SyntheticsAssertionMCPRespectsSpecification.new({
70+
type: DatadogAPIClient::V1::SyntheticsAssertionMCPRespectsSpecificationType::MCP_RESPECTS_SPECIFICATION,
71+
}),
72+
],
73+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
74+
url: "https://example.org/mcp",
75+
call_type: DatadogAPIClient::V1::SyntheticsTestCallType::TOOL_LIST,
76+
mcp_protocol_version: DatadogAPIClient::V1::SyntheticsMCPProtocolVersion::VERSION_2025_06_18,
77+
headers: {
78+
"DD-API-KEY" => "fake-api-key", "DD-APPLICATION-KEY" => "fake-app-key",
79+
},
80+
}),
81+
}),
82+
DatadogAPIClient::V1::SyntheticsAPITestStep.new({
83+
name: "Call MCP search tool",
84+
subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::MCP,
85+
allow_failure: false,
86+
is_critical: true,
87+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
88+
count: 0,
89+
interval: 300,
90+
}),
91+
assertions: [
92+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
93+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
94+
type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
95+
target: 200,
96+
}),
97+
DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
98+
operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
99+
type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
100+
target: 5000,
101+
}),
102+
DatadogAPIClient::V1::SyntheticsAssertionMCPRespectsSpecification.new({
103+
type: DatadogAPIClient::V1::SyntheticsAssertionMCPRespectsSpecificationType::MCP_RESPECTS_SPECIFICATION,
104+
}),
105+
],
106+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
107+
url: "https://example.org/mcp",
108+
call_type: DatadogAPIClient::V1::SyntheticsTestCallType::TOOL_CALL,
109+
mcp_protocol_version: DatadogAPIClient::V1::SyntheticsMCPProtocolVersion::VERSION_2025_06_18,
110+
tool_name: "search",
111+
tool_args: {
112+
"limit": "5", "query": "datadog synthetics",
113+
},
114+
headers: {
115+
"DD-API-KEY" => "fake-api-key", "DD-APPLICATION-KEY" => "fake-app-key",
116+
},
117+
}),
118+
}),
119+
],
120+
}),
121+
locations: [
122+
"aws:us-east-2",
123+
],
124+
message: "BDD test payload: synthetics_api_test_mcp_payload.json",
125+
name: "Example-Synthetic",
126+
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
127+
min_failure_duration: 10,
128+
min_location_failed: 1,
129+
monitor_name: "Example-Synthetic",
130+
monitor_priority: 5,
131+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
132+
count: 3,
133+
interval: 1000,
134+
}),
135+
tick_every: 900,
136+
}),
137+
subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::MULTI,
138+
tags: [
139+
"testing:api",
140+
],
141+
type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
142+
})
143+
p api_instance.create_synthetics_api_test(body)

examples/v1/synthetics/UpdateBrowserTest.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@
3030
DatadogAPIClient::V1::SyntheticsTestRequestBodyFile.new({}),
3131
],
3232
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
33+
mcp_protocol_version: DatadogAPIClient::V1::SyntheticsMCPProtocolVersion::VERSION_2025_06_18,
3334
proxy: DatadogAPIClient::V1::SyntheticsTestRequestProxy.new({
3435
url: "https://example.com",
3536
}),
3637
service: "Greeter",
38+
tool_name: "search",
3739
url: "https://example.com",
3840
}),
3941
variables: [

0 commit comments

Comments
 (0)