Repository navigation
Closed
Description
Problem
get_pull_request_discussion {repository, pullRequest, order:"newest", cursor:"garbage"}returns{"error":{"code":"INTERNAL_ERROR","status":500}}. Sibling tools (list_notifications,list_repository_events,wait_goal) return a 400INVALID_INPUT/CURSOR_INVALID.- Result summaries count the first array-valued property of the result, whatever it is (
packages/api/mcp/presentation.ts,Object.values(result).find(Array.isArray)):get_cost_breakdown groupBy:["outcome"]with 2 rows says "1 items in this page" (it countsgroup_by);list_pull_requestsreturning 2 PRs says "1 items" (countsrepositories);get_pull_requestsays "0 items in this page";get_pull_request_readinesssays "9 items in this page" (the gates) instead of the verdict;get_repository_configurationsays "0 items". Also "1 items". links.uiis the API origin for most tools (presentation.ts, fallbackui: origin), e.g."ui":"https://api.example", which serves no UI. Entity links correctly use the frontend URL.list_visual_previews,get_agent_activityandget_comment_attachmentanswer a missing one-of argument with plain text "Input validation error: …" instead of the{"error":{code,…}}envelope.- An unknown pull request gives
GITHUB_NOT_FOUNDwith the message "Not Found"; other tools giveNOT_FOUNDwith a sentence. get_task_changes {detail:"diff", path:"../../.env"}returnsfiles: []instead of an invalid-path error;list_repository_events.planIdaccepts any string whilelist_plan_blocked_events.planIdrequires a UUID.get_pull_request_readinesstakesnumber; every other PR tool takespullRequest.
Expected / acceptance criteria
- 1: an undecodable cursor is a 400 with the same error code the other cursor tools use.
- 2: list tools state the count of the entity they list (singular/plural correct); single-object reads summarize the object (
get_pull_request_readiness: the verdict, e.g. "PR Epic: Claude-Powered GitHub Issue Processor - Stage 8: Quality Assurance Framework #12 is waiting: checks pending";get_pull_request: number, title, state). No tool reports "0 items" for a successful single read. - 3:
links.uiis the configured frontend URL (the same base the entity links use) for every tool; omitted when no frontend URL is configured. - 4, 5: the standard error envelope with a sentence message.
- 6: path traversal in
pathis rejected likeread_repository_filedoes;planIdis validated as a UUID in both tools. - 7:
get_pull_request_readinessacceptspullRequestas well asnumber(keepnumberworking; documentpullRequest). - Tests for each point.
Implementation
packages/api/mcp/presentation.ts (summary and links), the discussion tool's cursor decoding, and the three tools' input validation under packages/api/mcp/. Update docs/mcp.md where parameter names or error codes are listed.
Notes
Do not rename or remove existing parameters or result fields; only add and correct.
Activity
propr-dev commentedon Nov 17, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53597/claude-opus-5-5-mcp-invalid-cursor-return-20261117-0119-3gq3595-epic-0-9-h9lissue-3597-20261117-0119-claude-opus-5-5-3gq🔍 Track Task Execution