Skip to main content
Glama
tecspda

listmonk-mcp-ts

replace_in_campaign_body

Destructive

Replaces every exact, case-sensitive occurrence of text in a campaign body and saves it, reporting the count; leaves the campaign unchanged if no match is found.

Instructions

Replace every occurrence of a literal text in a campaign's body (case-sensitive, not a regex) and save the campaign. Reports how many replacements were made and changes nothing if the text is not found. For patterns use regex_replace_in_campaign_body; for several replacements in one save use batch_replace_in_campaign_body.

Input Schema

NameRequiredDescriptionDefault
searchYesExact text to find (case-sensitive, not a regex)
replaceYesText to put in place of every match; may be empty to delete
campaign_idYesCampaign ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / replace / description
      Previous value: -"Replacement text"New value: +"Text to put in place of every match; may be empty to delete"
    • changedInput schema / properties / search / description
      Previous value: -"Search text"New value: +"Exact text to find (case-sensitive, not a regex)"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the write/destructive/non-idempotent profile, but the description adds real value beyond them: case-sensitive literal matching, a no-op when the search text is absent ('changes nothing if the text is not found'), and that a replacement count is reported. The only gap is not saying whether it edits the HTML source or the plain-text body, which matters for a destructive edit.

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?

Three compact clauses: what it does, its no-match behavior and return signal, then sibling routing. No filler, and the core action is front-loaded ahead of the disambiguation.

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 3-parameter mutation tool with no output schema, the description covers the action, the match semantics, the no-op case, the reported count, and the alternatives. Only the scope of 'body' (HTML vs. text) is left implicit, which is a minor but non-trivial omission for a destructive edit.

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 coverage is 100% and each parameter is documented inline, so the schema does the heavy lifting. The description's 'literal text (case-sensitive, not a regex)' partially restates the search parameter's own description; it adds no new semantics about campaign_id or the empty-replace deletion case. Baseline 3 applies.

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 ('Replace every occurrence of a literal text in a campaign's body ... and save the campaign') and immediately distinguishes itself from regex_replace_in_campaign_body and batch_replace_in_campaign_body. An agent can select it without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes to alternatives by condition: patterns → regex_replace_in_campaign_body, multiple replacements in one save → batch_replace_in_campaign_body. The literal/case-sensitive constraint additionally implies when not to use this tool.

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