Skip to main content
Glama

Create kb document

create_kb_document

Cria e indexa um novo documento de texto na base de conhecimento. O conteúdo é dividido em parágrafos, vetorizado e armazenado para busca semântica. Requer chave OpenAI configurada na conta. Sem target_user_id, cria na PRÓPRIA conta autenticada; o administrador da plataforma pode passar target_user_id para criar na conta de um cliente.

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": {
      "name": "<name>",
      "content": "<content>"
    },
    "name": "create_kb_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesNome/título do documento. ⚠️ O parâmetro é `name`, não `title`: passar `title` NÃO dá erro — o documento nasce indexado e buscável, mas com o nome literal "undefined".
tagsNoTags separadas por vírgula, ex: "marketing,produto,faq"
contentYesConteúdo completo do documento em texto plano. Separe tópicos com linhas em branco para melhor indexação.
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.1/5.0
Behavior4/5

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

Annotations already declare the write/non-destructive/open-world profile, but the description adds the hard prerequisite (an OpenAI key must be configured) and discloses the indexing side effect that makes the document semantically searchable. It stops short of covering duplicate-name behavior or how the created record 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.

Conciseness4/5

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

Three short sentences, front-loaded with the action and effect, followed by the prerequisite and the scoping rule. Slight redundancy with the schema's target_user_id description keeps it from a 5.

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?

With no output schema, the description still conveys the key precondition, the indexing behavior, and the account-targeting rule. It omits what the tool returns (e.g., a document ID), which would be useful given 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 four parameters, including the admin-only restriction on target_user_id. The description restates the target_user_id default rather than adding new semantics, so it lands at the baseline.

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?

Starts with a specific verb+resource ("Cria e indexa um novo documento de texto na base de conhecimento") and clarifies the medium (text) versus the create_kb_audio/image/video siblings. It also spells out the pipeline (paragraph split, vectorization, semantic search storage).

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 clear usage context for the account-scoping parameter: without target_user_id it creates in the authenticated account, and only platform admins may target a client account. It does not, however, tell the agent when to prefer update_kb_document or a different create_kb_* variant.

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