Skip to main content
Glama
InfluxDB MCP Server

InfluxDB MCP Server

by Quorralyne

execute_query

Execute SQL queries against InfluxDB databases and return results in JSON, CSV, Parquet, JSONL, or pretty format; check large time-series datasets with COUNT(*) and LIMIT/OFFSET first.

Instructions

Execute a SQL query against an InfluxDB database (all versions). Returns results in the specified format (defaults to JSON).

Large Dataset Warning: InfluxDB might contain massive time-series data. Always use COUNT(*) first to check size, then LIMIT/OFFSET for large results (>1000 rows).

Cloud Dedicated (v3) Requirements:

  • GROUP BY: Include all group columns in SELECT (e.g., SELECT place, COUNT(*) ... GROUP BY place)

  • Aggregations: Cast and alias COUNT (e.g., CAST(COUNT(*) AS DOUBLE) AS count)

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": {
      "database": "<database>",
      "query": "<query>"
    },
    "name": "execute_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSQL query to execute.
formatNoOutput format for query resultsjson
databaseYesName of the database to query

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full load. It usefully discloses the large-dataset hazard and the v3 GROUP BY/aggregation pitfalls, which are non-obvious behavioral traits. It never states whether non-SELECT statements are permitted, what permissions are needed, or how errors/timeouts behave — a significant omission for a tool whose "query" could mutate data.

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?

The lead sentence is front-loaded with the core purpose, followed by a clearly labeled warning and a version-specific block. The v3 bullets are narrow but prevent concrete failure modes, so they earn their space; the text is dense but not padded.

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?

With no annotations and no output schema, the description must cover behavior and returns. It covers output format options and size safety, but leaves the return shape, error behavior, and read-vs-write capability unstated — material gaps for an arbitrary-SQL tool.

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 query, database, and the format enum with its JSON default. The description restates the format default and adds no syntax, quoting, or dialect details beyond what the schema provides, so baseline 3 applies.

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 ("Execute a SQL query against an InfluxDB database") and adds a version-scope note ("all versions"), so an agent can tell this is the general SQL execution path. It does not explicitly distinguish itself from siblings like write_line_protocol or get_measurements, which is the only gap.

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?

It gives in-query guidance ("Always use COUNT(*) first to check size, then LIMIT/OFFSET for large results") plus v3 syntax requirements, which is real operational advice. However, it never says when to choose this tool over alternatives such as get_measurements for metadata or write_line_protocol for ingestion, so tool-selection guidance is only implied.

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