Skip to main content
Glama

fluig_dataset_run

Executes a Fluig form or custom dataset and returns its rows, applying server-side filters and serverLimit to avoid fetching all data before truncating.

Instructions

Executa um dataset (form ou custom) e retorna as linhas. Filtre no SERVIDOR com filters (campo + condição: eq, ne, contains, starts, ends, between) e serverLimit (sqlLimit) em vez de trazer tudo e cortar com limit. match any = OU só entre as condições positivas: ne continua excluindo (E) mesmo com any. Em dataset CUSTOM, filters/constraints/serverLimit/order só valem se o código do dataset tratar constraints e sortFields; confira o resultado. Se vier limitadoPeloServidor, total é o teto do serverLimit e pode haver mais linhas. constraints aceita constraints cruas do getDataset.

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": {
      "name": "<name>",
      "env": "<env>"
    },
    "name": "fluig_dataset_run"
  }
}

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.
nameYesnome do dataset
limitNomáximo de linhas a exibir depois de buscar (opcional)
matchNoall = todos os filtros (padrão); any = qualquer uma das condições positivas (ne continua excluindo)
orderNoordem (opcional): { field, desc }
fieldsNocolunas a retornar (opcional)
filtersNofiltros (opcional): [{ field, op, value, valueTo }]. value é obrigatório; para campo vazio ou nulo use eq (ou ne) com value "". contains/starts/ends recusam value vazio, e % e _ no value funcionam como curinga. between exige valueTo e, em dataset de formulário, compara como TEXTO: use datas AAAA-MM-DD (dd/mm/aaaa e números saem fora de ordem).
constraintsNoconstraints cruas do getDataset (opcional): [{ field, initial, final, type, like }]; aceita também os nomes do WSDL (fieldName, initialValue, finalValue, contraintType, likeSearch). type ausente = MUST; final ausente = initial.
serverLimitNomáximo de linhas que o SERVIDOR devolve (vira a constraint sqlLimit; opcional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.3.0
    • addedInput schema / properties / constraints
      Added value: +{
      +  "description": "constraints cruas do getDataset (opcional): [{ field, initial, final, type, like }]; aceita também os nomes do WSDL (fieldName, initialValue, finalValue, contraintType, likeSearch). type ausente = MUST; final ausente = initial.",
      +  "items": {
      +    "properties": {
      +      "field": {
      +        "type": "string"
      +      },
      +      "final": {
      +        "type": "string"
      +      },
      +      "initial": {
      +        "type": "string"
      +      },
      +      "like": {
      +        "type": "boolean"
      +      },
      +      "type": {
      +        "enum": [
      +          "MUST",
      +          "SHOULD",
      +          "MUST_NOT"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • 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 to return (optional)."New value: +"colunas a retornar (opcional)"
    • addedInput schema / properties / filters
      Added value: +{
      +  "description": "filtros (opcional): [{ field, op, value, valueTo }]. value é obrigatório; para campo vazio ou nulo use eq (ou ne) com value \"\". contains/starts/ends recusam value vazio, e % e _ no value funcionam como curinga. between exige valueTo e, em dataset de formulário, compara como TEXTO: use datas AAAA-MM-DD (dd/mm/aaaa e números saem fora de ordem).",
      +  "items": {
      +    "properties": {
      +      "field": {
      +        "type": "string"
      +      },
      +      "op": {
      +        "enum": [
      +          "eq",
      +          "ne",
      +          "contains",
      +          "starts",
      +          "ends",
      +          "between"
      +        ],
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "string"
      +      },
      +      "valueTo": {
      +        "description": "obrigatório em between",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "op",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows to show (optional)."New value: +"máximo de linhas a exibir depois de buscar (opcional)"
    • addedInput schema / properties / match
      Added value: +{
      +  "description": "all = todos os filtros (padrão); any = qualquer uma das condições positivas (ne continua excluindo)",
      +  "enum": [
      +    "all",
      +    "any"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / name / description
      Previous value: -"Dataset name."New value: +"nome do dataset"
    • addedInput schema / properties / order
      Added value: +{
      +  "description": "ordem (opcional): { field, desc }",
      +  "properties": {
      +    "desc": {
      +      "type": "boolean"
      +    },
      +    "field": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / serverLimit
      Added value: +{
      +  "description": "máximo de linhas que o SERVIDOR devolve (vira a constraint sqlLimit; opcional)",
      +  "maximum": 2147483647,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "name"
      -]New value: +[
      +  "name",
      +  "env"
      +]
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/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 meaningful work: it explains that limitedPeloServidor means total is merely the serverLimit ceiling and more rows may exist, and that match=any still excludes on ne conditions. Those are non-obvious runtime behaviors an agent could not infer from the schema. It does not cover auth/permission requirements or the exact response shape, which keeps it from a 5.

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-loaded with what the tool does, then progressively narrower caveats. Every sentence carries information, though the opening block is a dense run-on that bundles filtering strategy, match semantics, and custom-dataset caveats into one paragraph that could be split for scannability.

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 9-parameter tool with nested objects, no annotations, and no output schema, the description covers the highest-risk behaviors: server vs client limiting, the total-vs-serverLimit trap, and silent filter ignoring on custom datasets. It stops short of describing the returned structure beyond the rows/total hints, which is the main remaining gap.

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 semantics on top: serverLimit becomes the sqlLimit constraint on the server (distinct from limit, which trims after fetch), and match=any applies OR only across positive conditions while ne keeps excluding with AND. Those distinctions sharpen parameters that the schema alone leaves ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: executes a dataset (form or custom) and returns the rows. That is far more informative than the name alone and separates it conceptually from dataset_list/dataset_get. It never names a sibling tool explicitly, so an agent comparing it against fluig_db_query or fluig_dataset_get gets no direct routing signal.

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 concrete operational guidance: filter on the SERVER with filters + serverLimit rather than pulling everything and trimming with limit, which is a genuine usage recommendation. It also warns that in CUSTOM datasets filters/constraints/order only work if the dataset code honors constraints and sortFields, and says to check the result. What's missing is any explicit comparison to alternative tools for reading data.

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