subtract
Subtract two numbers to find the difference. Provide the first and second numbers to get the result.
Instructions
Perform subtraction of two numbers provided in the data object.
Args:
data (TwoNumberOperation): An object containing two numbers, a and b.
Returns:
Dict[str, Any]: A dictionary containing the operation name ("subtract")
and the result of the subtraction if successful, or an error message
if an exception occurs.
Logs:
Logs the subtraction operation and its result in the format:
"SUB | {data.a} - {data.b} = {result}".
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": {
"data": "<data>"
},
"name": "subtract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||