Skip to main content
Glama

G1 UART MCP Server

by danroblewis

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
scan_g1_devices

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_device

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_device

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_status

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_message

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

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/danroblewis/g1_uart_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server