Skip to main content
Glama

Edit the text of a knowledge document

dosai_edit_knowledge_document
Destructive

Change the text of a knowledge base document, e.g. a price. First read it with dosai_read_knowledge_document, then send ALL its pieces in the same order with only the needed ones changed: a piece left out is deleted. The bot uses the new text within a minute. Requires editor role.

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": {
      "project_id": "<project_id>",
      "document_id": "<document_id>",
      "pieces": "<pieces>"
    },
    "name": "dosai_edit_knowledge_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
piecesYesEvery piece of the document, in order, as the bot should read it now.
project_idYesFrom dosai_list_projects.
document_idYesFrom dosai_list_knowledge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / document_id / description
      Previous value: -"Knowledge base document id, as returned by dosai_list_knowledge."New value: +"From dosai_list_knowledge."
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  3. Changed2 schema fields changed
    • removedInput schema / properties / document_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  4. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations flag destructiveHint=true and readOnlyHint=false, and the description earns credit beyond them by spelling out exactly what is destroyed ('a piece left out is deleted'), the propagation latency ('the bot uses the new text within a minute'), and the authorization prerequisite ('Requires editor role'). These are precisely the details an agent needs before touching a destructive replace-style operation.

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 purpose, then the read-then-write procedure, then the destructive warning and auth requirement. Nothing is redundant and no sentence could be dropped without losing operational information.

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

Completeness5/5

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

For a 3-parameter destructive mutation with no output schema, the description covers the prerequisite read, the full-replacement semantics, the consequence of omission, timing of effect, and the role requirement. Crowd-out answer and role format aside, an agent has everything needed to call it correctly.

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 100%, so baseline is 3; the description goes further by explaining the replace-all contract of 'pieces' — every piece in original order with only the intended ones changed — which turns an array of strings into a well-understood full-replacement payload. It does not detail the per-piece length/count limits, but those already live in the schema.

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 opens with a specific verb+resource pair ('Change the text of a knowledge base document') plus a concrete example ('e.g. a price'), so the operation is unambiguous. It falls short of a 5 because the sibling 'dosai_update_knowledge_document' exists and the description never distinguishes text editing from whatever that tool does, leaving one routing decision to inference.

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?

It gives an explicit workflow precondition ('First read it with dosai_read_knowledge_document') and a hard usage rule ('send ALL its pieces ... a piece left out is deleted'). No exclusions or alternatives are stated, and the contrast with dosai_update_knowledge_document / dosai_add_knowledge_text is absent, which keeps it below a 5.

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