Skip to main content
Glama

Create kb image

create_kb_image

Cria e indexa uma IMAGEM na base de conhecimento a partir de uma URL pública (http/https) ou de base64 (quando a imagem não está hospedada em lugar nenhum, ex: arquivo local). A imagem é baixada/decodificada, descrita automaticamente por IA (GPT-4o Vision) e indexada para busca semântica. Fica disponível em /api/kb/image/[id] (URL pública, útil como header_image_url de outra tool, ex: create_whatsapp_template) e pode ser enviada pelo agente no WhatsApp. ⚠️ A descrição é gerada por IA e é ela que decide se o agente ACHA a imagem na hora certa — se a busca não a encontrar, ele pode inventar um link. Depois de criar, vale ajustar com update_kb_document começando pela PERGUNTA do cliente (ex: "esta é a foto para mandar quando pedirem o cardápio") e não pelo dado, e dizendo também o que ela NÃO é quando houver risco de confusão com outra imagem. 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.

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>"
    },
    "name": "create_kb_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesNome/título da imagem (ex: "Logo principal claro")
tagsNoTags separadas por vírgula, ex: "marca,logo,marketing"
image_urlNoURL pública da imagem (http/https) a ser baixada e indexada. Ignorado se image_base64 vier junto.
image_base64NoAlternativa a image_url quando a imagem NÃO está hospedada em nenhuma URL pública (ex: arquivo local) — data URL base64 completa ("data:image/png;base64,...."). Tem prioridade sobre image_url.
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.6/5.0
Behavior5/5

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

Annotations only cover the safety triad; the description goes well beyond by disclosing the AI auto-captioning step (GPT-4o Vision), the OpenAI key requirement, the resulting public endpoint /api/kb/image/[id], and the failure mode where a weak AI description causes the agent to miss the image and hallucinate a link. It even recommends the remediation workflow with update_kb_document, which is exactly the kind of context annotations cannot carry.

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 core action and input modes are front-loaded in the first two sentences, followed by consequences and practical follow-up advice. It is denser and longer than typical, and the operational tip about phrasing the update as the customer's question could arguably be trimmed, but every sentence carries real information rather than repetition.

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?

No output schema exists, so the description carries the burden of explaining what creation produces (an indexed, semantically searchable record reachable at a public URL) and it does so. Combined with the auth/key prerequisites and the multilingual note on scoping via target_user_id, an agent has everything needed to invoke and then use the result.

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%, so all five parameters (including the image_url/image_base64 precedence and the admin-only target_user_id) are already documented in structured form. The description reinforces the URL-vs-base64 distinction but adds no syntax, size limits or format constraints beyond it, so the baseline 3 applies.

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?

States a concrete verb pair ('Cria e indexa') plus the resource (IMAGEM na base de conhecimento) and the two accepted input forms (URL pública or base64). This clearly separates it from the sibling creators create_kb_audio, create_kb_video and create_kb_document without the agent needing to open their schemas.

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?

Explicitly says when to use URL versus base64 ('quando a imagem não está hospedada em lugar nenhum, ex: arquivo local') and points to a follow-up tool (update_kb_document) plus a concrete downstream consumer (header_image_url for create_whatsapp_template). It also spells out the target_user_id condition (admin only, default = authenticated account), leaving little to inference.

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