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

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

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 / enum
      Previous value: -[
      -  "LINKEDIN",
      -  "YOUTUBE",
      -  "INSTAGRAM",
      -  "FACEBOOK",
      -  "TIKTOK",
      -  "PINTEREST",
      -  "THREADS",
      -  "BLUESKY",
      -  "TWITTER",
      -  "MASTODON",
      -  "GOOGLE_BUSINESS"
      -]New value: +[
      +  "LINKEDIN",
      +  "YOUTUBE",
      +  "INSTAGRAM",
      +  "FACEBOOK",
      +  "TIKTOK",
      +  "PINTEREST",
      +  "THREADS",
      +  "BLUESKY",
      +  "TWITTER",
      +  "MASTODON",
      +  "GOOGLE_BUSINESS",
      +  "TUMBLR"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "LINKEDIN",
      -  "YOUTUBE",
      -  "INSTAGRAM",
      -  "FACEBOOK",
      -  "TIKTOK",
      -  "PINTEREST",
      -  "THREADS",
      -  "BLUESKY",
      -  "TWITTER",
      -  "MASTODON"
      -]New value: +[
      +  "LINKEDIN",
      +  "YOUTUBE",
      +  "INSTAGRAM",
      +  "FACEBOOK",
      +  "TIKTOK",
      +  "PINTEREST",
      +  "THREADS",
      +  "BLUESKY",
      +  "TWITTER",
      +  "MASTODON",
      +  "GOOGLE_BUSINESS"
      +]
  3. 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"
  4. 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#"
  5. Added

TDQS

A4.6/5.0
Behavior5/5

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

With annotations already covering side-effect safety, the description adds substantial context: it states that no post is saved or published, discloses the ai.generate permission and the exact 403 error, quantifies the cost at 2 AI credits including refund behavior and own-provider-key exemption, and instructs the agent not to retry when credits are exhausted. It also confirms cost parity with generate_caption.

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?

The text is front-loaded with the operation and return value, and each sentence carries operational value (permissions, credits, no-credit handling). The credit and permission material is dense and could be structured more crisply, but nothing is truly superfluous.

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?

Given 5 parameters, full schema coverage, annotations, and an output schema, the description fills the remaining gaps an agent needs: side-effect expectations, permission requirements, credit cost and refund rules, failure handling, and the return shape. Nothing material is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds workflow-level meaning beyond the schema: examples of prompt instructions and the specific use of partialText for continuing a partly written caption. The platform guidance largely duplicates the schema's own description, and workspaceId is not mentioned in the description, so it is not a full supplement.

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?

The first sentence states a specific verb and resource ('Rewrite an existing caption following an instruction') and explicitly distinguishes it from generation of new captions by saying 'existing'. It also declares the return shape and that nothing is saved or posted, so an agent can tell exactly what this does versus siblings like generate_caption.

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?

The description gives clear usage contexts: pass partialText to continue a draft, pass platform to hit a character limit, and check the output before posting. It also covers failure paths (403 permission_denied, exhausted credits -> explain and do not retry). It stops short of an explicit 'use generate_caption instead for new captions' routing statement, so it is not a full when/when-not/alternatives guide.

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