Skip to main content
Glama

Honeyfield Marketing MCP

Strapi: Replace text

strapi_replace_text
Destructive

Text in einem Strapi-Eintrag gezielt ersetzen (z. B. einen Link, Satz oder Preis) — ohne das ganze Feld oder die ganze Dynamic Zone neu zu schicken. Schreibt NUR den Draft (Strapi 5); live geht es erst über strapi_publish_entry. replacements: Liste von {search, replace, field?, all?}:

  • search/replace: wörtlicher Text (kein Regex), z. B. {"search": "/kontakt-alt", "replace": "/kontakt"}.

  • field (optional): nur an dieser Stelle ersetzen, z. B. "excerpt" oder "content[2].faqs[0].answer" (Pfad wie im strapi_get_entry-Ergebnis).

  • all (optional, Standard false): alle Vorkommen ersetzen. Ohne all muss search genau EINMAL vorkommen — 0 oder mehrere Treffer brechen ALLE Ersetzungen ab, ohne zu schreiben (failed nennt Anzahl und Fundstellen). Das Tool liest den Draft selbst vollständig (auch tief verschachtelte Sektionen, Repeatables, Medien), ersetzt, schreibt nur die geänderten Felder zurück und liest zur Kontrolle zurück. Hat jemand den Draft zwischen Lesen und Schreiben im Admin geändert, kommt error=concurrent_modification und nichts wird geschrieben. Texte verknüpfter Einträge und Medien werden nicht angefasst. Rückgabe: applied [{search, count, field_paths}], changed_fields, draft_updated_at, verified. entry_id ist die documentId. locale wählt die Sprachversion (bei lokalisierten Content-Types immer angeben, sonst Default-Locale). Nur Strapi 5. Single Types (z. B. 'impressum', 'footer'): Singular-API-ID als collection; der Server spricht sie automatisch über ihre ID-lose Route an. entry_id wird dabei NICHT geprüft (ein Single Type hat nur ein Dokument) — die documentId aus dem Lesen mitgeben, sie dient nur als Platzhalter. collection: API-ID der Collection (Buchstaben, Ziffern, _ und -; keine Plugin-Routen wie users, upload, admin), sonst {"error":"invalid_collection"}. entry_id: documentId bzw. numerische ID (Buchstaben, Ziffern, _ und -), sonst {"error":"invalid_id"}. workspace: Slug des Kunden-Workspace (optional bei nur einem Workspace).

Input Schema

NameRequiredDescriptionDefault
localeNo
entry_idYes
workspaceNo
collectionYes
replacementsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: all-or-nothing semantics when search matches 0 or multiple times, concurrent_modification handling, only-changed-fields write-back, read-back verification, and the fact that linked entries and media are untouched. Also discloses Strapi 5-only scope and single-type handling, which annotations cannot express.

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-loaded with the purpose and the draft-only constraint, then organized into parameter blocks. It is long, and the trailing error-string notes for collection/entry_id sit far from the parameters they describe, but every block carries actionable information.

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?

For a destructive mutation with a complex nested parameter over an undocumented schema, it covers preconditions, failure modes, atomicity, verification and single-type edge cases. Return fields are described even though an output schema exists, which is redundant but not harmful.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden and does: it defines the replacements item shape ({search, replace, field?, all?}), gives the field path syntax including nested repeatables, specifies the default for all and the exact-match precondition, and explains entry_id, locale, collection and workspace semantics.

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 ("Text in einem Strapi-Eintrag gezielt ersetzen") and immediately distinguishes itself from a full-field write ("ohne das ganze Feld oder die ganze Dynamic Zone neu zu schicken"). An agent can separate it from strapi_update_entry and strapi_publish_entry without reading 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 Guidelines4/5

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

Explicitly scopes the effect to the draft and names the follow-up path to live content (strapi_publish_entry), and the example cases (link, sentence, price) make the intended use concrete. It does not state a hard exclusion against strapi_update_entry, but the 'don't resend the whole field' framing implies the choice clearly enough.

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