Skip to main content
Glama

Cadastro de talhão

cadastrar_talhao

Talhões da fazenda, com a área em hectares, o setor e o MAPA DO TALHÃO (o contorno, em coordenadas). O mapa pode vir junto na inclusão ou depois, numa alteração — e troca o mapa anterior. Com mapa, a área pode ficar de fora: vale a do mapa. Se o usuário mandar um KML ou GeoJSON, leia os pontos do polígono de cada talhão e mande um item por talhão; nesses formatos cada ponto vem como longitude,latitude — inverta para [latitude, longitude].

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: map submission replaces the previous map, area may be omitted when a map is supplied (map area wins), the write is all-or-nothing with per-item rejection reporting, duplicate names are refused with the existing id, and the tool writes to 'upCampo'. Deactivation keeping history is consistent with destructiveHint=false.

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?

Front-loads the resource and key data, then layers list semantics and map-handling rules. The length is justified by the tool's complexity, though the map/format paragraph could be tightened slightly.

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?

Covers everything an agent needs for a batch mutation tool: input format conversions, area/map precedence, id-based create/update/deactivate branching, atomicity, duplicate-name handling, and a confirmation step. An output schema exists, so return-value explanation is correctly omitted.

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 schema carries the baseline, but the description adds genuinely interpretive meaning: the area/map precedence rule and the longitude,latitude → [latitude, longitude] inversion for KML/GeoJSON input. That is more than restating schema text.

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 definition names the resource (talhões) with its constituent data (área, setor, mapa) and then pins down the exact operations: 'Sem `id` inclui; com `id` altera só os campos informados; com `id` e `desativar` desativa.' An agent can tell this is the plot-registration tool and not a query tool like consultar_cadastros from the text alone.

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 strong operative guidance: send all dictated items in one list, handle KML/GeoJSON by emitting one item per polygon, and show the list to the user before calling. It does not name a sibling alternative or state when not to use it, so it stops short of a 5.

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