convert_amount
Pack: spoonacular · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/convert_amount for the schema, then POST the same URL with its arguments for the data.
Convert 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).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ingredientName | string | yes | |
sourceAmount | number | yes | |
sourceUnit | string | yes | |
targetUnit | string | yes |
Example call
Arguments
{
"ingredientName": "flour",
"sourceAmount": 1,
"sourceUnit": "cup",
"targetUnit": "g"
}
curl
curl -X POST https://gateway.pipeworx.io/spoonacular/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"convert_amount","arguments":{"ingredientName":"flour","sourceAmount":1,"sourceUnit":"cup","targetUnit":"g"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('convert_amount', {
"ingredientName": "flour",
"sourceAmount": 1,
"sourceUnit": "cup",
"targetUnit": "g"
});
More examples
{
"ingredientName": "butter",
"sourceAmount": 8,
"sourceUnit": "tablespoon",
"targetUnit": "ml"
}
Response shape
Full JSON Schema
{
"type": "object",
"description": "Unit conversion result"
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the spoonacular pack
{
"mcpServers": {
"spoonacular": {
"url": "https://gateway.pipeworx.io/spoonacular/mcp"
}
}
}
See Getting Started for client-specific install steps.