Skip to main content
Glama
Datris MCP Server

Datris MCP Server

query_natural

Ask a natural-language question about a PostgreSQL table; it generates and runs SQL from the table schema and returns matching rows, so you avoid writing SQL manually.

Instructions

Ask a question in natural language about data in a PostgreSQL table. The AI generates a SQL query from the question and table schema, executes it, and returns the results. Use this instead of writing SQL manually.

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": {
      "question": "<question>",
      "table": "<table>"
    },
    "name": "query_natural"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum rows to return (default: 100). Pass -1 for unlimited — no cap, returns every matching row.
tableYesPostgreSQL table name to query
schemaNoPostgreSQL schema (default: public)
databaseNoDatabase name (default: datris)
questionYesNatural language question about the data

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the meaningful trait that an AI generates and executes SQL rather than running a fixed query. However it never states whether the generated SQL is read-only or could mutate data, says nothing about permissions or cost of an unlimited scan (the schema's limit=-1 escape hatch), and doesn't mention failure behavior for unanswerable questions.

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, front-loaded with the action and followed by the mechanism and the selection hint; nothing is padded. It could be tightened further by folding the routing hint into the first sentence, but there is no wasted text.

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 5-parameter query tool with no output schema, the description covers the input contract and the generation pipeline adequately, leaving results format to the implicit "returns the results." The notable gap is the absence of any statement about read-only safety or the semantics of unbounded limits, which matters for an agent deciding whether to call it.

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% and every parameter including the default database and schema is documented inline, so the baseline of 3 applies. The description adds only that the table schema feeds query generation, which slightly explains why table and question are required but supplies no format or syntax guidance beyond the schema.

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?

The description names a specific verb and resource: asking a natural-language question against a PostgreSQL table, with the generation/execution pipeline spelled out. It implicitly separates itself from raw-SQL tools ("instead of writing SQL manually") but never names a sibling such as query_postgres, so the differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use this instead of writing SQL manually" gives one clear positive condition for selection, but no when-not cases, no named alternative for agents that already have SQL or need another warehouse, and no prerequisites (permissions, table existence). The guidance is implied rather than explicit routing.

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