Skip to main content
Glama

optimizePrompt

Transforms, expands, or compresses an existing prompt. Supports format targeting for image generation (Midjourney, DALL-E, Flux), video generation (Sora, Runway), clean code (Cursor, Claude), and general productivity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoFormat-specific tags: aspect_ratio, lighting, camera, language, framework.
formatNoThe target medium or task format: image, video, code, or productivity.productivity
promptYesThe user's raw prompt or text to optimize, expand, or shorten.
operationNooptimize to polish; expand to add sensory details and parameters; shorten to compress into token-efficient power prompts.optimize
negative_promptNoWhether to return negative prompt tags.
target_platformNoTarget AI model (e.g. midjourney, flux, sora, cursor, claude, chatgpt).universal

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoThe target format.
optimized_promptNoThe engineered, high-performance prompt.
credits_remainingNoUser remaining credits.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=false, so the mutating/open-world nature is covered structurally. The description adds that the tool rewrites rather than creates and that output is tailored per platform, but says nothing about cost/token consumption (relevant given the getAccountUsage sibling) or 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and followed by the format-target detail. No filler, though the second sentence is essentially a list expansion of schema enums rather than new information.

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, so return values need not be described, and annotations cover safety. However, for a tool in a set with generatePrompt and getAccountUsage, the description omits any cost/quota implications and gives no routing guidance, leaving an agent to infer the workflow.

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 enum values, defaults, and tag semantics are fully documented in the input schema. The description only echoes the format targeting (image/video/code/productivity) and platform examples already present in the schema, adding no new parameter syntax or constraints.

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?

Names a specific verb set (transforms, expands, compresses) and a specific resource (an existing prompt), and the word 'existing' implicitly contrasts it with the sibling generatePrompt. It does not explicitly name that sibling, but the resource and action are unambiguous.

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 via 'existing prompt' and the format-targeting list; there is no explicit statement of when to choose this over generatePrompt or when not to use it. The format/platform enumeration gives some context for selection but no exclusions or prerequisites.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources