Response Hygiene
Context overflow protection — selective fields, filters, pagination, and smart truncation.
Overview
Every action call supports four universal hygiene parameters that are processed gateway-side before the response reaches the agent. This actively protects the agent's context from overflow.
Hygiene Parameters
| Parameter | Type | Description |
|---|---|---|
_select | string | Comma-separated list of fields to return. Supports dot-notation for nested objects (e.g., "name, owner.login") |
_filter | string or object | Equality filter applied to array responses (e.g., "state=open" or {"state": "open"}) |
_limit | integer | Maximum number of items to return from array responses |
_offset | integer | Number of items to skip (pagination) |
Example: Selective Fields
json
{
"action": "repos_repos_list-for-user",
"parameters": {
"username": "v3rm1ll1on",
"_select": "name, owner.login, stargazers_count",
"_limit": 5
}
}Instead of the full repository objects (with dozens of fields), the agent only receives the three requested fields.
Automatic Truncation
Responses are automatically truncated to prevent context overflow:
| Context | Default Limit | Config Key |
|---|---|---|
| Standard responses | 30,000 characters | limit_standard |
| Inspection responses | 20,000 characters | limit_inspect |
When truncation occurs, the agent receives a hint:
(Note: Result truncated to prevent context overflow. Use '_select' or '_limit' for better hygiene.)Smart Truncation (ResponseSquisher)
The ResponseSquisher goes beyond simple cutting:
- JSON Structure Preservation: Truncates oversized strings or lists without destroying the JSON format.
- Semantic Truncation: Intelligently removes irrelevant or repetitive data.
- Nested Filtering:
_selectand_filterwork correctly on deeply nested data structures.
💡 TIP
Use
_select and _limit consistently in every call. This significantly reduces token consumption and improves the agent's response quality.