Skip to main content
Glama

Cadastro de subtipo

cadastrar_subtipo

Subtipos do tipo de atividade (a "Identificação Resumida (Subtipo)" da ordem de serviço): a subdivisão que o cliente usa — "1ª aplicação de fungicida", "Dessecação pré-plantio"… — e em quais tipos de atividade cada um vale. Na OS, um tipo de atividade com subtipo vinculado mostra SÓ os seus; sem nenhum, mostra todos. Vincular o primeiro subtipo a um tipo restringe a lista dele (vem um AVISO). Subtipo já usado em OS não pode ser renomeado: a OS guarda o nome.

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

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

Goes well beyond the annotations: all-or-nothing atomicity with the offending item reported, duplicate-name rejection returning the existing id, the rule that an OS-used subtype cannot be renamed, the AVISO when the first subtype restricts an activity type's list, and the destination store (upCampo). The soft-delete semantics ('sai das listas, o histórico fica') align with destructiveHint=false rather than contradicting it.

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?

Long but dense and front-loaded, leading with the domain concept before the operational rules and the confirm-before-calling instruction. Each paragraph carries a distinct rule, though the prose is heavier than strictly necessary for a two-parameter tool.

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?

With an output schema present, 100% schema description coverage, and full annotations, the description fills the remaining gap — atomicity, duplication handling, rename restriction and write target — so nothing an agent needs to call it correctly is missing.

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 coverage is 100% so the baseline is 3, but the description adds real meaning: the 50-item limit, the id-vs-no-id contract for update/insert/deactivate, and the all-or-nothing consequence on the itens array. It does not clarify tipos_atividade being the COMPLETE list beyond what the schema already says.

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 and resource (cadastrar_subtipo) and spends its opening defining the domain object (subdivision of activity type shown on the OS), including how it behaves when linked. An agent can distinguish this from cadastrar_tipo_atividade without reading either schema.

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?

Explicitly explains the three modes — no id inserts, id updates only given fields, id + desativar deactivates — and instructs batching all user-dictated items into one call, plus a confirmation workflow. It does not name an alternative sibling for the insert case, so it stops short of full when/when-not routing.

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