Skip to main content
Glama

Cadastro de produto

cadastrar_produto

Produtos da empresa (defensivo, adubo, semente, combustível, peça). Use a base da upCampo (consultar_base_upcampo visão produtos) para sugerir unidade, classe e grafia, mas cadastre com o que o cliente confirmar: o produto é dele.

Recebe uma LISTA (até 50 por chamada): mande tudo o que o usuário ditou de uma vez. Sem id inclui; com id altera só os campos informados; com id e desativar desativa. É tudo ou nada: se um item for recusado, NENHUM é gravado, e a resposta diz qual item e por quê. Nome repetido é recusado com o id do que já existe — pergunte se é para alterar.

GRAVA no upCampo. Mostre ao usuário a lista do que será gravado e confirme antes de chamar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itensYesOs itens a gravar.
fazendaNoNome da fazenda. Omita para usar a fazenda corrente do usuário — é o padrão, e é o que o usuário espera quando não cita nenhuma. Informe apenas quando ele nomear outra fazenda. Cada consulta trata de uma fazenda por vez.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
avisosNo
fazendaYes
gravadoYes
retornoYes
mensagemYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare the write profile (readOnly=false, idempotent=false, destructive=false), and the description adds substantial context beyond that: batch size up to 50, all-or-nothing transaction semantics with the failing item reported, duplicate-name rejection returning the existing id, the target system (upCampo), and a required confirmation step before writing. This is unusually complete behavioral disclosure.

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?

Multi-paragraph but front-loaded with the resource definition, then the batch/mutation rules, then the confirmation requirement. Every paragraph carries a distinct instruction (routing, batch semantics, write target, confirmation). Slightly long, but nothing reads as filler.

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 write tool with an output schema present, return-value detail is unnecessary, and the description still notes that the response identifies which item failed and why. Combined with the annotation profile and full schema coverage, an agent has everything needed to call it correctly, including the pre-write confirmation step.

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 description coverage is already 100%, so the schema baseline is 3. The description adds operational semantics the schema only implies: the id/no-id/desativar tri-state behavior and the fact that `codigo` is auto-generated if omitted. It does not add extra detail on the typed boolean flags (semente, combustivel) or ncm, so it stays just above 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?

States a specific verb (cadastrar) and resource (produto), and immediately scopes the resource by naming the product categories (defensivo, adubo, semente, combustível, peça). This distinguishes it cleanly from siblings like cadastrar_classe_produto and cadastrar_variedade without needing 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?

Explicit routing: use consultar_base_upcampo (visão produtos) to suggest unidade/classe/grafia, but register whatever the client confirms. It also states when to omit `fazenda` (default to current farm, only supply if another is named) and the when-to-use rule for `id`/`desativar`. Alternatives and exclusions are spelled out.

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