Skip to main content
Glama
influxdata

InfluxDB MCP Server

Official
by influxdata

execute_query

Run SQL queries against InfluxDB databases to retrieve time-series data in JSON, CSV, Parquet, or other formats, with guidance for managing large result sets.

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/Clustered & Cloud Serverless (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)

  • Note: Both products require CAST for all aggregation functions (COUNT, SUM, AVG, MIN, MAX) to ensure results appear properly in response

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query to execute.
formatNoOutput format for query resultsjson
databaseYesName of the database/bucket to query
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It does warn about large datasets and cloud-specific SQL requirements, but it does not explicitly state whether the tool is read-only or if it can execute write queries. The term 'SQL query' is ambiguous regarding side effects.

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 description is front-loaded with the purpose, followed by warnings and cloud requirements. It is somewhat long but well-structured with clear sections. Every sentence adds informative value, though it could be more concise.

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 query tool with no output schema, the description covers important behavioral nuances: large dataset handling and cloud-specific GROUP BY/CAST requirements. It lacks explicit read-only confirmation and error behavior, but otherwise provides sufficient context for a complex tool.

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%, providing a baseline of 3. The description adds value beyond the schema by explaining output format defaults already in schema, but also by detailing cloud-specific query construction requirements (GROUP BY columns in SELECT, CAST for aggregations) that are not in the schema. This meaningfully helps the agent formulate the query parameter correctly.

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 clearly states it executes a SQL query against an InfluxDB database across all versions, and mentions return format. However, it does not distinguish this tool from sibling query_sql/query_influxql, so it lacks explicit sibling differentiation.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool vs. alternatives like query_sql or query_influxql. The large dataset warning and cloud requirements are operational advice, not tool-selection guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/influxdata/influxdb3_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server