Skip to main content
Glama
Moe03

Convocore MCP Server

by Moe03

patch_kb_doc

Replace a specific text span in a knowledge-base document to patch content or name without rewriting the entire body.

Instructions

Performs string replacements in a knowledge-base document — same idea as Cursor StrReplace for files. USE THIS instead of update_kb_doc when the document body is large and you only need to change a specific section. Workflow: get_kb_doc → copy the span into old_string (include enough surrounding context to make it unique) → new_string is the replacement → this tool patches content (or name) and PATCHes the KB doc. Prefer an exact copy from get_kb_doc; minor whitespace/line-ending drift is tolerated as a fallback. Prefer this over rewriting the entire content field. Only use replace_all=true when you intentionally want every occurrence changed.

Input Schema

NameRequiredDescriptionDefault
docIdYesThe KB document ID
fieldNoWhich KB field to patch. Default content (document body).
agentIdYesThe agent ID
new_stringYesReplacement text for the matched span. Use an empty string to delete the matched text.
old_stringYesText to find in the KB field. Prefer an exact copy from get_kb_doc; minor whitespace/line-ending drift is tolerated. Include surrounding context so the match is unique unless replace_all is true.
replace_allNoIf false (default), fails when old_string matches more than once. If true, replaces every occurrence.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.6.17

TDQS

A4.3/5.0
Behavior4/5

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

With annotations already covering safety and idempotency, the description still adds useful behavior: exact-string matching, whitespace/line-ending drift tolerance, uniqueness requirements, and replace_all semantics. It does not describe missing-match behavior or return values, but its behavioral disclosure is substantially richer than the annotations alone.

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?

The purpose and sibling differentiation are front-loaded, and the workflow is easy to scan. Some phrasing duplicates schema guidance, such as preferring an exact copy from get_kb_doc, but the description remains appropriately sized for a mutation tool.

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

Completeness4/5

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

The schema is fully documented and annotations cover safety traits, so the description mainly needs to explain the patch workflow and when to prefer this tool. It does that well, though it omits return behavior and what happens when old_string is not found, which would help since there is no output schema.

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 coverage is 100%, so the schema already documents all six parameters, including old_string uniqueness, new_string empty-string deletion, field enum, and replace_all behavior. The description reinforces some of this but adds little semantic information beyond what the schema already provides.

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?

The description states a specific verb and resource: performing string replacements in a knowledge-base document. It explicitly distinguishes the tool from update_kb_doc by explaining that patch_kb_doc is for changing a specific section rather than rewriting the whole document.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: use this instead of update_kb_doc when the body is large and only one section needs changing. It also provides a clear workflow via get_kb_doc, explains how to choose old_string, and warns to use replace_all=true only for intentional global replacements.

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