convert_amount

Pack: spoonacular · Endpoint: https://gateway.pipeworx.io/spoonacular/mcp

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

NameTypeRequiredDescription
ingredientNamestringyes
sourceAmountnumberyes
sourceUnitstringyes
targetUnitstringyes

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, or use one-click install buttons:

{
  "mcpServers": {
    "spoonacular": {
      "url": "https://gateway.pipeworx.io/spoonacular/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026