[PR #4086] [MERGED] docs(mcp): describe the 100-value completion reply limit #6046

Closed
opened 2026-10-31 01:11:27 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4086
Author: @kaoru0822-kitauji
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: docs/3866-completion-cap


📝 Commits (2)

  • 95a60eb docs(mcp): describe the 100-value completion reply limit
  • 7ab5f3e docs(mcp): qualify longer-prefix completion recovery

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 docs/mcp-prompts.md (+6 -2)

📄 Description

Summary

Fixes #3866. docs/mcp-prompts.md said prompt-argument completion "returns all matching values". In fact a completion/complete reply carries at most 100 values, which is the MCP limit, and reports total and hasMore when matches were omitted. The guide now describes the limit, and explains that a longer prefix reaches an omitted value only when it excludes other matches.

Problem and expected behavior

I ran the issue's script against this checkout's built runtime over real stdio MCP (rea mcp). It records 101 residual unknowns and completes audit_residual_unknowns.unknown_id:

{"retained":101,"values":100,"total":101,"hasMore":true,"omitted":1}
{"exact_prefix_values":1,"exact_prefix_returns_omitted_id":true,"total":1,"hasMore":false}

REA's completers (src/server/registerPrompts.ts, completable) return every match. The MCP server SDK caps the reply at 100 values and sets total/hasMore. So the runtime is correct; only the guide was wrong.

Change and scope

  • Documentation only: one paragraph in docs/mcp-prompts.md ("Session-aware completion").
  • No other doc repeats the exhaustive claim (searched docs, README.md, .agents).

Contract and boundary impact

  • Semantic owner and earliest changed stage: documentation only.

  • Contribution scope fit and linked maintainer decision: not applicable.

  • CLI and MCP/tool-catalog contract: unchanged.

  • Provider, bridge, target-format, or platform compatibility: none.

  • Evidence, artifact, provenance, or reconstruction contract: none.

  • Target selection, authority, upstream behavior, and cleanup details: not applicable.

  • Generated metadata, package, or installation impact: none.

  • Documentation or usability only; no target interaction.

Evidence and regression coverage

  • Tests added or updated: none (documentation only). The script output above is the executed check.
  • Output size and time: not applicable; no runtime change.
  • Remaining proof gaps: none known for the documented behavior.

Validation performed

  • The issue's reproduce-completion.mjs against this checkout over stdio MCP — results as shown above.
  • npx oxfmt docs/mcp-prompts.md (no changes) and npm run docs:check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4086 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `docs/3866-completion-cap` --- ### 📝 Commits (2) - [`95a60eb`](https://github.com/morluto/rea/commit/95a60eb8f73b89de7aa656f912e7fddfb29f270d) docs(mcp): describe the 100-value completion reply limit - [`7ab5f3e`](https://github.com/morluto/rea/commit/7ab5f3ee6f494e5f7b51988e8530cc44f16de85e) docs(mcp): qualify longer-prefix completion recovery ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/mcp-prompts.md` (+6 -2) </details> ### 📄 Description ## Summary Fixes #3866. `docs/mcp-prompts.md` said prompt-argument completion "returns all matching values". In fact a `completion/complete` reply carries at most 100 values, which is the MCP limit, and reports `total` and `hasMore` when matches were omitted. The guide now describes the limit, and explains that a longer prefix reaches an omitted value only when it excludes other matches. ## Problem and expected behavior I ran the issue's script against this checkout's built runtime over real stdio MCP (`rea mcp`). It records 101 residual unknowns and completes `audit_residual_unknowns.unknown_id`: ```json {"retained":101,"values":100,"total":101,"hasMore":true,"omitted":1} {"exact_prefix_values":1,"exact_prefix_returns_omitted_id":true,"total":1,"hasMore":false} ``` REA's completers (`src/server/registerPrompts.ts`, `completable`) return every match. The MCP server SDK caps the reply at 100 values and sets `total`/`hasMore`. So the runtime is correct; only the guide was wrong. ## Change and scope - Documentation only: one paragraph in `docs/mcp-prompts.md` ("Session-aware completion"). - No other doc repeats the exhaustive claim (searched `docs`, `README.md`, `.agents`). ## Contract and boundary impact - Semantic owner and earliest changed stage: documentation only. - Contribution scope fit and linked maintainer decision: not applicable. - CLI and MCP/tool-catalog contract: unchanged. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details: not applicable. - Generated metadata, package, or installation impact: none. - [x] Documentation or usability only; no target interaction. ## Evidence and regression coverage - Tests added or updated: none (documentation only). The script output above is the executed check. - Output size and time: not applicable; no runtime change. - Remaining proof gaps: none known for the documented behavior. ## Validation performed - The issue's `reproduce-completion.mjs` against this checkout over stdio MCP — results as shown above. - `npx oxfmt docs/mcp-prompts.md` (no changes) and `npm run docs:check` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: not applicable. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none. ## Author readiness Human owner: <!-- @GitHub-handle --> - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6046
No description provided.