Skip to content

Conversation

@jqnatividad
Copy link
Collaborator

No description provided.

Added logic to extract short command descriptions from the README.md command table for SkillDefinition. Falls back to the first sentence of the USAGE text if not found. Includes a cleaning function to remove markdown links, HTML tags, and certain emojis from the extracted description.
Expanded the 'select' command guidance to include regex and special character usage. Improved the enhanceDescription function to append contextual hints, common patterns, error prevention, and help instructions for each tool, making it easier for users to select and use the correct qsv command. Updated the generic qsv_command tool description to mention the help option.
Shorten and clarify qsv skill descriptions.

Updated the descriptions in multiple qsv skill JSON files to be more concise and focused, removing excessive detail and examples. This improves readability and consistency across the skill definitions.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request optimizes token usage for MCP (Model Context Protocol) tools by replacing verbose descriptions with concise ones extracted from the README.md command table. The change aims to reduce the token count sent to LLMs while preserving essential information, with additional contextual guidance added through the TypeScript layer.

Changes:

  • Added new Rust functions to extract and clean short descriptions from README.md command table
  • Updated description generation logic to prefer concise README descriptions over verbose USAGE text
  • Enhanced TypeScript tool descriptions with structured guidance hints for better tool selection
  • Updated 50+ JSON skill files with concise descriptions optimized for token efficiency

Reviewed changes

Copilot reviewed 67 out of 67 changed files in this pull request and generated 8 comments.

File Description
src/mcp_skills_gen.rs Added extract_short_description_from_readme and clean_readme_description functions to extract concise descriptions from README table; updated parse method to use README descriptions as primary source with fallback to USAGE text
.claude/skills/src/mcp-tools.ts Enhanced select command guidance to include regex selector syntax; added documentation comments explaining the concise description strategy and reference to qsv_help tool
.claude/skills/qsv/*.json Updated 50+ skill definition files with concise descriptions extracted from README, replacing verbose USAGE-based descriptions

[skip ci]
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 67 out of 67 changed files in this pull request and generated no new comments.

@jqnatividad jqnatividad merged commit 3fec547 into master Jan 12, 2026
1 check was pending
@jqnatividad jqnatividad deleted the mcp-optimize-tokens-use branch January 12, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants