Skip to main content
Glama

mp_replace_passage

Replaces a uniquely matched passage in a WeChat Official Account draft body, then verifies the written result to confirm the edit.

Instructions

局部替换唯一匹配的正文文字,并核对写入结果。

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": {
      "old_text": "<old_text>",
      "new_text": "<new_text>"
    },
    "name": "mp_replace_passage"
  }
}

Input Schema

NameRequiredDescriptionDefault
new_textYes
old_textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose two non-obvious traits — the replacement is local and requires a unique match, and the tool verifies the written result ('核对写入结果') — but it never says what happens on a non-unique match, whether existing text is overwritten destructively, or whether the change is reversible.

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?

A single compact sentence with the scoping constraint and the verification behavior front-loaded; nothing is redundant. Its brevity is efficient, though it sits close to the edge of under-specification for a mutation tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a destructive write tool with no annotations, no output schema, and zero parameter descriptions, so the description must do the heavy lifting. It covers the core action but leaves the failure mode, overwrite semantics, and result-check outcome unexplained, which is not enough for an agent to call it safely.

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 description coverage is 0%, so the two parameters rely on their names ('Old Text'/'New Text'). The description partially compensates by implying old_text is the exact passage to be located and must occur exactly once, but adds nothing about matching rules, whitespace handling, or length constraints.

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?

States a specific verb and resource ('局部替换…正文文字' = locally replace body text) plus a meaningful scope constraint that the target must be uniquely matched ('唯一匹配'). That constraint alone distinguishes it from broad-write siblings like mp_write_body or mp_set_field, though no sibling is named explicitly.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named. The only usable signal is the implicit precondition that old_text must match exactly once, which a reader must infer from '唯一匹配' rather than being told what to do when several matches exist.

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