Skip to main content
Glama

Cadastro de classe de produto

cadastrar_classe_produto

Classes de produto da empresa (Herbicida, Fungicida, Adubo, Semente, Peça…). A base da upCampo (consultar_base_upcampo visão classes) serve para sugerir nomes; a classe é do cliente.

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.4/5.0
Behavior5/5

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

Beyond the annotations, it discloses important transactional behavior: the batch is all-or-nothing, a rejected item prevents any write, and the response identifies which item failed and why. It also explains duplicate-name rejection, deactivation side effects, and the required confirmation workflow before writing.

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 description is front-loaded with the domain and key distinction, then moves through batch rules, atomicity, and confirmation. It is appropriately sized for a batch write tool, though some sentences repeat details already present in the schema.

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?

Given the annotations and the presence of an output schema, the description covers what an agent needs: write intent, batch atomicity, include/update/deactivate modes, duplicate handling, and confirmation. No major behavioral or usage gap remains for this tool.

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 the schema already documents the item fields and farm parameter in detail. The description largely restates the id/desativar conditions and the 50-item limit rather than adding new parameter-level meaning. The duplicate-name behavior is useful but is more behavioral than parameter semantics.

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?

The description states a specific verb/resource by explaining that it writes product classes ('GRAVA no upCampo') and covers include/update/deactivate modes. It also distinguishes the tool from the sibling consultar_base_upcampo by clarifying that the base only suggests names while the class belongs to the client.

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 clear operational context: send the full list at once, use no id to include, id to alter, and id plus desativar to deactivate. It also instructs the agent to show the user the list and confirm before calling. It lacks an explicit when-not-to-use statement, but the alternatives and conditions are otherwise clear.

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