Skip to main content
Glama

patch_string

Replaces one existing string in a unique Page record with new text, using the active session chain when source and output paths are omitted.

Instructions

替换唯一 Page 记录中的一个已有字符串(研究用,capabilities.md 未列)。具名调用省略宿主源/输出即使用会话链;原始 args 用 session:true 并省略这两个参数(多源工具保留导入源)。显式路径不推进链。 登记证据 structure,只适用 capabilities.md 的已验样本。CLI: node patch-string.mjs <source.rp> <new.rp>

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": {
      "args": "<args>"
    },
    "name": "patch_string"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsYes
sessionNotrue 时 args 省略宿主源和输出,由当前链注入;多源工具仍传导入源。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.5

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), and the description is consistent with a localized file mutation. It adds useful behavioral context — research-only status, applicability limited to verified samples in capabilities.md — but says nothing about failure modes, non-matching or multiply-matching strings, or what is returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but the body packs invocation modes, evidence-registration notes, and CLI syntax into dense run-on phrasing that is hard to parse on first read. Nothing is obviously redundant, yet the presentation could be split into clearer clauses.

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?

For a mutation tool with no output schema, the definition covers session semantics and applicability limits but leaves core agent questions unanswered: behavior on zero or multiple matches, whether the write is atomic, and what a successful result looks like. Authored annotations carry the safety profile, but the operational picture is still incomplete.

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

Parameters4/5

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

Schema coverage is only 50%, and the undocumented `args` array is rescued by the description: the CLI line establishes positional order (source.rp, new.rp, old string, new string) and the session text explains which two entries are dropped when session=true. The `session` parameter itself is already documented in the schema, so the added value is partial but substantive.

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?

The description gives a specific verb and resource: replace one existing string inside a unique Page record, and flags it as research-only and not listed in capabilities.md. That scope statement distinguishes it implicitly from sibling patching/editing tools, though it never names an alternative to contrast with.

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

Usage Guidelines3/5

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

It explains the invocation-mode rules (named call drops host source/output and uses the session chain; raw args require session:true with those parameters omitted; explicit paths do not advance the chain), which is real usage guidance. It does not say when to choose this over edit_text or other string/link patchers, nor what prerequisite state must hold before calling.

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

Deploy Server

Other Tools