Skip to main content
Glama
danroblewis

G1 UART MCP Server

by danroblewis

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
scan_g1_devicesA

Scan for available G1 devices.

Returns:
    Dict[str, Any]: JSON response with scan results including:
        - result: "success" or "error"
        - devices: List of discovered devices with their properties
        - count: Number of devices found
        - error: Error message if scan failed
    
Note:
    This performs an actual BLE scan for devices with names containing "G1_" pattern.
    Returns a structured list of discovered devices with their addresses and signal strength.
connect_g1_deviceA

Connect to a G1 device by address.

Args:
    address (str): The Bluetooth MAC address of the G1 device to connect to.
                  Format should be XX:XX:XX:XX:XX:XX where X are hexadecimal characters.
                  Example: "AA:BB:CC:DD:EE:FF"

Returns:
    Dict[str, Any]: JSON response with connection status including:
        - result: "success" or "error"
        - connected: Boolean indicating connection state
        - device_name: Name of connected device (if successful)
        - device_address: Address of connected device (if successful)
        - error: Error message if connection failed
    
Note:
    This establishes a BLE connection to the specified device and discovers
    the Nordic UART service and characteristics.
disconnect_g1_deviceA

Disconnect from the current G1 device.

Returns:
    Dict[str, Any]: JSON response with disconnection status including:
        - result: "success" or "error"
        - disconnected: Boolean indicating disconnection state
        - device_name: Name of previously connected device (if successful)
        - error: Error message if disconnection failed
    
Note:
    This closes the BLE connection to the currently connected device,
    cleans up resources, stops the heartbeat mechanism, and resets connection state.
get_g1_connection_statusA

Get current connection status and device info.

Returns:
    Dict[str, Any]: JSON response with detailed connection status including:
        - result: "success" or "error"
        - connected: Boolean indicating connection state
        - device_name: Name of connected device (if connected)
        - device_address: Address of connected device (if connected)
        - uart_service_available: Boolean indicating UART service availability
        - tx_characteristic_available: Boolean indicating TX characteristic availability
        - rx_characteristic_available: Boolean indicating RX characteristic availability
        - pending_messages_count: Number of pending messages
        - total_messages: Total message count
        - error: Error message if status check failed
    
Note:
    This returns detailed status information including:
     - Connection state (connected/disconnected)
     - Device name and address (if connected)
     - UART service availability
     - Number of pending messages
     - Total message count
send_g1_messageA

Send a message to the connected G1 device.

Args:
    hex_data (str): Hexadecimal string representation of the message to send.
                   Can contain spaces, tabs, or other whitespace which will be automatically removed.
                   Should contain only valid hexadecimal characters (0-9, A-F, a-f).
                   Examples: "2506", "25 06", "25 06 00 01", "25 06 00 01 04 02"

Returns:
    Dict[str, Any]: JSON response with message status including:
        - result: "success" or "error"
        - message_sent: Boolean indicating if message was sent
        - response_received: Boolean indicating if response was received
        - response_data: Response data in hex format (if received)
        - timeout: Boolean indicating if message timed out
        - error: Error message if sending failed
    
Note:
    This sends the hex_data as bytes to the connected G1 device using the
    Nordic BLE UART protocol and waits for a response up to 2 seconds.
    All messages are treated as commands and will timeout after 2 seconds if no response is received.
    Spaces, tabs, and other whitespace in hex_data are automatically removed before processing.
    
Examples:
    - send_g1_message("2506") -> Sends command 0x25 with data 0x06
    - send_g1_message("25 06") -> Same as above (spaces removed)
    - send_g1_message("25 06 00 01") -> Sends 0x25060001
    - send_g1_message("ABCD 1234") -> Sends 0xABCD1234
    - send_g1_message("1234567890ABCDEF") -> Sends longer message

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: connect, disconnect, get status, scan, and send message. The descriptions specify unique actions (e.g., connect_g1_device establishes a connection, while send_g1_device transmits data), making misselection unlikely. Tools are well-differentiated by their core functions within the G1 UART device management workflow.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with 'g1_device' or 'g1_message' as the noun, using snake_case throughout (e.g., connect_g1_device, send_g1_message). The naming is predictable and uniform, enhancing readability and agent usability without any deviations in style or structure.

Tool Count5/5

With 5 tools, the server is well-scoped for managing G1 UART devices, covering essential operations like connection, disconnection, status checking, scanning, and message sending. Each tool serves a necessary role in the device lifecycle, avoiding bloat or gaps, making the count ideal for the domain's typical workflows.

Completeness5/5

The tool set provides complete coverage for G1 UART device management, including connection lifecycle (connect, disconnect, status), device discovery (scan), and data interaction (send message). There are no obvious gaps; agents can perform all core operations from scanning to communication without dead ends or missing critical functions.

Maintenance

ActivityInactive
ResponsivenessNo issues