matrix_addition
Add two matrices by providing matching lists of lists; returns the summed matrix or an error if dimensions are incompatible.
Instructions
Adds two matrices.
Args: matrix_a: The first matrix as a list of lists. matrix_b: The second matrix as a list of lists.
Returns: On success: {"result": } On error: {"error": }
Examples: >>> matrix_addition([[1, 2], [3, 4]], [[5, 6], [7, 8]]) {'result': [[6, 8], [10, 12]]}
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": {
"matrix_a": "<matrix_a>",
"matrix_b": "<matrix_b>"
},
"name": "matrix_addition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matrix_a | Yes | ||
| matrix_b | Yes |