smart_context_gate
Purpose: Compress long prompts/context (LLMLingua) before the host LLM call. When to use: Context is too large for the model budget and text is already available. When NOT to use: Short messages or already small context. Optional purpose: Pass a short goal (step intent, user query) to pre-filter paragraphs by relevance before compression — e.g. "API rate limits", "pricing tables". Returns: JSON string with compressed text and ratio metadata. Composes with: downstream host LLM; often follows smart_fetch or smart_search.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "smart_context_gate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Long text to compress before the host LLM call. | |
| ratio | No | Target compression ratio (e.g. 0.3–0.7). | |
| purpose | No | Optional goal to pre-filter paragraphs (step intent, user query). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |