Skip to main content
Glama

Convert Folder

convert_folder

Batch convert every image in a folder to AVIF or WebP, with options for recursive subfolders, quality control, and custom output location.

Instructions

Batch convert all images in a folder to AVIF or WebP format

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": {
      "inputFolder": "<inputFolder>",
      "outputFormat": "<outputFormat>"
    },
    "name": "convert_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
qualityNoQuality 1-100, default 75
criticalNoIf true, apply 25% quality drop
recursiveNoInclude subfolders, default false
inputFolderYesPath to the input folder
outputFolderNoOptional output folder (default: same as input)
outputFormatYesOutput format
skipExistingNoSkip if output exists, default true

Output Schema

NameRequiredDescriptionDefault
totalYes
failedYes
resultsYes
skippedYes
convertedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and largely fails. It never says that output is written into the input folder by default, that existing files are skipped by default, or that the 'critical' flag silently drops quality by 25% — all mutation-relevant facts buried only in the schema.

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?

A single front-loaded sentence naming verb, resource, and allowed formats with zero filler. Nothing is redundant or misplaced.

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

Completeness3/5

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

An output schema exists and the input schema is fully documented, so return values and parameters are covered elsewhere. However, for a 7-parameter batch write operation with no annotations, the definition says nothing about side effects, overwrite behavior, or where results land, leaving a meaningful gap.

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%, so the schema already explains every parameter including the quality range, recursive, and skipExisting defaults. The description only echoes the format enum and adds no meaning beyond the structured fields; 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 (convert), resource (all images in a folder), and the two target formats (AVIF/WebP). The word 'folder' plus 'batch' implicitly separates it from the single-image sibling convert_image, though no sibling is named explicitly.

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 is only implied: 'batch' and 'folder' suggest this is for whole-directory work rather than a single file. There is no explicit when-to-use, when-not-to-use, or prerequisite guidance (e.g. behavior when outputFolder equals inputFolder).

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