Skip to main content
Glama
InfluxDB MCP Server

InfluxDB MCP Server

by Quorralyne

write_line_protocol

Write single records or batches to InfluxDB in line protocol format, specifying database and timestamp precision for accurate time-series ingestion.

Instructions

Write data to InfluxDB using line protocol format (all versions). Supports single records or batches.

Line Protocol Syntax: measurement,tag1=value1,tag2=value2 field1=value1,field2=value2 timestamp

Components:

  • measurement: table/measurement name (required)

  • tags: indexed metadata (optional) - comma-separated key=value pairs

  • fields: actual data (required) - space-separated from tags, comma-separated key=value pairs

  • timestamp: optional timestamp (precision must be specified in tool parameters)

Field Value Types:

  • Strings: "quoted string"

  • Floats: 123.45

  • Integers: 123i (note the 'i' suffix)

  • Booleans: t or f

Examples: Single record: temperature,location=office,building=main value=23.5,humidity=45i 1640995200 Batch (separate with newlines): temperature,location=office value=23.5 1640995200 humidity,location=office value=45i 1640995201

Important: Always specify correct precision parameter to match your timestamp format. Use any precision if writing data with no timestamp. Escaping required for special characters in tags/fields.

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>",
      "data": "<data>",
      "precision": "<precision>"
    },
    "name": "write_line_protocol"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesLine protocol formatted data. For multiple records, separate each line with \n
noSyncNoAcknowledge without waiting for WAL persistence
databaseYesName of the database to write to
precisionYesPrecision of timestamps
acceptPartialNoAccept partial writes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and only covers syntax. It never discloses write semantics that matter for a mutation tool: that points with identical measurement/tag-set/timestamp overwrite existing data, what happens on malformed lines, how acceptPartial changes error behavior, or what permissions/auth the write requires.

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 the purpose, then organized into labeled blocks (syntax, components, value types, examples) that each serve a purpose for a format-sensitive tool. It is long, but the length is largely justified by the grammar being taught; the closing 'Important' paragraph is the one spot that could be trimmed.

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?

For a 5-param mutation tool with no annotations and no output schema, the payload format is covered exceptionally well. What is missing is the other half an agent needs before calling it: overwrite/upsert behavior on duplicate points, error and partial-write outcomes, and any prerequisite that the target database must already exist.

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 coverage is 100%, so all five parameters are already documented, setting the baseline at 3. The description does add real meaning for the 'data' and 'precision' params by defining line protocol grammar, field value types (123i for integers, t/f for booleans), and the timestamp/precision coupling — but noSync and acceptPartial go unexplained.

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 first sentence states a specific verb and resource: 'Write data to InfluxDB using line protocol format', and adds scope ('all versions', 'single records or batches'). It clearly separates itself from query-oriented siblings like execute_query by being a write path, though it never names an alternative explicitly.

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?

Usage is implied rather than stated: the reader infers this is the ingestion path for line protocol and that execute_query is for reads. The only conditional guidance is operational ('Use any precision if writing data with no timestamp') and 'Always specify correct precision parameter to match your timestamp format' — there is no when-not-to-use or alternative routing.

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