Convert Amount
convert_amountConvert a cooking measurement amount for a specific ingredient between units using Spoonacular. Requires ingredientName, sourceAmount, sourceUnit, and targetUnit. Returns the converted amount and unit (e.g. 1 cup flour -> 125 grams).
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sourceUnit": "cup",
"targetUnit": "g",
"sourceAmount": 1,
"ingredientName": "flour"
},
"name": "convert_amount"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceUnit | Yes | ||
| targetUnit | Yes | ||
| sourceAmount | Yes | ||
| ingredientName | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||