Skip to main content
Glama
SkillfulElectro

url-context-mcp

fetch_image

Fetches an image from a URL (absolute or relative) and returns it as base64 so the model can view it. Compresses oversized images to fit the specified size.

Instructions

Fetch an image from a URL (absolute or relative to a base page) and return it as base64 image content that the model can see. Use when a page's markdown contains relative image URLs (e.g. logo) and you need to view the image. Optional compression can shrink oversized images to fit within maxSizeKB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesImage URL. Can be absolute (http/https) or relative; if relative, baseUrl is required.
baseUrlNoBase/context URL to resolve a relative image URL against (the page the image was found on).
compressNoIf true, an oversized image will be compressed (resized + quality-reduced, output JPEG) to fit within maxSizeKB instead of being rejected.
maxSizeKBNoMax image size in KB to return (rejects or compresses larger images).
compressQualityNoJPEG quality percentage when compressing (1-100, default 75). Lower = smaller file.
compressMaxWidthNoMaximum width in pixels when compressing (preserves aspect ratio).
compressMaxHeightNoMaximum height in pixels when compressing (preserves aspect ratio).
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the base64 return format and optional compression, but it does not explain what happens when an image exceeds maxSizeKB and compress is false (rejection behavior), nor does it mention error handling. This is a partial disclosure, so a 3 is appropriate.

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?

The description is three sentences, front-loaded with the core function, followed by the use case and the key feature. Every sentence contributes value and there is no redundancy or fluff.

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?

The description covers the main purpose, the relative URL scenario, and the compression option. It is complete enough for a tool with a well-documented schema, though it could mention the rejection behavior for oversized images. Given the absence of an output schema, the base64 return is mentioned, which is important.

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?

The input schema describes all 7 parameters with 100% coverage, so the baseline is 3. The description adds a little context by mentioning compression in relation to oversized images and the relative URL use case, but it does not significantly expand on what the schema already provides.

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?

The description uses a specific verb ('Fetch') with a clear resource ('an image from a URL') and specifies the output format ('base64 image content'). It also includes a concrete use case with relative image URLs, effectively distinguishing it from sibling tools like fetch_url.

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

Usage Guidelines4/5

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

The description explicitly states when to use the tool: 'Use when a page's markdown contains relative image URLs... and you need to view the image.' It provides clear context but does not explicitly list alternatives or when-not-to-use scenarios, so it doesn't earn a 5.

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/SkillfulElectro/url-context-mcp'

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