set_variable
Assign a Wolfram Language expression to a variable in the Mathematica kernel session for later use.
Instructions
Set a variable in the Mathematica kernel session.
Args: name: Variable name (e.g., "x", "myData") value: Wolfram Language expression to assign (e.g., "5", "{1,2,3}", "Plot[Sin[x],{x,0,Pi}]")
Returns: Confirmation with the assigned value
Example: set_variable("x", "Range[10]") -> {success: true, value: "{1,2,3,4,5,6,7,8,9,10}"}
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": {
"name": "<name>",
"value": "<value>"
},
"name": "set_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |