Skip to main content
Glama

Tanod Text

utilpeek: find and replace in text (literal or RE2 regex)

text_replace
Read-onlyIdempotent

utilpeek: Find and replace in text. Returns the text with find replaced: literally, or as a regular expression on RE2 only (linear time for any pattern: no backtracking, so no ReDoS; backreferences and lookaround are refused), with \1 / \g in the replacement; at most max_replacements (limit_reached reported). Input: text, find, replace, optional mode, case_sensitive, multiline, dot_all and max_replacements. A pattern RE2 cannot compile is a 422 invalid_pattern (not charged). Typically under 0.5 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. Tanod does not log or store the submitted text; it is processed in memory for this answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findYesLiteral text, or an RE2 pattern (mode=regex; no backreferences or lookaround; \p{L} for letters).
modeNoliteral (default: find is plain text) or regex (find is an RE2 pattern).literal
textYesThe text (at most 200,000 characters).
dot_allNoregex: . also matches a newline.
replaceYesReplacement; regex mode: \1..\99, \g<name>, \\ for a backslash.
multilineNoregex: ^ and $ match at line breaks.
case_sensitiveNoMatch letter case exactly (default true); false ignores case.
max_replacementsNoReplace at most this many matches, first to last (1-10,000, default 10,000).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
textNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
engineNo
sourceNo
replacementsNo
limit_reachedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / case_sensitive / description
      Added value: +"Match letter case exactly (default true); false ignores case."
    • addedInput schema / properties / max_replacements / description
      Added value: +"Replace at most this many matches, first to last (1-10,000, default 10,000)."
    • addedInput schema / properties / mode / description
      Added value: +"literal (default: find is plain text) or regex (find is an RE2 pattern)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "engine": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "limit_reached": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "mode": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "replacements": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "text": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources