remove_background

Cut out a photo with Wavegrain's MCP server: the remove_background tool needs the generate permission. Inputs, outputs and an example call.

Cut out a photo. Permission: generate. Changes saved work.

Cut out a photo's background as a new image; the photo stays. Answers its imageId for an image slot. Costs 1 credit; state the cost first.

Inputs

InputTypeRequiredNotes
imageobjectyesExactly one image source.
maxCreditsintegeryesMost credits this call may spend; refused, spending nothing, if it could cost more. 0 to 1000

The fields inside an object or a list are in the JSON Schema at /developers/mcp-tools.json.

Returns

FieldTypeNotes
imageIdstringThe new image's id.
imageobjectThe image object: put it in a slide's image slot as is.
widthnumberWidth in pixels.
heightnumberHeight in pixels.
creditsChargednumberCredits this call spent.

Example call

Send it to POST https://wavegrain.com/api/mcp with an access key that has the generate permission; Authentication shows how to make one.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "remove_background",
    "arguments": {
      "image": {
        "candidate": "<candidate>"
      },
      "maxCredits": 1
    }
  }
}

The call shows only the required inputs, with placeholder values: put your own in.

Something wrong or missing? Write to support@wavegrain.com.