Skip to content

feat(mcp): posts and comments reads default to view=summary for agents - #90

Merged
Gintm merged 1 commit into
developfrom
perf/mcp-slim-posts-and-comments
Nov 12, 2026
Merged

Gintm merged 1 commit into
developfrom
perf/mcp-slim-posts-and-comments

Conversation

@Gintm

@Gintm Gintm commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Why

zernio-dev/Schedule-Posts-API#8198 adds view=summary to GET /v1/posts, GET /v1/inbox/comments/{postId} and GET /v1/inbox/comments. Measured on real data: comment pages 18.4K → 7.1K chars on average (−61%, 324 cached prod pages), a 40-post page 122-157K → 23-39K (−75 to −84%). The MCP should ask for it by default.

What

  • AGENT_VIEWS: listPosts, getInboxPostComments and listInboxComments default view to summary (the agent can still pass full).
  • No effect until the spec carries view; the next regeneration after #8198 deploys picks it up.

🤖 Generated with Claude Code

@Gintm

Gintm commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Review

Finding Outcome
None: three one-line AGENT_VIEWS entries, same helper as getAnalytics No change

QA

Check Result
tests/test_mcp_agent_views.py (new parametrized case for the 3 operations) Pass
Full suite pytest tests 1770 passed, 14 skipped
ruff on touched files Clean
CI 4/4 green
Post-deploy (pending) After Schedule-Posts-API#8198 deploys and the spec regenerates, confirm posts_list_posts and comments_get_inbox_post_comments send view=summary (Axiom path filter on the hosted MCP calls)

Metrics

Metric Before Expected after
comments_get_inbox_post_comments chars per call 18.4K avg, 85K p95 7.1K avg, 30K p95 (−61%, 324 real pages)
posts_list_posts chars per call (40-post page) 122-157K 23-39K (−75 to −84%)

Post-deploy: Sentry returned chars per tool, same weekday window as the Nov 11 baseline, accounts_list as control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gintm
Gintm force-pushed the perf/mcp-slim-posts-and-comments branch from 86356b0 to b2ea47c Compare November 12, 2026 12:15
@Gintm
Gintm merged commit e9cd82b into develop Nov 12, 2026
4 checks passed
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