Skip to main content

Module engine

Module engine 

Source
Expand description

CompressionEngine — pure, stateless formatter for tool listings and schemas.

All methods are pure functions: no I/O, no side-effects, no async. This makes them trivially testable in isolation.

§Format rules (mirrors Python _format_tool_description)

LevelOutput shape
Max<tool>name</tool>
High<tool>name(arg1, arg2)</tool>
Medium<tool>name(arg1, arg2): First sentence of description</tool>
Low<tool>name(arg1, arg2): Full description</tool>

format_listing at Max always returns an empty string; the frontend server instead exposes a dedicated list_tools MCP tool for that level.

Structs§

CompressionEngine
Stateless compression engine.
Tool
A single MCP tool as seen by the compression engine.