Skip to main content
Glama

Remove image background

remove_image_background

Create a new image with the background removed. The source file is left unchanged. Returns toolExecutionId; get_tool_execution provides status and results with the output image fileId and downloadUrl.

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": {
      "imageFileId": "<imageFileId>"
    },
    "name": "remove_image_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageFileIdYesImage to transform. Use fileId from upload_file, list_files, or a succeeded image-generation result.

Output Schema

NameRequiredDescriptionDefault
errorNoError details when status is failed; otherwise null.
statusNoJob status: pending, running, succeeded, failed, or cancelled.
resultsNoGenerated results with download URLs when succeeded.
toolTypeNoTool name (e.g. GENERATE_IMAGE).
attemptIndexNoCurrent or latest attempt index.
toolExecutionIdYesTool execution id (vg_tool_...).
progressPercentageNoCompletion progress 0-100 (present after polling).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed33 schema fields changed
    • changedOutput schema / properties / error / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Machine-readable error code."
      -      },
      -      "internalErrorCode": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Opaque code for support."
      -      },
      -      "message": {
      -        "description": "Human-readable error description.",
      -        "type": "string"
      -      },
      -      "requirement": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "properties": {
      -              "details": {
      -                "additionalProperties": {
      -                  "type": "string"
      -                },
      -                "propertyNames": {
      -                  "type": "string"
      -                },
      -                "type": "object"
      -              },
      -              "type": {
      -                "description": "Requirement type (e.g. purchase_add_on).",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "What is needed to resolve the error, when applicable."
      -      }
      -    },
      -    "required": [
      -      "message"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "code": {
      +        "description": "Machine-readable error code.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "internalErrorCode": {
      +        "description": "Opaque code for support.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "message": {
      +        "description": "Human-readable error description.",
      +        "type": "string"
      +      },
      +      "requirement": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "properties": {
      +              "details": {
      +                "additionalProperties": {
      +                  "type": "string"
      +                },
      +                "propertyNames": {
      +                  "type": "string"
      +                },
      +                "type": "object"
      +              },
      +              "type": {
      +                "description": "Requirement type (e.g. purchase_add_on).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "What is needed to resolve the error, when applicable."
      +      }
      +    },
      +    "required": [
      +      "message"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / results / items / properties / downloadUrl / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / downloadUrl / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / downloadUrlExpiresAt / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / downloadUrlExpiresAt / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / results / items / properties / file / properties / downloadSource / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "description": "A file rendition source (thumbnail, preview, download, …).",
      -    "properties": {
      -      "expiresAt": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Unix expiry for url."
      -      },
      -      "fileBytes": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition size in bytes."
      -      },
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition height in pixels."
      -      },
      -      "status": {
      -        "description": "Rendition status.",
      -        "enum": [
      -          "pending",
      -          "ready",
      -          "failed",
      -          "skipped"
      -        ],
      -        "type": "string"
      -      },
      -      "url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Signed URL when status is ready."
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition width in pixels."
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "description": "A file rendition source (thumbnail, preview, download, …).",
      +    "properties": {
      +      "expiresAt": {
      +        "description": "Unix expiry for url.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "fileBytes": {
      +        "description": "Rendition size in bytes.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "height": {
      +        "description": "Rendition height in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "description": "Rendition status.",
      +        "enum": [
      +          "pending",
      +          "ready",
      +          "failed",
      +          "skipped"
      +        ],
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Signed URL when status is ready.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "width": {
      +        "description": "Rendition width in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / downloadUrl / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / downloadUrl / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / downloadUrlExpiresAt / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / downloadUrlExpiresAt / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / durationSeconds / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / durationSeconds / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / results / items / properties / file / properties / hlsSource / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "description": "A file rendition source (thumbnail, preview, download, …).",
      -    "properties": {
      -      "expiresAt": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Unix expiry for url."
      -      },
      -      "fileBytes": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition size in bytes."
      -      },
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition height in pixels."
      -      },
      -      "status": {
      -        "description": "Rendition status.",
      -        "enum": [
      -          "pending",
      -          "ready",
      -          "failed",
      -          "skipped"
      -        ],
      -        "type": "string"
      -      },
      -      "url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Signed URL when status is ready."
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition width in pixels."
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "description": "A file rendition source (thumbnail, preview, download, …).",
      +    "properties": {
      +      "expiresAt": {
      +        "description": "Unix expiry for url.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "fileBytes": {
      +        "description": "Rendition size in bytes.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "height": {
      +        "description": "Rendition height in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "description": "Rendition status.",
      +        "enum": [
      +          "pending",
      +          "ready",
      +          "failed",
      +          "skipped"
      +        ],
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Signed URL when status is ready.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "width": {
      +        "description": "Rendition width in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / results / items / properties / file / properties / previewSource / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "description": "A file rendition source (thumbnail, preview, download, …).",
      -    "properties": {
      -      "expiresAt": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Unix expiry for url."
      -      },
      -      "fileBytes": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition size in bytes."
      -      },
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition height in pixels."
      -      },
      -      "status": {
      -        "description": "Rendition status.",
      -        "enum": [
      -          "pending",
      -          "ready",
      -          "failed",
      -          "skipped"
      -        ],
      -        "type": "string"
      -      },
      -      "url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Signed URL when status is ready."
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition width in pixels."
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "description": "A file rendition source (thumbnail, preview, download, …).",
      +    "properties": {
      +      "expiresAt": {
      +        "description": "Unix expiry for url.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "fileBytes": {
      +        "description": "Rendition size in bytes.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "height": {
      +        "description": "Rendition height in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "description": "Rendition status.",
      +        "enum": [
      +          "pending",
      +          "ready",
      +          "failed",
      +          "skipped"
      +        ],
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Signed URL when status is ready.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "width": {
      +        "description": "Rendition width in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / publicHlsUrl / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / publicHlsUrl / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / publicPlaybackId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / publicPlaybackId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / results / items / properties / file / properties / thumbnailSource / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "description": "A file rendition source (thumbnail, preview, download, …).",
      -    "properties": {
      -      "expiresAt": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Unix expiry for url."
      -      },
      -      "fileBytes": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition size in bytes."
      -      },
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition height in pixels."
      -      },
      -      "status": {
      -        "description": "Rendition status.",
      -        "enum": [
      -          "pending",
      -          "ready",
      -          "failed",
      -          "skipped"
      -        ],
      -        "type": "string"
      -      },
      -      "url": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Signed URL when status is ready."
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Rendition width in pixels."
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "description": "A file rendition source (thumbnail, preview, download, …).",
      +    "properties": {
      +      "expiresAt": {
      +        "description": "Unix expiry for url.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "fileBytes": {
      +        "description": "Rendition size in bytes.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "height": {
      +        "description": "Rendition height in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "description": "Rendition status.",
      +        "enum": [
      +          "pending",
      +          "ready",
      +          "failed",
      +          "skipped"
      +        ],
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Signed URL when status is ready.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "width": {
      +        "description": "Rendition width in pixels.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / thumbnailUrl / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / thumbnailUrl / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / thumbnailUrlExpiresAt / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / thumbnailUrlExpiresAt / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / transcriptText / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / transcriptText / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / file / properties / type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / file / properties / type / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / thumbnailUrl / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / thumbnailUrl / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / results / items / properties / thumbnailUrlExpiresAt / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / results / items / properties / thumbnailUrlExpiresAt / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / imageFileId / description
      Previous value: -"Source image file id."New value: +"Image to transform. Use fileId from upload_file, list_files, or a succeeded image-generation result."
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare a non-destructive, non-idempotent, closed-world write; the description earns credit for adding that the source file is untouched and that the call is asynchronous, returning a toolExecutionId to poll via get_tool_execution. That is real behavioral context beyond the structured hints, though nothing is said about failures, timeouts, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the outcome and side-effect first, then the async handoff. Every sentence carries information; only slight tightening would improve it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter async transform with a rich schema and an output schema, the description covers what matters: what is produced, that the input survives, and how to retrieve the result. An agent can invoke correctly without anything further.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter, and schema coverage is 100% with a description pointing at upload_file, list_files, and image-generation results. The prose adds no further meaning about imageFileId, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a new image with the background removed'), which naturally distinguishes it from remove_video_background in the sibling list. It stops short of naming the alternative explicitly, so it is clear but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage is clear from the operation itself, and the async polling path is implied by naming get_tool_execution. However, it never states prerequisites (a valid uploaded image fileId), supported formats, or when to pick this over upscale_image or vectorize_image, leaving the agent to infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.