Skip to content

feat(agent-toolkit): shrink get_board_activity responses - #475

Open
stasshw wants to merge 1 commit into
masterfrom
feat/get-board-activity-trim-data
Open

feat(agent-toolkit): shrink get_board_activity responses#475
stasshw wants to merge 1 commit into
masterfrom
feat/get-board-activity-trim-data

Conversation

@stasshw

@stasshw stasshw commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Two small, independent changes to get_board_activity.

1. Return data as a parsed object (not a JSON string)

The data field on each activity row is now parsed and returned as a nested object.

Improves: fewer LLM tokens (no \" escape doubling) and no agent-side parsing to reach fields like action_record_uuid. Applies to 96.7% of outbound bytes on this tool — includeData=true rows carry 2.64 GB of the 2.73 GB weekly total.

2. Drop previous_value when it deep-equals value

When a row's previous_value and value are structurally identical (common on file/asset column events), previous_value is dropped and replaced with previous_value_omitted: "equals_value".

Improves: response bytes on the tail. Top board 18403136209 alone ships 166 MB / week across 80 calls (avg 2.08 MB, max 19.65 MB) — all includeData=true, all dominated by file-array duplication, all shrunk. Estimated 40–60% reduction on the tool's tail bytes.

Notes

  • Uses fast-deep-equal (~1 KB, 60M weekly downloads) rather than hand-rolling equality.
  • undo_action only needs action_record_uuid, which is preserved on every trimmed row.
  • includeData schema description updated so LLMs know about the new marker.

🤖 Generated with Claude Code

- Return `data` as a parsed object instead of a JSON string.
- Drop `previous_value` when it deep-equals `value` (via fast-deep-equal),
  add `previous_value_omitted: "equals_value"` marker. `action_record_uuid`
  and other fields are preserved so undo_action keeps working.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant