Skip to main content
Glama

fluig_rm_save_record

Saves TOTVS RM records via the Business Layer (DataServer.saveRecord), preserving formulas, numbering, and allocations; run a dryRun first, validate XML against the schema, then confirm.

Instructions

🛑 ESCRITA NO ERP. Grava no RM pela BUSINESS LAYER (DataServer.saveRecord) — a forma CERTA, que respeita fórmula, consistência, numeração e rateio, tudo que um UPDATE direto atropela. Prefira esta a fluig_rm_db_exec. Chame primeiro SEM confirm para ver o dryRun; valide o XML contra fluig_rm_dataserver_schema e só então confirme.

Input Schema

NameRequiredDescriptionDefault
envYesOBRIGATÓRIO. Ambiente alvo: "teste" (homologação, o host de FLUIG_HOST) ou "prod" (PRODUÇÃO REAL, o host de FLUIG_HOST_PROD). Não há default: a escolha é sempre explícita, para que ninguém leia homologação achando que é produção nem escreva em produção achando que é teste.
xmlYesXML do registro conforme o schema do DataServer
confirmNoexecuta de verdade; sem isso devolve dryRun
contextoNoex: CODCOLIGADA=1;CODSISTEMA=G;CODUSUARIO=mestre
dataServerNameYesex: RhuPessoaData

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it flags the operation as a production ERP write, discloses the dryRun-then-confirm two-phase behavior, and explains the semantic guarantees (formula, consistency, numbering, allocation) that a raw UPDATE would bypass. This is exactly the behavioral context needed to invoke a mutation safely.

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?

Three dense sentences with the write warning and the correct method front-loaded before the workflow steps; there is little waste. The heavy emphasis markers and capitalization cost some readability but nothing is off-topic.

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 mutation tool with no annotations and no output schema, the description supplies the safety profile, the dryRun/confirm protocol, and the external validation dependency (fluig_rm_dataserver_schema). An agent has everything needed to call it correctly without risking an unintended production write.

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 every parameter including env, confirm, contexto and dataServerName is already documented at the schema level. The description reinforces the confirm/dryRun semantics and the XML format but adds no parameter meaning beyond the schema, so 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 specific verb and resource (grava registro no RM via Business Layer DataServer.saveRecord) and explicitly distinguishes itself from the direct-write sibling fluig_rm_db_exec. An agent can tell exactly what this does and what it is not.

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?

Gives an explicit workflow: call first WITHOUT confirm to inspect the dryRun, validate the XML against fluig_rm_dataserver_schema, then confirm. It also names the alternative (fluig_rm_db_exec) and instructs preferring this tool over it. This is a full when/when-not/alternatives specification.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools