Skip to main content
Glama

텍스트 일괄 치환

hwp_replace_text
Destructive

Finds and replaces text across HWP/HWPX document bodies and table cells, with safe write protection via SafeWriter. Use it for bulk text updates while preserving document structure.

Instructions

문서 본문 및 표 셀 내의 텍스트를 찾아 일괄 치환합니다. SafeWriter를 경유합니다. file_path는 절대 경로 권장.

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": {
      "file_path": "<file_path>",
      "find": "<find>",
      "replace": "<replace>"
    },
    "name": "hwp_replace_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYes
forceNo
replaceYes
passwordNo
file_pathYes
allow_lossNo
expected_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation is known. The description adds real value by stating edits route through SafeWriter (implying a safe-write/backup path), but it never explains what a destructive replace means for unmatched or lossy cases, nor what force/allow_loss do.

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?

Three short sentences, front-loaded with the operation and scope, with zero filler. It is tight rather than padded; the shortfall is missing content, not wasted wording.

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?

A destructive 7-parameter write tool with no output schema needs far more: what allow_loss permits, whether force overrides protections, how password-protected documents are handled, and what expected_sha256 guards against. The definition leaves most of that to the agent's guesswork.

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

Parameters2/5

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

Schema description coverage is 0% across 7 parameters, so the description carries the full burden, yet it only annotates file_path (absolute path recommended). The semantically loaded flags force, allow_loss, expected_sha256, and password are left entirely unexplained.

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 (텍스트를 찾아 일괄 치환) plus the scope covered (문서 본문 및 표 셀). Clear enough to distinguish from hwp_insert_text or hwp_search, though it never names those siblings 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?

No guidance on when to use this instead of hwp_insert_text or hwp_fill_cells, and no preconditions such as needing an existing match or a file that is safe to modify. The only directive is a soft recommendation that file_path be absolute.

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