Skip to main content
Tools & Catalog

Response Shaping: Trimming Tool Responses to Save Context

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…

Written By Christopher Scaminaci

Last updated 3 days ago

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 often repeated across calls and can crowd out the useful part of a response, spending your agent's context window (and tokens) on noise.

Not everything a preset removes is metadata. One shipped preset trims real business and contact fields — a ticket's long description text, the requester's email address, the reported-by name — off every row of a Halo ticket list. Read each preset's own row in the table below before you enable it, and use Preview to see the exact fields against a sample response. A field a rule removes is absent from that response: your AI cannot see it, cannot report it, and will not know it was there.

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 on a new call. Response shaping does not create a retained recovery copy. The bypasses below make another live call without shaping, so the returned records can differ if the vendor data changed between calls. Separately, an Automation can retain the raw pre-shaped vendor response only when the automation has fixture recording turned on. Capture is best effort and follows the fixture feature's own access and retention controls; it is not a response-shaping recovery mechanism or a universal response archive.
  • Your connector data is never changed. Shaping does not write anything back to the connector. It only removes returned fields from StackJack's positive allowlist; the data payload and error bodies are never eligible.

What's available today

Response shaping is in early rollout. Today it ships three built-in optimizations:

PresetConnectorTools it applies toWhat it removes
IT Glue — drop filter catalogsIT Glueitg_list_organizations, itg_list_configurationsThe JSON:API meta.filters block — the static permitted-value catalogs that enumerate every filterable field. Pagination cursors under meta are kept.
HaloPSA — drop ticket form and outcome catalogsHaloPSAhalo_get_ticketThe ticket-type configuration Halo embeds in every ticket: the form-layout definitions (tickettype.fields, tickettype.userfields) and the action-button catalog (outcomes). The ticket itself, its custom-field values, and the ticket type's id and name are all kept.
HaloPSA — trim verbose fields from ticket list rowsHaloPSAhalo_list_ticketsFive long free-text and contact fields Halo repeats on every row: details, user_email, reportedby, emailtolist and idsummary. The id, summary, status, client, site, contact name, team, dates and SLA fields are all kept.

On IT Glue's list endpoints, meta.filters is a static schema catalog that can be repeated even on empty result sets and is not needed to page or read your business records. Dropping it can save substantial context with no business-record or pagination loss; the metadata block itself is intentionally omitted and remains available through the bypasses below.

HaloPSA embeds your ticket type's whole form design — every field's label, hint, tab position and per-role visibility — plus the full catalog of configured action buttons, into every single ticket you read. All of it is identical for every ticket of that type. Measured against a live Halo instance, removing it left a plain halo_get_ticket response 54% smaller, and 81% smaller when called with includeDetails. Nothing about the ticket itself is lost — the summary, details, status, client, contact and your own custom-field values all stay, as do the ticket type's id and name.

To get the removed blocks back, use includeFullMeta (below). Note one thing before reaching for a different tool instead: halo_list_outcomes is not a substitute for the removed outcomes block. It returns every outcome configured in your instance, whereas the block embedded in a ticket is the smaller set actually valid for that ticket's type and workflow step — on the instance we verified, 68 versus 9. If your agent needs to know which action it may take on a specific ticket, use includeFullMeta: true. The form-field definitions, by contrast, are fully available from halo_list_ticket_type_fields.

HaloPSA's list rows are a different shape of the same problem. A ticket list keeps almost all of its size inside the rows rather than in one metadata block, so trimming it means removing a field from every row at once. The five the preset removes are the longest free text and the contact strings a list caller usually reads past; everything you scan a list for stays. If you need the full text of one ticket you found in the list, read it with halo_get_ticket.

All three presets ship off by default. StackJack may add more presets only after verifying their field classes against live responses. Until a preset or custom rule exists for a connector, that connector's responses are unaffected.

Shaping trims what you receive, not what Halo sends. Every rule runs on StackJack's side, after Halo has already answered — so it reduces what reaches your AI client and the context it spends, but the data still leaves your Halo instance and crosses the network first. If your goal is for Halo to send less, that is a different lever: halo_list_tickets takes ticketIdOnly: true, a Halo-side mode that returns only id-shaped fields. It is all or nothing (you lose the summary, details, dates, team and contact names), and Halo ignores paging when it is set, so narrow with filters first. The two are complementary: ticketIdOnly for harvesting ids, the list-row preset for a readable list. Halo's two other documented list options, default_columns and columns_id, were tested live on 2026-09-06 and both made responses larger, so StackJack does not expose them.

Turning it on for your tenant

  1. Open Connectors, find the connector, and choose Response shaping. That opens the Response shaping section of the Settings page (in the sidebar, under More) with the connector already selected. The old /response-shaping address still works and takes you to the same place.
  2. To look at another connector, choose it in the section's connector picker. Presets and any custom rules for that connector are listed.
  3. Toggle a preset on. Use Preview to see exactly which fields a preset removes, against a sample response, before enabling it.

Owners and Administrators can create or toggle rules. Members can inspect the rules but cannot change them. A rule applies to that connector's matching tools for your tenant only after the response-shaping caches refresh; allow a brief propagation window after turning it on or off.

If an enabled rule still does not shape after a few minutes, contact support rather than recreating the rule.

Getting the full response back

Shaping is designed so the untrimmed payload is always one step away:

  • Per request — includeFullMeta. Four shaped tools accept an optional includeFullMeta: true parameter: the IT Glue list tools (itg_list_organizations, itg_list_configurations), halo_get_ticket and halo_list_tickets. When set, that live call bypasses shaping and returns its complete response — for example when your agent needs IT Glue's filter catalog to discover a valid organization_type_id, the Halo outcomes block to see which action buttons are valid on that particular ticket before writing to it, or the full list rows that the halo.ticket-list-rows preset trims. If you only need the full text of one ticket you found in a list, reading it with halo_get_ticket is cheaper than re-listing with includeFullMeta.
  • 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 its eligible 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 and HaloPSA — other connectors show no strippable fields yet.
  • For HaloPSA the picker also offers a class the presets do not use: Halo's underscore-prefixed UI permission and search-scoring flags (_canupdate, the _can_*_att attachment permissions, _open_search_score). These describe what Halo's own web UI would render, not the ticket, and are yours to trim if you want them gone.
  • 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 cannot remove the response's data payload or an error body — the same guarantees as a preset.

Caveats

  • No response-shaping recovery copy is stored. Use includeFullMeta, a Full client profile, or operator Live Testing to make a new untrimmed call. Automation fixture recording is a separate, best-effort opt-in system: when the automation has fixture recording turned on, it attempts to capture the raw vendor result before shaping. A capture failure after a successful vendor call is not turned into an error or retry, because retrying could repeat the connector action. Review fixture access and retention independently and do not treat fixtures as a complete response archive.
  • Early rollout. Only IT Glue and HaloPSA have a shipped preset and field classes today. Treat the feature as available but still expanding — nothing changes for a connector until a rule exists and you enable it.
  • Named fields only. Shaping removes a named field or subtree — a whole block off a response, or one named field out of every row of a list. It never removes a row, reorders anything, or edits a value it keeps.
  • 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. For HaloPSA, see the HaloPSA tools reference and the HaloPSA connector guide.