[FEATURE] Improve /context command: hide or summarize MCP tool definitions showing 0 tokens
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When running the /context command to check token usage, the output includes a long list of all
MCP tool definitions (28 in my case), each showing "0 tokens". This clutters the output and makes
it harder to quickly understand where tokens are actually being consumed.
The problem is that:
- MCP tool definitions themselves consume negligible tokens (always show 0)
- The actual data returned by these tools is counted under "Messages" (where it matters)
- Scrolling through 28+ lines of "toolName: 0 tokens" provides no actionable information
- The
/contextcommand's purpose is to help understand token budget, but this noise obscures
the useful data
When debugging context issues or checking remaining capacity, I need to focus on what's actually
consuming tokens, not infrastructure that has zero cost.
Proposed Solution
Proposed Solution
When all MCP tools show 0 tokens, display a single summary line instead of listing each tool
individually:
Current behavior:
MCP tools · /mcp
└ mcp__atlassian__atlassianUserInfo: 0 tokens
└ mcp__atlassian__getAccessibleAtlassianResources: 0 tokens
└ mcp__atlassian__getConfluencePage: 0 tokens
... (25 more lines)
Proposed behavior (Option A - Summary):
MCP tools · /mcp
└ 28 tools available (0 tokens)
Alternative (Option B - Conditional display):
Only list MCP tools if any have non-zero token cost. Otherwise, hide the section entirely or show
just the summary line.
This keeps the focus on actionable information while still confirming MCP tools are available.
Alternative Solutions
- Collapse by default: Show "MCP tools: 28 available (0 tokens) [expand]" with option to
expand
- Filter to non-zero only: Only display tools that have consumed tokens
- Move to verbose mode: Keep detailed tool list available via
/context --verboseflag - Group by cost: Separate "Active tools (consuming tokens)" from "Available tools (0 tokens)"
Currently using: Scrolling past the MCP tools section or piping output through grep -v "mcp__"
to filter it out.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
Scenario: I'm working on a skill that makes many Jira queries via MCP. My context fills up and
I want to understand where tokens are going.
Current experience:
- Run
/contextto check token usage - See: "anthropic-claude-4-sonnet · 158k/200k tokens (79%)"
- Scroll past 28 lines of "mcp__toolname: 0 tokens"
- Find useful info: "Messages: 114k tokens (57.0%)"
- Have to mentally ignore the MCP tools section every time
Desired experience:
- Run
/contextto check token usage - See: "anthropic-claude-4-sonnet · 158k/200k tokens (79%)"
- See: "MCP tools: 28 available (0 tokens)"
- Immediately see: "Messages: 114k tokens (57.0%)"
- Focus on actionable data without scrolling
This becomes more important when:
- Running
/contextfrequently during development - Debugging context overflow issues
- Multiple MCP servers are configured (more tools = more noise)
Additional Context
Technical note: MCP tool definitions (schemas) consume minimal tokens, while tool results
are counted under "Messages". Since results are what matter, the current display prioritizes
showing infrastructure over consumption.
Context from community: This issue was discovered while developing a custom skill that makes
15+ MCP queries per invocation. The /context output became difficult to parse due to the tool
list length.
Impact: Low severity but affects frequent /context users. More MCP servers = longer tool
lists = worse UX.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗