Open
Conversation
After moving tb-prod to the generic resource layer, CLI token usage
regressed from 4x better than MCP to 3x worse. This restores the
advantage with three key changes:
1. CSV default output for query/search — 36x smaller than JSON, with
schema-driven column selection (displayColumns) and auto-resolved
relationship names via sideloaded includes + org cache.
2. Auto-apply default filters — resources with defaultFilters in
schema.json (tasks, projects, people, etc.) get sensible defaults
merged with user filters. Eliminates the need to call `describe`
before querying.
3. Compact output for create/update/delete — one-line confirmation
with ID instead of full JSON response.
Also fixes:
- Operator syntax in flat filters: {"field": {"eq": "value"}} now
correctly extracts the operator instead of stringifying the object.
- Prime output updated with CSV/auto-filter notes and common queries
section with baked-in person_id.
- SKILL.md updated to reflect new defaults.
- Benchmark script updated for current MCP tool names and /tmp CWD.
Benchmark results (my_tasks):
Before: CLI 1,323K tokens, 18 calls, 88s (3x worse than MCP)
After: CLI 161K tokens, 2 calls, 24s (2.5x better than MCP)
Note: defaultFilters and displayColumns are hand-edited in schema.json.
They need to be added to generate-schema.ts in ai-agent before the
next schema regeneration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
query/search— 36x smaller than JSON, with schema-driven columns (displayColumns) and auto-resolved relationship namesdefaultFiltersin schema.json scopes queries automatically (e.g. tasks → open tasks in active projects). Eliminates thedescribecall.create/update/delete— one-line confirmation with ID instead of full JSON{"field": {"eq": "value"}}) now works correctlyBenchmark results (my_tasks)
defaultFiltersanddisplayColumnsare hand-edited inschema.json. They need to be added togenerate-schema.tsin ai-agent before the next schema regeneration.Test plan
--format jsonpassthrough has no regressions🤖 Generated with Claude Code