Skip to main content
Glama

Refine Caption

refine_caption

Rewrite an existing caption following an instruction, such as "shorter", "more playful" or "add a question at the end". Returns { caption }, the rewritten text; nothing is saved or posted. Send partialText to continue from a partly written caption. Pass platform to target that platform's character limit; check the returned text before posting. Needs the ai.generate permission, which Admin, Editor and Contributor hold and Viewer does not (403 permission_denied). Each call spends 2 of the member's AI credits (the member who signed in or created the key), refunded if generation fails, unless the member has their own AI provider key connected in AdaptlyPost. With no credits left the call fails: explain that generation is unavailable with the current credit balance and do not retry automatically. Costs the same as generate_caption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesHow the caption should change (max 2000 characters)
platformNoPlatform the caption is for; generation targets that platform's character limit; check the returned text before posting
partialTextNoA partly written caption to continue from (max 10000 characters)
workspaceIdNoWorkspace to act in: an id from list_workspaces. Omit to act in the workspace list_workspaces marks current. Use the same workspaceId for every call about the same workspace, since ids from one workspace (accounts, posts, uploads) do not exist in another
originalTextYesThe caption to rewrite (max 10000 characters)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoAn object with caption: the rewritten text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / platform / description
      Previous value: -"Platform the caption is for; the result is kept within that platform's character limit"New value: +"Platform the caption is for; generation targets that platform's character limit; check the returned text before posting"
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  3. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false): it states nothing is saved or posted, names the required permission and which roles hold it, documents the 403 permission_denied code, quantifies the cost as 2 AI credits with refund-on-failure semantics, and prescribes behavior when credits run out (explain unavailability, do not auto-retry). This is unusually rich behavioral disclosure for a generation tool.

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?

Front-loads the core purpose in the first clause, then layers operational details in a single dense paragraph with no filler. Some sentences pack permission, credit, and failure semantics together, which is heavy but each clause earns its place.

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

Completeness5/5

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

With an output schema present, return values need not be explained, yet the description still states it returns { caption }. Between the description and annotations, an agent has purpose, permission model, cost, failure handling, and non-persistence — everything needed to invoke correctly.

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 documents all five parameters, including platform's enum and the partialText/originalText distinction. The description reinforces the purpose of platform and partialText but adds little syntax or interaction detail beyond the schema (e.g., it does not say how partialText and the required originalText combine). Baseline 3 is appropriate.

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?

States a specific verb and resource ("Rewrite an existing caption following an instruction") and immediately distinguishes itself from the sibling generate_caption by operating on an existing caption rather than producing a new one. The example instructions ("shorter", "more playful") make the operation concrete.

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?

Gives clear contextual triggers: send partialText to continue a partly written caption, pass platform to target a character limit, check the returned text before posting, and compares cost to generate_caption. It never states the inverse routing rule (use generate_caption when there is no existing caption to rewrite), so the alternative is implied rather than explicit.

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