Skip to main content
Glama

replace_substring_in_artifact

Заменить подстроку в содержимом активного черновика артефакта. В meta ответа возвращается replacements_count — количество выполненных замен.

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": {
      "artifact_id": "<artifact_id>",
      "revision_id": "<revision_id>",
      "search": "<search>"
    },
    "name": "replace_substring_in_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
searchYesСтрока поиска.
replaceNoСтрока замены.
created_byNoКем создана новая ревизия.assistant
artifact_idYesИдентификатор артефакта.
replace_allNoЗаменять все вхождения.
revision_idYesТекущий активный revision_id для контроля конкурентных изменений.
case_sensitiveNoУчитывать регистр при поиске.

Output Schema

NameRequiredDescriptionDefault
metaNoДополнительная информация о выполненном действии.
revisionYesРевизия артефакта

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It usefully discloses that it operates on the active draft and that the response meta returns replacements_count, but says nothing about whether a new revision is created (only the created_by param hints at it), what happens on zero matches, or whether the change is reversible via revert_artifact.

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?

Two tight sentences with the core operation front-loaded and the response contract appended. No filler, though the second sentence duplicates what the output schema likely already conveys.

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-value explanation is optional. For a 7-param mutating artifact tool with siblings, the missing pieces are the revision/concurrency model and differentiation from replace_range_in_artifact — leaving the definition adequate but not complete.

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 100%, including revision_id's concurrency-control note, so the schema already does the heavy lifting. The description adds no parameter-level detail (search/replace semantics, conflict behavior on stale revision_id) beyond that baseline.

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?

Names a specific verb+resource pair (replace substring in active artifact draft) that is unmistakable in isolation. It does not, however, distinguish itself from the close sibling replace_range_in_artifact (or replace_article_text), which an agent must choose between.

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 versus replace_range_in_artifact, overwrite_artifact, or search_artifact. The only implicit signal is 'активного черновика' (active draft), which hints at the working state but names no alternative and gives no exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources