Response Shaping
Some connector tools return large blocks of data that your AI rarely needs — most often static schema metadata (catalogs of every possible filter value) or vendor bookkeeping (audit and hyperlink envelopes). Those blocks are identical on every call and can crowd out the useful part of a response, spending your agent's context window (and tokens) on noise.
Response shaping lets StackJack subtract those low-value fields from a tool's response before it reaches your AI. It is deliberately narrow:
- Subtractive only. Shaping can remove a field or subtree. It never adds, renames, reorders, re-types, or wraps anything. Every byte that is kept is byte-identical to what the vendor sent — the same raw-JSON passthrough StackJack always returns, just with a named block removed.
- Opt-in. Nothing about any connector's output changes until you enable a rule. With no rule enabled, a response is exactly what it is today.
- Recoverable. A shaped response is never stored, so you can always ask for the full, untrimmed payload on demand (see Getting the full response back, below).
- Your data is never touched. Shaping only ever targets curated metadata blocks that StackJack has classified as safe. The
datapayload of a response, and error bodies, are never eligible.
What's available today
Response shaping is in early rollout. Today it ships a single built-in optimization:
| Preset | Connector | Tools it applies to | What it removes |
|---|---|---|---|
| IT Glue — drop filter catalogs | IT Glue | itg_list_organizations, itg_list_configurations |
The JSON:API meta.filters block — the static permitted-value catalogs that enumerate every filterable field. Pagination cursors under meta are kept. |
On IT Glue's list endpoints, meta.filters is a large, static schema catalog returned identically on every call (including empty result sets) and never needed to page or read your data. Dropping it typically saves a couple of thousand tokens per call, with zero data loss.
This preset is off by default. More presets — for other connectors and field classes — will appear here as StackJack authors and verifies them against live responses. Until a preset exists for a connector, that connector's responses are unaffected.
Turning it on for your tenant
- Open Response Shaping in the portal (the
/response-shapingpage). This requires a tenant admin (authoring) role. - Choose a connector. Presets and any custom rules for that connector are listed.
- Toggle a preset on. Use Preview to see exactly which fields a preset removes, against a sample response, before enabling it.
A rule you enable applies to that connector's matching tools for your tenant only, from the next call onward. Toggle it off to return to full responses immediately.
Response shaping is enabled at the platform level by StackJack. If the page shows the feature as off or a rule as unavailable, it has not yet been switched on for your platform — contact support.
Getting the full response back
Shaping is designed so the untrimmed payload is always one step away:
- Per request —
includeFullMeta. The shaped IT Glue list tools (itg_list_organizations,itg_list_configurations) accept an optionalincludeFullMeta: trueparameter. When set, that single call bypasses shaping and returns the complete response — for example when your agent needs the filter catalog to discover a validorganization_type_id. - Per client — a Full profile. Where your AI connects through a StackJack MCP client credential, that client can be set to a Full response profile so all of its calls skip shaping — useful for a debugging or full-fidelity client running off the same account.
- Operator Live Testing. StackJack support can run any of your tools with shaping bypassed when helping you troubleshoot.
Custom rules
Beyond the built-in presets, tenant admins can author a custom rule with a JSON-Pointer picker that only ever offers fields StackJack has classified as safe to strip. This surface is intentionally narrow and early:
- It is available only for connectors that have a defined set of strippable field classes. Today that is IT Glue only — other connectors show no strippable fields yet.
- Presets are the recommended path; custom rules are for tenants who want to trim a specific safe field on their own.
Because the picker is restricted to StackJack's curated allowlist, a custom rule can never remove your data or an error body — the same guarantees as a preset.
Caveats
- Shaped responses are not stored. There is no server-side copy of the original to look up after the fact; recover the full payload with
includeFullMeta, a Full client profile, or operator Live Testing. - Early rollout. Only IT Glue has a shipped preset and field class today. Treat the feature as available but still expanding — nothing changes for a connector until a rule exists and you enable it.
- Custom rule matching is exact. A custom rule targets tools by an explicit name (or list of names); make sure it matches the tool you intend, or it will simply do nothing.
For IT Glue specifically, see the IT Glue tools reference and the IT Glue connector guide.