Skip to main content
Glama
imgtobase64-mcp-server

imgtobase64-mcp-server

by guiguito

image_url_to_base64

Fetch and convert an image from a URL to base64, returning MIME type, size, dimensions, and a ready-to-use data URI for LLM vision workflows.

Instructions

Fetch an image from a URL and convert it to base64. Returns base64 data, MIME type, size, dimensions, and a ready-to-use data URI.

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": {
      "url": "<url>"
    },
    "name": "image_url_to_base64"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL of the image to convert
timeout_msNoRequest timeout in milliseconds (1000-120000, default 30000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full load. It does disclose the return payload (base64, MIME type, size, dimensions, data URI), which is genuinely useful, but it says nothing about network requirements, error behavior for unreachable URLs, size limits, or whether the fetch has side effects.

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?

Two short sentences, zero wasted words, with the action front-loaded and the return shape following immediately. Nothing could be cut without losing information.

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?

For a two-parameter fetch-and-encode utility the description is nearly sufficient: it explains the transformation and pre-empts the main question by enumerating return fields, standing in for the absent output schema. Only error and failure-mode behavior is unaddressed.

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 description coverage is 100%, with both url and timeout_ms documented including range and default, so the baseline is 3. The description adds no parameter meaning beyond saying the URL points at an image, which is already in the schema.

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?

The description gives a specific verb and resource ('Fetch an image from a URL and convert it to base64') and lists the returned fields. The 'from a URL' phrasing implicitly separates it from the sibling image_file_to_base64, though that sibling is never named.

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?

Usage context is only implied by 'from a URL' — an agent can infer this is for remote images versus local files, but there is no explicit when-to-use statement, no named alternative, and no prerequisites or failure conditions.

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

Deploy Server

Other Tools