Skip to main content
Glama

Rewrite a message by AI (spends credits)

rewrite_message

SPENDS CREDITS: quote_message_rewrite first, show the price, after the user's yes pass its credits, result_id and expected_revision. The new text comes in a few seconds: get_outreach_lead. [REST: POST /api/tasks/{id}/outreach/leads/{cid}/steps/{step_id}/rewrite]

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": {
      "task_id": "<task_id>",
      "cid": "<cid>",
      "step_id": "<step_id>",
      "mode": "<mode>",
      "confirm_credits": "<confirm_credits>"
    },
    "name": "rewrite_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
cidYesThe person's id (cid) from list_leads.
modeYesother_hook (another fact), shorter, warmer, rewrite (with the note).
noteNo
step_idYesThe step id of the message (get_outreach_lead steps[].step_id).
task_idYesThe search id (task id), e.g. from list_searches or create_search.
result_idNo
generation_idNoThe outreach generation id (get_outreach campaign.generation.id); omitted: the current one.
confirm_creditsYesThe price in credits the matching quote returned, shown to the user and confirmed by them.
expected_revisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare non-readonly, non-idempotent, non-destructive; the description adds the crucial facts that this spends credits, requires a prior quote and user confirmation, and returns asynchronously within seconds via get_outreach_lead. That is real behavioral context beyond the annotations, though it doesn't say what happens on a failed or stale revision.

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?

Two tight sentences, credit warning front-loaded, prerequisite and follow-up call each stated once with no filler. The REST endpoint tag is compact and separable.

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 9-parameter, credit-spending, async tool with no output schema, the description covers the cost gate, the confirmation contract, and how to retrieve the result. Remaining gaps are minor: failure modes and the meaning of note/generation_id are left to the schema.

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?

With 67% schema coverage, the description usefully explains that confirm_credits must be the price returned by the matching quote and that result_id and expected_revision come from that quote — three parameters the schema leaves undocumented. It does not explain note or generation_id semantics, so it doesn't fully close the gap.

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 title plus description make clear this is an AI rewrite of an outreach message step, and it names the sibling quote_message_rewrite as the prerequisite and get_outreach_lead as the retrieval path. The description itself never states the verb+resource plainly, relying on the title to do that work, so it falls short of a self-contained 5.

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?

It gives an explicit ordered workflow: call quote_message_rewrite first, show the price, obtain the user's yes, then pass credits/result_id/expected_revision. It does not contrast with edit_outreach_message or apply_message_variant, so the agent gets sequencing but not alternative selection.

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