This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Repository navigation
Add LLM hints for MCP channel results - #16
Merged
jinglemansweep merged 1 commit intoNov 22, 2025
Merged
Conversation
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.
jinglemansweep
deleted the
claude/add-mcp-channel-hints-01EmtUCEoci8CBA1bnbMiZPJ
branch
November 22, 2025 01:49
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements three complementary approaches to help LLMs understand channel usage:
Enhanced Parameter Descriptions: Updated tool docstrings with detailed information about common channel names (e.g., "general", "public" map to channel 0)
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
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:
This addresses the common case where users say "send to general" or "send to public" without specifying channel 0.