Skip to content

Commit 5ca7f56

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 022caaa of spec repo
1 parent d3c1a2b commit 5ca7f56

18 files changed

Lines changed: 878 additions & 10 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 89 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,41 @@ 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/SyntheticsAssertionType"
16639+
required:
16640+
- type
16641+
- operator
16642+
- target
16643+
type: object
1660516644
SyntheticsAssertionOperator:
1660616645
description: Assertion operator to apply.
1660716646
enum:
@@ -16704,6 +16743,9 @@ components:
1670416743
- connection
1670516744
- multiNetworkHop
1670616745
- jitter
16746+
- mcpServerCapabilities
16747+
- mcpToolNameLength
16748+
- mcpToolCount
1670716749
example: statusCode
1670816750
type: string
1670916751
x-enum-varnames:
@@ -16728,6 +16770,9 @@ components:
1672816770
- CONNECTION
1672916771
- MULTI_NETWORK_HOP
1673016772
- JITTER
16773+
- MCP_SERVER_CAPABILITIES
16774+
- MCP_TOOL_NAME_LENGTH
16775+
- MCP_TOOL_COUNT
1673116776
SyntheticsAssertionXPathOperator:
1673216777
description: Assertion operator to apply.
1673316778
enum:
@@ -18036,6 +18081,31 @@ components:
1803618081
$ref: "#/components/schemas/SyntheticsLocation"
1803718082
type: array
1803818083
type: object
18084+
SyntheticsMCPProtocolVersion:
18085+
description: The MCP protocol version used by the step. See https://modelcontextprotocol.io/specification.
18086+
enum:
18087+
- "2025-06-18"
18088+
example: "2025-06-18"
18089+
type: string
18090+
x-enum-varnames:
18091+
- VERSION_2025_06_18
18092+
SyntheticsMCPServerCapability:
18093+
description: A capability advertised by an MCP server.
18094+
enum:
18095+
- completions
18096+
- experimental
18097+
- logging
18098+
- prompts
18099+
- resources
18100+
- tools
18101+
type: string
18102+
x-enum-varnames:
18103+
- COMPLETIONS
18104+
- EXPERIMENTAL
18105+
- LOGGING
18106+
- PROMPTS
18107+
- RESOURCES
18108+
- TOOLS
1803918109
SyntheticsMobileStep:
1804018110
description: The steps used in a Synthetic mobile test.
1804118111
properties:
@@ -18925,15 +18995,24 @@ components:
1892518995
- UPLOAD_FILES
1892618996
- WAIT
1892718997
SyntheticsTestCallType:
18928-
description: The type of gRPC call to perform.
18998+
description: |-
18999+
The type of call to perform. Used by gRPC steps (`healthcheck`, `unary`)
19000+
and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on
19001+
the parent step's `subtype` and are enforced server-side.
1892919002
enum:
1893019003
- healthcheck
1893119004
- unary
19005+
- init
19006+
- tool_list
19007+
- tool_call
1893219008
example: unary
1893319009
type: string
1893419010
x-enum-varnames:
1893519011
- HEALTHCHECK
1893619012
- UNARY
19013+
- INIT
19014+
- TOOL_LIST
19015+
- TOOL_CALL
1893719016
SyntheticsTestCiOptions:
1893819017
description: CI/CD options for a Synthetic test.
1893919018
properties:
@@ -19434,6 +19513,8 @@ components:
1943419513
isMessageBase64Encoded:
1943519514
description: Whether the message is base64 encoded.
1943619515
type: boolean
19516+
mcpProtocolVersion:
19517+
$ref: "#/components/schemas/SyntheticsMCPProtocolVersion"
1943719518
message:
1943819519
description: Message to send for UDP or WebSocket tests.
1943919520
type: string
@@ -19478,6 +19559,13 @@ components:
1947819559
description: Timeout in seconds for the test.
1947919560
format: double
1948019561
type: number
19562+
toolArgs:
19563+
description: Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.
19564+
type: object
19565+
toolName:
19566+
description: The name of the MCP tool to call. Required when `callType` is `tool_call`.
19567+
example: search
19568+
type: string
1948119569
url:
1948219570
description: URL to perform the test with.
1948319571
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::SyntheticsAssertionType::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+
"query": "datadog synthetics", "limit": "5",
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)