Elemm
HomeDocsFAQ
Star on GitHub
HomeDocsFAQ
Star on GitHub
Docs
Getting StartedWhat is Elemm?Core InstallationMCP Client SetupDocker Deployment
PlatformDashboard & ObservabilityConfiguration Reference
ProtocolThe Discovery ProtocolThe 9 Core ToolsSequence Engine & Data PipingResponse Hygiene
GatewayMulti-Protocol SupportSecurity (Guardian)Vault — AuthenticationProduction & VPS SecurityCLI Reference
DeveloperBuilding Landmark ServersExposing Landmark ServersSmartRepair & Error CodesPydantic & Smart UnboxingDeclarative YAML Configuration

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

ParameterTypeDescription
_selectstringComma-separated list of fields to return. Supports dot-notation for nested objects (e.g., "name, owner.login")
_filterstring or objectEquality filter applied to array responses (e.g., "state=open" or {"state": "open"})
_limitintegerMaximum number of items to return from array responses
_offsetintegerNumber 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:

ContextDefault LimitConfig Key
Standard responses30,000 characterslimit_standard
Inspection responses20,000 characterslimit_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: _select and _filter work 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.
Elemm Logo

The Landmark Manifest. Exposing system interfaces natively to AI agents.

Framework

HomeAboutDocumentation

Community

GitHubDiscordPyPI Package

Legal

License: GPLv3© 2026 Marc Stöcker
elemm.dev — Infrastructure for the Agentic Web.