Skip to main content
Glama
influxdata

InfluxDB MCP Server

Official
by influxdata

write_line_protocol

Writes data to InfluxDB using line protocol format. Supports single records or batched writes with configurable timestamp precision.

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.

Input Schema

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

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It does this well by explaining line protocol syntax, field value types, timestamp precision requirements, and escaping needs. It also states 'all versions' and batch support. It lacks details on error handling or side effects beyond writing, but the write operation itself is clearly described with practical examples.

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 long (~200 words) but well-structured with clear sections (Line Protocol Syntax, Components, Field Value Types, Examples, Important). It front-loads the purpose and then provides necessary format details. Some redundancy, like repeating 'comma-separated key=value pairs,' but the structured format and examples justify the length.

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?

Given the tool complexity (custom line protocol format), 5 parameters, no annotations, and no output schema, the description covers syntax, types, examples, precision, and escaping. It does not explicitly state return values or error behavior, but for a write tool this is reasonably complete. The presence of a detailed schema further supplements parameter usage.

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 description coverage is 100%, so the baseline is 3. The description adds substantial value beyond the schema by explaining the line protocol structure, field types (strings, floats, integers with 'i', booleans), and the importance of matching precision to timestamp format. These details directly help construct the 'data' parameter correctly, which the schema description only handles at a high level.

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 opens with a specific verb and resource: 'Write data to InfluxDB using line protocol format (all versions).' It clearly distinguishes from sibling query tools by indicating this is for writing data, not reading or managing. The line protocol format is explicitly named, making the tool's core function unambiguous.

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?

The description provides clear context for when to use the tool: it supports single records or batches and emphasizes precision handling and escaping. While it doesn't explicitly mention alternatives, the sibling tools are predominantly read/query/management operations, so the usage context is clear. No explicit when-not-to-use guidance, but the detailed examples and syntax instructions inherently guide correct invocation.

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