Skip to main content
Glama

ai_prompt_optimize

Read-onlyIdempotent

AI Prompt Optimizer: rewrite a rough prompt into a clear, structured prompt for a target model (general, chatgpt, claude, grok). AI-generated: review before use.

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": {
      "prompt": "<prompt>"
    },
    "name": "ai_prompt_optimize"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoGoal as text.
promptYesPrompt as text.
targetNoTarget: one of general, chatgpt, claude, grok.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already establish this as a read-only, idempotent, non-destructive, closed-world operation, so the safety bar is largely covered. The description adds one real behavioral caveat, 'AI-generated: review before use,' but says nothing about length limits, output shape, or model-specific differences beyond the enum 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.

Conciseness4/5

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

Two short sentences with the action and target list front-loaded and no wasted prose. Minor redundancy comes from the 'AI Prompt Optimizer:' prefix, which restates the tool name before any useful content.

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?

For a simple three-parameter helper the description is adequate, but with no output schema it should say what comes back (the rewritten prompt, any notes on changes) and whether the result is returned inline. The 'review before use' caveat is helpful but incomplete without describing the return value.

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%, including an enumerated target field, so the schema already explains all three parameters. The description only repeats the target values (general, chatgpt, claude, grok) and adds no meaning about the optional 'goal' field or how prompt and goal interact, so 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?

The description names a specific verb and resource: rewriting a rough prompt into a clear, structured prompt, and scopes it to a target model. That is clear enough to separate it from sibling tools like ai_content_repurpose or analyze_readability, but it does not explicitly say how it differs from other prompt/text tools.

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?

Use is only implied: an agent can infer the tool fits when it has a rough prompt and wants it restructured for a particular model. No when-not conditions, prerequisites, or named alternatives appear, so the agent has to decide on its own when this is preferable to a plain rewrite.

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