Skip to main content
Glama

fluig_rm_query

Query TOTVS RM (Corpore) data read-only through approved dataset sentences, specifying target environment and expected fields to retrieve records without writing.

Instructions

Consulta o RM (Corpore) via ds_generic_rm_sql + sentença homologada WS.###. READ-ONLY DE VERDADE: chama o dataset direto pelo dataset-handle/search, sem gravar nada no servidor. É o caminho preferido para ler o RM — use no lugar de fluig_rm_db_query sempre que houver sentença. Informe os campos esperados.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "codSentenca": "<codSentenca>",
      "fields": "<fields>",
      "env": "<env>"
    },
    "name": "fluig_rm_query"
  }
}

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.
fieldsYescolunas esperadas da sentença
paramsNoparâmetros extras da sentença {NOME:valor}
coligadaNoCODCOLIGADA (default 0)
aplicacaoNoCODAPLICACAO (default G)
codSentencaYesex: WS.247

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.3.0
    • addedInput schema / properties / aplicacao
      Added value: +{
      +  "description": "CODAPLICACAO (default G)",
      +  "type": "string"
      +}
    • removedInput schema / properties / application
      Removed value: -{
      -  "description": "CODAPLICACAO (default \"G\").",
      -  "type": "string"
      -}
    • removedInput schema / properties / branch
      Removed value: -{
      -  "description": "CODCOLIGADA (default \"0\").",
      -  "type": "string"
      -}
    • addedInput schema / properties / codSentenca
      Added value: +{
      +  "description": "ex: WS.247",
      +  "type": "string"
      +}
    • addedInput schema / properties / coligada
      Added value: +{
      +  "description": "CODCOLIGADA (default 0)",
      +  "type": "string"
      +}
    • addedInput schema / properties / env
      Added value: +{
      +  "description": "OBRIGATÓ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.",
      +  "enum": [
      +    "teste",
      +    "prod"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / fields / description
      Previous value: -"Columns the statement returns."New value: +"colunas esperadas da sentença"
    • changedInput schema / properties / params / description
      Previous value: -"Extra statement parameters as {NAME: value}."New value: +"parâmetros extras da sentença {NOME:valor}"
    • removedInput schema / properties / statementCode
      Removed value: -{
      -  "description": "RM statement code, e.g. \"WS.247\".",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "statementCode",
      -  "fields"
      -]New value: +[
      +  "codSentenca",
      +  "fields",
      +  "env"
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden, and it does disclose the key trait: truly read-only, hitting dataset-handle/search without writing anything server-side, plus the underlying mechanism (ds_generic_rm_sql). It stops short of covering failure modes, latency/row limits, or what the response looks like.

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 compact sentences with the resource and read-only guarantee front-loaded before the routing advice. The emphatic 'READ-ONLY DE VERDADE' phrasing is slightly rhetorical but still carries information; no filler beyond that.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter, 3-required tool with no output schema, the description covers purpose, alternative routing, and the safety profile, and the 'fields' requirement lets an agent infer the result shape. It omits any statement about what comes back (row set, paging, error behavior), which is the one remaining gap.

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 env, fields, params, coligada, aplicacao and codSentenca in detail. The description only echoes 'Informe os campos esperados', adding no syntax, format, or defaulting guidance beyond the schema. 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 (consulta/read) and resource (RM/Corpore via ds_generic_rm_sql with a homologated WS.### sentence), and explicitly names the sibling it is not: fluig_rm_db_query. An agent can distinguish it from the other RM tools without opening any schema.

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 routing rule: 'use no lugar de fluig_rm_db_query sempre que houver sentença' — i.e. prefer this tool over the alternative whenever a sentence exists. It also tells the caller to supply the expected fields, which is a concrete call precondition.

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