refactor: consolidate 47 tools into 8 unified action-based tools#3
Open
jmccardle wants to merge 1 commit intoraohwork:masterfrom
Open
refactor: consolidate 47 tools into 8 unified action-based tools#3jmccardle wants to merge 1 commit intoraohwork:masterfrom
jmccardle wants to merge 1 commit intoraohwork:masterfrom
Conversation
Reduces MCP tool token consumption by 82% (32.7k → 5.7k tokens). New unified tools: - gitea_manual: On-demand documentation lookup (lazy-loaded) - create_gitea: Create resources (issue, label, milestone, etc.) - get_gitea: Get single resource details - list_gitea: List resources with filtering - edit_gitea: Edit existing resources - delete_gitea: Delete resources - link_gitea: Create relationships (labels, dependencies) - unlink_gitea: Remove relationships Key design decisions: - Action-based organization leverages LLM implicit knowledge - Lazy documentation via gitea_manual avoids upfront token cost - Rich error messages include relevant schema for self-correction 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Author
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

I noticed that this MCP server took up ~16% of context every single conversation, even though I mostly only used it to read/write issues. I used almost every action occasionally, but EVERY session was losing thousands of tokens to tools I wouldn't use.
I wrote this refactor to provide a "user manual" tool so that the LLM can read detailed instructions for whichever specific task it's trying to do, and each task supports multiple target objects. I reduced the amount of explanation in the tools' description because LLMs being used to develop software already understand what issues, repositories, and wiki pages are. Lastly, the error messages are designed to give specific, actionable, token-cheap responses that guide the LLM towards making a correct tool call on the second attempt.
Reduces MCP tool token consumption by 82% (32.7k → 5.7k tokens).
New unified tools:
Key design decisions:
🤖 Generated with Claude Code