Skip to main content
Glama
Grist MCP Server
by nic01asFr

Filter Sql Query

filter_sql_query

Filter Grist table records with simple conditions, selected columns, sorting, and limits without writing SQL; use a separate tool for complex queries.

Instructions

Exécute une requête SQL de filtrage sur une table Grist.

Version simplifiée pour requêtes SQL courantes sans écrire de SQL. Pour requêtes complexes, utiliser execute_sql_query.

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": {
      "doc_id": "<doc_id>",
      "table_id": "<table_id>"
    },
    "name": "filter_sql_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNombre max de résultats
doc_idYesID du document
columnsNoListe des colonnes à retourner (None = toutes)
order_byNoColonne de tri avec direction optionnelle (ex: "nom DESC")
table_idYesID de la table à requêter
where_conditionsNoDict de conditions (AND implicite entre conditions)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.2.2
    • addedInput schema / properties / columns / description
      Added value: +"Liste des colonnes à retourner (None = toutes)"
    • addedInput schema / properties / doc_id / description
      Added value: +"ID du document"
    • addedInput schema / properties / limit / description
      Added value: +"Nombre max de résultats"
    • addedInput schema / properties / order_by / description
      Added value: +"Colonne de tri avec direction optionnelle (ex: \"nom DESC\")"
    • addedInput schema / properties / table_id / description
      Added value: +"ID de la table à requêter"
    • addedInput schema / properties / where_conditions / description
      Added value: +"Dict de conditions (AND implicite entre conditions)"
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. 'Filtrage' strongly implies a read-only operation, but the description never states that it does not mutate data, what permissions are needed on the Grist document, or whether limits/pagination apply. It is adequate but thin for a tool with zero annotation coverage.

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 short sentences with the purpose front-loaded and the routing rule last. Minor redundancy between 'requête SQL' and 'sans écrire de SQL', but nothing that wastes meaningful space.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the parameter schema is fully documented. What is missing is behavioral context for a query tool with no annotations: read-only nature, permission requirements, and any row/limit constraints are unstated.

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 all six parameters (doc_id, table_id, columns, where_conditions, order_by, limit) are already documented in the schema. The description adds no syntax or format detail beyond that, which is the expected baseline when the schema does the work.

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 description names a specific verb and resource ('Exécute une requête SQL de filtrage sur une table Grist') and immediately positions itself as the simplified path versus the sibling execute_sql_query for complex queries. An agent can distinguish it from the sibling without opening 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?

It states when to use this tool ('requêtes SQL courantes sans écrire de SQL') and names the explicit alternative for the other case ('Pour requêtes complexes, utiliser execute_sql_query'). The only gap is that 'complex' is never defined, so the boundary is left to the agent's judgment.

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