feat: MCP server shortens messages when necessary #100
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.
This pull request introduces significant enhancements to the
src/mcp-server.js
file, focusing on improving the functionality for handling social media strategies and posts. Key changes include the addition of new tools for message validation, length calculation, and resizing, as well as schema definitions for better input validation. Minor updates were also made to testing instructions in.github/copilot-instructions.md
.Enhancements to Social Media Tools:
New tools for managing posts and strategies:
list-services
), checking message length (check-message-length
), calculating message length (calculate-message-length
), and resizing messages (resize-message
). These tools streamline operations for social media posts and ensure messages fit platform-specific constraints. [1] [2]crosspost
tool to provide prompts for posting messages to all services, improving clarity and usability.Message resizing prompt:
shortenMessagePrompt
to generate detailed instructions for resizing messages while preserving meaning and tone. This ensures compliance with character limits while maximizing space usage.Schema Definitions:
socialMediaPostSchema
,strategyMessageSchema
, andshortenMessageSchema
to validate inputs for tools likepost-to-social-media
andresize-message
. These schemas enhance data integrity and prevent errors.Testing Guidelines Update:
.github/copilot-instructions.md
to recommend organizing tests within singledescribe
blocks, usingbeforeEach
for setup andafterEach
for cleanup, and ensuring readability with empty lines between blocks.