Skip to main content
Glama
aimdb-dev

aimdb-mcp

Official

drain_record

Drain all pending values from a record since the previous call and return them chronologically. This destructive read supports batch analysis; drained values are not returned again.

Instructions

Drain all pending values from a record since the last drain call. Returns values in chronological order. This is a destructive read — drained values won't be returned again. Use this for batch analysis of accumulated data (e.g., time-series analysis, trend detection). The first drain call creates a reader and returns empty (cold start). Subsequent calls return all values accumulated since the previous drain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of values to drain. Optional, defaults to all pending.
endpointNoEndpoint URL (unix://PATH, serial://DEVICE?baud=N) or a bare path. Falls back to AIMDB_CONNECT env var if omitted.
record_nameYesName of the record to drain (e.g., temp.berlin)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that this is a destructive read whose values are consumed, the chronological ordering of results, and the non-obvious cold-start behavior where the first call creates a reader and returns empty. These are exactly the traits an agent would otherwise get wrong.

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 destructive semantics and ordered logically, but the 'since the last drain call' / 'since the previous drain' idea is stated twice, which is mild redundancy for a five-sentence description.

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?

No output schema and no annotations, so the description must cover returns and side effects — it explains ordering, emptiness on cold start, and consumption. It stops short of describing the value payload shape or error/concurrency behavior, but it is adequate for correct invocation.

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 limit, endpoint, and record_name are already documented in the schema. The description adds no syntax, format, or interaction detail beyond that, so the baseline of 3 applies.

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?

States a specific verb (drain) and resource (pending values from a record) with explicit scope ('since the last drain call'). The destructive-read framing separates it cleanly from the read-only sibling get_record.

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?

Gives a clear use case ('batch analysis of accumulated data — time-series analysis, trend detection'), which tells the agent when this tool is appropriate. It does not, however, explicitly name an alternative such as get_record or state when not to use this tool.

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