Skip to content

fix(mcp): posts_list_posts stops sending view=summary when the agent picks fields - #97

Merged
Gintm merged 2 commits into
developfrom
fix/mcp-posts-fields-with-summary-view
Nov 13, 2026
Merged

Gintm merged 2 commits into
developfrom
fix/mcp-posts-fields-with-summary-view

Conversation

@Gintm

@Gintm Gintm commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Why

py#90 made view=summary the default for agents on posts_list_posts, and the API rejects fields and view=summary together (Send either fields or view=summary, not both, 400). Since py#90 deployed (Nov 12, ~13:21 UTC) the MCP's GET /v1/posts 400 rate went from 0.1-0.4% to 19-30% (Worker, SJC, late-python-sdk): 693 failed calls from 78 sessions in 70 minutes (Axiom zernio-mcp). Reproduced through the hosted MCP.

What

  • The generator leaves the default view out of the request whenever the operation has fields and the agent set it (view=None if fields else view). Only listPosts has both today.
  • Regenerated posts_list_posts: the call and one sentence of its description change.
  • Tests drive the real tool: with fields no view is sent; without it view=summary still is. The first fails on develop.

🤖 Generated with Claude Code

Gintm and others added 2 commits November 12, 2026 18:52
…picks fields

py#90 made view=summary the agents' default for listPosts, and the API answers
400 to fields and view=summary together. Since 13:21 UTC Nov 12, 19-30% of the
MCP's GET /v1/posts calls failed that way (78 sessions in 70 minutes). The
default view is now left out whenever fields is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gintm

Gintm commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Review (code-review high --fix)

Finding Result
fields="" is falsy, so view=summary was still sent next to an empty fields Fixed: an empty fields is not sent (fields or None), test added
An explicit view=summary with fields is now dropped instead of answered with 400 Skipped: the agent gets the projection it asked for and saves a turn; the description says view is not sent with fields
The conflict could be resolved in the API (fields wins) Skipped: only the MCP defaults to summary; direct API callers that send both chose both

QA

Check Result
Reproduced on the hosted MCP: posts_list_posts with fields 400 Send either fields or view=summary, not both
Patched tool, real MCP server, mocked API: with fields no view in the request
Without fields view=summary still sent
New test on develop fails (proves it covers the bug)
Full suite 1,802 passed

Metrics

Metric Before Expected after
MCP GET /v1/posts 400 rate (Worker, SJC, late-python-sdk) 0.1-0.4% until Nov 12 12:00, then 19-30% back to ~0.2%
posts_list_posts errors in zernio-mcp 693 / 70 min, 78 sessions ~0

Post-deploy check: rerun posts_list_posts with fields on the hosted MCP, and the 3 h Worker 400 rate query for GET /v1/posts; control: GET /v1/posts from non-MCP clients.

@Gintm
Gintm merged commit dbaae78 into develop Nov 13, 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