Skip to main content
Glama

Delete kb document

delete_kb_document
Destructive

Apaga um documento da base de conhecimento (texto, imagem, vídeo ou áudio), removendo também o índice de busca — o mesmo caminho do botão de excluir em /kb. Não tem volta. Exige confirm_name igual ao nome atual do documento (ver list_kb_documents), para não apagar o documento errado por engano de id. Para TROCAR uma imagem, crie a nova com create_kb_image e depois apague a antiga. Sem target_user_id, apaga na PRÓPRIA conta autenticada; o administrador da plataforma pode passar target_user_id.

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": {
      "document_id": "<document_id>",
      "confirm_name": "<confirm_name>"
    },
    "name": "delete_kb_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesID do documento (obtido via list_kb_documents)
confirm_nameYesNome atual EXATO do documento. Se não bater, nada é apagado.
target_user_idNoID da conta-alvo (opcional; APENAS o admin da plataforma pode usar). Padrão: a conta autenticada.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructiveHint annotation it discloses irreversibility ('Não tem volta'), a safety guard requiring confirm_name to match the current name, that the search index is removed along with the document, and that target_user_id is admin-only and defaults to the authenticated account. These are exactly the traits an agent needs before invoking an irreversible write.

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?

Front-loads the action and scope, then the irreversible warning, then the guard, then the alternative workflow — a sensible priority order. It is dense and slightly run-on, but every sentence carries actionable content.

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?

For a destructive, no-output-schema tool it covers the essentials: what is destroyed, the verification mechanism, the account-targeting rule and the replacement alternative. It stops short of saying what a failed confirmation or a successful deletion returns, which an agent handling errors would want.

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% and the description largely restates it (confirm_name must match, target_user_id admin-only, default account), adding little new syntax or format detail. The pointer to list_kb_documents for obtaining the name is the only marginal addition over the schema.

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?

Opens with a specific verb and resource ('Apaga um documento da base de conhecimento') and enumerates the covered media types, so an agent can separate it from delete_email_template, delete_quick_reply and other delete siblings without opening a schema. It also states the secondary effect (search index removal), which sharpens what the tool actually does.

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?

Gives concrete routing: for replacing an image, use create_kb_image then delete the old one, and for the exact name use list_kb_documents. It does not name a sibling to prefer when the goal is merely editing metadata (update_kb_document), so the 'when not to delete' case is only implied.

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