Slash Commands
Distill's three MCP slash commands — compress-session, analyze-tokens, forget-large-results
Slash Commands
Distill exposes three slash commands that you can invoke directly inside a Claude Code session. They are declared server-side through the MCP protocol (prompts/list) and Claude Code surfaces them automatically as /mcp__distill-mcp__<name>.
None of these commands takes arguments — the full instruction is baked into the prompt returned by the server. The model reads it and then calls auto_optimize / smart_file_read on its own to do the actual work.
When to prefer a slash command over a direct tool call:
- You want a keyboard shortcut for a common Distill workflow.
- You want to delegate the "what to compress" decision to Claude — the command triggers the analysis, Claude picks the targets.
- You don't need fine-grained arguments (all three commands are argument-free by design).
/mcp__distill-mcp__compress-session
When to use. Your session has just accumulated several large tool results (build logs, diffs, test output) and you want to compress them before Claude Code's autocompact handles them on its own terms.
Example invocation in Claude Code:
/mcp__distill-mcp__compress-sessionExpected behavior. Claude receives a user-role message asking it to review recent tool results, identify the ones exceeding 500 characters of raw output, and call auto_optimize on each. No arguments required — the instruction is already in the prompt.
/mcp__distill-mcp__analyze-tokens
When to use. You're approaching the autocompact threshold (default (contextWindow − reserved) − 13K, i.e. ~167K tokens on a standard 200K model) and you want to know which messages are consuming the most.
Example invocation in Claude Code:
/mcp__distill-mcp__analyze-tokensExpected behavior. Claude estimates session token usage via the roughTokenCountEstimation = length / 4 heuristic, identifies the top three heaviest contributions, then suggests which ones could be compressed via auto_optimize or refactored through smart_file_read.
/mcp__distill-mcp__forget-large-results
When to use. Claude Code has persisted tool results to disk (past the 25K-token MCP threshold defined in claude-code/utils/mcpValidation.ts:16) and you want to identify which ones could be re-compressed to lighten the context.
Example invocation in Claude Code:
/mcp__distill-mcp__forget-large-resultsExpected behavior. Claude lists the paths of persisted results, then proposes the ones that can be re-compressed without losing critical information — typically via auto_optimize calls against the original payloads.
Troubleshooting
The command is not showing up in autocomplete
If /mcp__distill-mcp__compress-session (or either of the other two) doesn't appear in Claude Code's command palette, the distill-mcp server hasn't been wired into your session yet.
Fix. Run the automatic Claude Code setup:
distill-mcp setup --claudeThen restart Claude Code. The three /mcp__distill-mcp__* commands will appear as soon as the next session starts.
Verify the installation
distill-mcp doctorThis confirms Distill is correctly registered in ~/.claude/settings.json and that the distill-mcp binary is reachable on the PATH.
The command is listed but fails when invoked
This almost always means Claude Code saw the commands at startup but the MCP server has since exited. Restart Claude Code and re-check with distill-mcp doctor.