Skip to main content
Glama

image.compress

Compress an image by providing a URL or base64 data. Returns compressed bytes with adjustable format, quality, lossy mode, and effort.

Instructions

Compress an image (fetch by URL OR pass base64 inline). Returns compressed bytes (base64 in MCP transport). Provide exactly one of url | imageBase64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
lossyNo
effortNo
formatNo
qualityNo
imageBase64NoBase64-encoded source image bytes (≤ 3.3MB binary).
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions the return format (compressed bytes in base64) and the exclusive-or constraint, but does not disclose rate limits, error handling, or side effects of lossy compression.

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?

The description is concise with two sentences, no redundancy. It could be slightly improved with structure, but it efficiently conveys key information.

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

Completeness2/5

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

Given 6 parameters and no output schema or annotations, the description is incomplete. It does not explain return value details, parameter behaviors, or possible error states, leaving the agent with insufficient context.

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

Parameters2/5

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

With only 17% schema description coverage, the description adds meaning only for url and imageBase64 (exactly one). It does not explain the effects of 'format', 'quality', 'lossy', or 'effort' parameters, which are left to the schema.

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 clearly states the verb 'compress' and the resource 'image', with two methods: fetch by URL or pass base64. It is specific and distinguishes from any sibling tools, as there is no other compress tool in the list.

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?

It explicitly states 'Provide exactly one of url | imageBase64', giving a clear constraint. It does not mention alternatives, but the tool is single-purpose with no direct sibling, so the context is sufficient.

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/2s-io/sdk'

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