Skip to main content
Glama

Generate Alt Text from File

generate_alt_text_from_file
Destructive

Generates alt text from a local image file by uploading it to AltText.ai. Supports custom languages, keywords, and overwriting existing alt text.

Instructions

Generate alt text from a local image file. Reads a file on the MCP server machine and uploads it to AltText.ai. Uses account credits; additional languages and image conversion can increase the total. Can overwrite existing alt text when requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoComma-separated language codes (e.g. 'en', 'en,fr,es')
tagsNoTags for organization
asset_idNoCustom asset ID (default: auto-generated hash)
keywordsNoKeywords to incorporate
metadataNoCustom metadata (string key-value pairs)
file_pathYesAbsolute path to a local image file
max_charsNoMaximum character length for the alt text
overwriteNoOverwrite existing alt text if image was previously processed
gpt_promptNoCustom prompt template. Use {{AltText}} as a placeholder for the generated alt text.
negative_keywordsNoKeywords to avoid

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already signal destructiveness and non-read-only, and the description adds genuinely useful context: local file system reads, the external AltText.ai upload, account credit consumption, and cost increases from extra languages and image conversion. The overwrite caveat ('when requested') aligns coherently with destructiveHint=true, with no contradiction.

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?

Four sentences, each carrying distinct operational information, with the core purpose front-loaded in the first sentence. There is no filler, no repetition of schema content, and each clause — local file access, upload target, credit cost, overwrite behavior — earns its place.

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 10-parameter tool with a nested object and external side effects, the description covers the key operational facts: server-side file access, upload destination, cost implications, and overwrite behavior. It does not describe the return value, which is a moderate gap given no output schema exists, but the fully documented parameters keep it functional.

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 baseline of 3 applies — all 10 parameters are already documented in the schema. The description adds a small amount of meaning by tying the lang parameter to increased credit usage, but nothing else beyond what the schema 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?

Opens with a specific verb and resource: 'Generate alt text from a local image file,' then clarifies the mechanism: 'Reads a file on the MCP server machine and uploads it to AltText.ai.' This clearly distinguishes it from the sibling generate_alt_text, which is the main confusion risk, by grounding it in local file input.

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?

The description implies its niche — local files on the server machine — but never explicitly states when to prefer it over the sibling generate_alt_text or any other alternative. No when-not-to-use guidance or exclusion criteria is given, leaving the agent to infer routing.

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