Skip to main content
Glama

nmea_parse

Parse NMEA 0183 GPS/BeiDou serial sentences into readable UTC, latitude/longitude, fix quality, satellites, HDOP, speed, and date. Validate XOR checksums and flag corrupt or non-NMEA lines.

Instructions

解析 NMEA 0183 语句(GPS/北斗模块最常见的串口输出),给人话解读。

支持 GGA/RMC/GSA/GSV/VTG/GLL,逐句输出 UTC 时间、经纬度(度分 + 十进制度)、 定位质量、卫星数、HDOP、速度、日期。把模块吐出来的整段原始数据直接贴进来: nmea_parse("$GNGGA,012345.00,3112.3456,N,12122.3456,E,1,08,0.9,12.3,M,,M,,*47") ★ 每句都验 XOR 校验和,不过的会明说「这句数据不可信」,不会把错帧当对的解。 ★ 非 NMEA 的行会单独指出并跳过,不当成数据。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/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 does so well: it discloses per-sentence XOR checksum validation, that failed frames are explicitly flagged as untrustworthy rather than silently misinterpreted, and that non-NMEA lines are flagged and skipped. Missing only limits, but the key correctness/error-handling behavior is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose, then supported types and output fields, then a runnable example, then the two behavioral caveats. Every line adds value and nothing is redundant.

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?

An output schema exists so return values needn't be detailed, yet the description still summarizes emitted fields (UTC, lat/lon, fix quality, sats, HDOP, speed, date). Combined with the behavioral notes, it is sufficient for a single-parameter parser; only edge conditions like mixed valid/invalid input handling are implicit.

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 0% for the single 'text' parameter, so the description must compensate and largely does — it defines the input as the full raw NMEA string and supplies a literal example, removing ambiguity about format.

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 (解析/parse) and resource (NMEA 0183 语句) and enumerates the exact supported sentence types (GGA/RMC/GSA/GSV/VTG/GLL). An agent can distinguish this from sibling parsers like modbus_parse, frame_parse, or analyze_log without opening any schema.

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?

Explicitly instructs how to feed the tool ('把模块吐出来的整段原始数据直接贴进来' — paste the whole raw module output) and provides a concrete literal example call. It gives clear context but does not contrast with alternative parsers or state when NOT to use it.

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