Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Add LLM hints for MCP channel results - #16

Merged
jinglemansweep merged 1 commit into
mainfrom
claude/add-mcp-channel-hints-01EmtUCEoci8CBA1bnbMiZPJ
Nov 22, 2025
Merged

jinglemansweep merged 1 commit into
mainfrom
claude/add-mcp-channel-hints-01EmtUCEoci8CBA1bnbMiZPJ

Conversation

@jinglemansweep

Copy link
Copy Markdown
Contributor

Implements three complementary approaches to help LLMs understand channel usage:

  1. Enhanced Parameter Descriptions: Updated tool docstrings with detailed information about common channel names (e.g., "general", "public" map to channel 0)

  2. Rich Return Context: Responses now include friendly channel names like "0 (General/Public)" instead of just the number, helping the LLM learn the channel ecosystem

  3. Input Flexibility: The channel parameter now accepts both integers and string names ("general", "public", "main", "default" all map to 0), providing better UX and clearer intent

New helper functions:

  • parse_channel_input(): Parses string names or numbers, with validation
  • get_channel_display_name(): Returns friendly display names for channels

This addresses the common case where users say "send to general" or "send to public" without specifying channel 0.

Implements three complementary approaches to help LLMs understand channel usage:

1. **Enhanced Parameter Descriptions**: Updated tool docstrings with detailed
   information about common channel names (e.g., "general", "public" map to
   channel 0)

2. **Rich Return Context**: Responses now include friendly channel names
   like "0 (General/Public)" instead of just the number, helping the LLM
   learn the channel ecosystem

3. **Input Flexibility**: The channel parameter now accepts both integers
   and string names ("general", "public", "main", "default" all map to 0),
   providing better UX and clearer intent

New helper functions:
- parse_channel_input(): Parses string names or numbers, with validation
- get_channel_display_name(): Returns friendly display names for channels

This addresses the common case where users say "send to general" or "send
to public" without specifying channel 0.
Copilot AI review requested due to automatic review settings November 22, 2025 01:49
@jinglemansweep
jinglemansweep merged commit d1c4e0f into main Nov 22, 2025
3 checks passed
@jinglemansweep
jinglemansweep deleted the claude/add-mcp-channel-hints-01EmtUCEoci8CBA1bnbMiZPJ branch November 22, 2025 01:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds LLM-friendly enhancements to help AI assistants understand and use mesh radio channels more intuitively. The changes introduce three complementary approaches:

  • Enhanced parameter descriptions with common channel name mappings
  • Rich return context showing friendly channel names (e.g., "0 (General/Public)")
  • Input flexibility accepting both integers (0-7) and string names ("general", "public", "main", "default")

Key changes include:

  • New parse_channel_input() helper to handle both numeric and string channel inputs
  • New get_channel_display_name() helper to provide user-friendly channel labels
  • Updated meshcore_send_message() to accept string channel names in addition to numbers
Comments suppressed due to low confidence (2)

src/meshcore_mcp/server.py:10

  • Import of 'asyncio' is not used.
import asyncio

src/meshcore_mcp/server.py:12

  • Import of 'Dict' is not used.
    Import of 'Any' is not used.
from typing import Optional, List, Dict, Any

Parse channel input which can be either a channel number (int) or a channel name (str).

Args:
channel_input: Channel number (0-7) or common name like "general", "public", "main"

Copilot AI Nov 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring lists "general", "public", "main" as examples but omits "default" which is also a valid channel name according to CHANNEL_NAME_MAP (line 59). The documentation should include all accepted channel names for completeness.

Copilot uses AI. Check for mistakes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants