Skip to main content
Glama
ZornZL
by ZornZL

kb_replace_text

Replaces a literal text fragment in a page while preserving formatting, enabling corrections, outdated value updates, and wording fixes.

Instructions

把页面中一段字面文字替换掉(保留样式)。用于纠错、更新过期数值、修正措辞。

这是唯一会改写原文的工具,用之前必须 kb_read 确认 search 片段准确。

Input Schema

NameRequiredDescriptionDefault
reasonNo
searchYes
replaceYes
node_tokenYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 usefully discloses that this is a mutating rewrite that preserves formatting and that a read-verify step is mandatory, but says nothing about match scope (first occurrence vs all), behavior when the search string is absent, reversibility, or permission requirements.

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 short sentences, front-loaded with the action, then use cases, then the safety precondition. No filler; the prerequisite is placed last so it reads as a gate right before invocation.

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

Completeness3/5

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

An output schema exists, so return values need not be described. But for a destructive rewrite with zero annotations and zero schema coverage, the description is thin: it omits match semantics, failure behavior, and the meaning of node_token, all of which an agent needs before mutating a page.

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 description must compensate and it only partly does: 'search fragment' implies an exact literal match string and 'replace' the substitute text. node_token (which page/node to target) and the optional reason parameter receive no explanation anywhere, leaving half the parameters undocumented.

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 a literal span of text inside a page while preserving style. It also distinguishes itself from siblings by declaring it is the only tool that rewrites existing original text, so an agent can route between it and kb_append/kb_create without inspecting schemas.

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?

Gives concrete use cases (fixing typos, updating stale values, correcting wording) plus a hard prerequisite: call kb_read first to confirm the search fragment. It does not explicitly say when NOT to use it (e.g. adding new content should go to kb_append), so the exclusion is implied rather than stated.

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