test_code_snippet
Execute a Jython snippet, compare its returned result with an expected value, and optionally validate with a dry run before confirmed execution.
Instructions
Execute a snippet and compare the result with an expected value.
Args:
code: Jython snippet to run.
project: Project context.
expected_result: Optional value to compare against the returned result.
confirm: Must be True to execute.
dry_run: Validate without executing.
Returns: The result, whether it matched, and any error text.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "test_code_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| confirm | No | ||
| dry_run | No | ||
| project | No | ||
| expected_result | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||