Skip to main content
Glama

image_rembg

Remove backgrounds from images using a URL input to isolate subjects for design, e-commerce, or content creation.

Instructions

Remove background from an image ($0.003)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesImage URL

Implementation Reference

  • index.js:50-79 (handler)
    The callTool function acts as a generic handler for all registered tools, including 'image_rembg', by dynamically calling the associated endpoint using an API key.
    async function callTool(endpoint, params) {
      const fetch = (await import('node-fetch')).default;
      const isGet = ['GET'].includes((TOOLS.find(t => t.endpoint === endpoint) || {}).method);
      
      const url = isGet 
        ? `${BASE_URL}${endpoint}?${new URLSearchParams(params)}`
        : `${BASE_URL}${endpoint}`;
      
      const res = await fetch(url, {
        method: isGet ? 'GET' : 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${API_KEY}`,
        },
        body: isGet ? undefined : JSON.stringify(params),
      });
      
      const text = await res.text();
      let data;
      try { data = JSON.parse(text); } catch { data = { raw: text }; }
      
      if (!res.ok) {
        if (res.status === 402) {
          throw new Error(`Insufficient credits. Add credits at https://iteratools.com. Cost: ${TOOLS.find(t=>t.endpoint===endpoint)?.price || 'see docs'}`);
        }
        throw new Error(`API error ${res.status}: ${text.substring(0, 200)}`);
      }
      
      return data;
    }
  • index.js:19-19 (registration)
    Tool definition and configuration for 'image_rembg', including its endpoint, schema, and metadata.
    { name: 'image_rembg', description: 'Remove background from an image', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Image URL' } }, required: ['url'] }, endpoint: '/image/rembg', price: '$0.003' },
Behavior3/5

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

No annotations provided, so description carries full burden. Includes valuable cost transparency ($0.003) not found elsewhere. However, lacks disclosure about output format (PNG with alpha channel?), mutation characteristics (source preservation), rate limits, or error conditions (e.g., failure on complex backgrounds).

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

Conciseness5/5

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

Single sentence with zero waste. Front-loaded with the core action, followed by essential cost information in parentheses. Every word earns its place; no redundant or filler content.

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

Completeness4/5

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

Adequate for a single-parameter utility with full schema coverage. Missing only what the return value contains (image data vs URL) since no output schema exists, but the simplicity of the tool makes the purpose sufficiently clear for agent invocation.

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?

Schema coverage is 100% with 'Image URL' clearly describing the url parameter. Description reinforces that the input should be an image ('from an image'), meeting baseline expectations when schema documentation is complete. No additional parameter guidance (supported formats, size limits) provided.

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

Purpose5/5

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

Description provides specific verb ('Remove'), clear resource ('background from an image'), and distinguishes effectively from siblings like image_generate, image_ocr, and image_resize which perform entirely different operations. The pricing annotation further clarifies this is a specific paid processing service.

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?

Implies usage context (when background removal is needed) but lacks explicit when-to-use guidance, prerequisites (e.g., publicly accessible URLs), or format limitations. No comparison to alternative approaches or sibling tools that might overlap in functionality.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fredpsantos33/itera-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server