[GH-ISSUE #102] Add MCP argument completion and guided REA workflow prompts #69

Closed
opened 2026-10-15 18:20:46 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Jul 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/102

Problem\n\nAgents must manually copy opaque document names, addresses, evidence IDs, manifest IDs, provider names, and occurrence IDs. They also need to remember safe workflow ordering such as inventory before extraction and complete evidence pagination before comparison.\n\n## Proposal\n\nImplement MCP argument completion for bounded, discoverable identifiers:\n\n- open Hopper documents;\n- procedure names and addresses;\n- provider IDs;\n- evidence, capture, and manifest IDs;\n- artifact occurrence IDs;\n- active unknown IDs.\n\nPublish guided MCP prompts for common workflows:\n\n- investigate a feature;\n- compare application versions;\n- verify a reconstruction;\n- trace a crash;\n- audit residual unknowns;\n- prepare a bounded process capture.\n\nPrompts should compose existing tools and encode evidence/containment requirements rather than duplicate analysis logic.\n\n## Acceptance criteria\n\n- [ ] Completion results are bounded, paginated where necessary, and scoped to the active session.\n- [ ] Suggestions never imply that an inaccessible identifier is authorized.\n- [ ] Workflow prompts use current tool names and required ordering.\n- [ ] Prompts distinguish observed evidence from inference.\n- [ ] list_changed notifications update prompt discovery when workflows change.\n- [ ] Tests cover stale identifiers, ambiguous names, empty sessions, and large result sets.

Originally created by @morluto on GitHub (Jul 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/102 ## Problem\n\nAgents must manually copy opaque document names, addresses, evidence IDs, manifest IDs, provider names, and occurrence IDs. They also need to remember safe workflow ordering such as inventory before extraction and complete evidence pagination before comparison.\n\n## Proposal\n\nImplement MCP argument completion for bounded, discoverable identifiers:\n\n- open Hopper documents;\n- procedure names and addresses;\n- provider IDs;\n- evidence, capture, and manifest IDs;\n- artifact occurrence IDs;\n- active unknown IDs.\n\nPublish guided MCP prompts for common workflows:\n\n- investigate a feature;\n- compare application versions;\n- verify a reconstruction;\n- trace a crash;\n- audit residual unknowns;\n- prepare a bounded process capture.\n\nPrompts should compose existing tools and encode evidence/containment requirements rather than duplicate analysis logic.\n\n## Acceptance criteria\n\n- [ ] Completion results are bounded, paginated where necessary, and scoped to the active session.\n- [ ] Suggestions never imply that an inaccessible identifier is authorized.\n- [ ] Workflow prompts use current tool names and required ordering.\n- [ ] Prompts distinguish observed evidence from inference.\n- [ ] list_changed notifications update prompt discovery when workflows change.\n- [ ] Tests cover stale identifiers, ambiguous names, empty sessions, and large result sets.
bsakaguchi 2026-10-15 18:20:46 +00:00
Author
Owner

@N0zoM1z0 commented on GitHub (Jul 13, 2026):

Implementation note before coding:

The MCP completion protocol does not define arbitrary tool-argument completion. In the SDK/spec used by REA, completion/complete accepts only a PromptReference or ResourceTemplateReference; there is no ToolReference. I will therefore implement this issue as guided REA prompts with completable prompt arguments, without claiming that direct tools/call arguments are autocompleted.

Planned behavior:

  • Register the six proposed workflows as MCP prompts: investigate a feature, compare application versions, verify a reconstruction, trace a crash, audit residual unknowns, and prepare a bounded process capture.
  • Back prompt arguments with session-scoped, read-only suggestions from open Hopper documents/procedures, provider identities, retained Evidence v2 records and captures, artifact manifest/occurrence IDs, and active residual unknowns.
  • Treat suggestions only as discoverability. Returning an ID never grants extraction, process execution, filesystem, network, or unknown-registry authority.
  • Normalize, deduplicate, and deterministically sort suggestions; filter by the partial value; return at most the protocol maximum of 100 values with total and hasMore. The completion result has no offset cursor, so large sets require a narrower partial value rather than cursor pagination.
  • Keep prompt text as orchestration over existing public tools, with explicit evidence/unknown distinctions and containment/approval ordering. It will not duplicate analysis logic.
  • Exercise list-change behavior when a registered workflow is materially updated.
  • Add MCP tests for empty sessions, stale IDs, ambiguous names, large result sets, deterministic bounds, and current tool ordering.

This keeps the implementation protocol-accurate and independent of PR #103 while still addressing the issue's user-facing workflow and identifier-copying problem.

<!-- gh-comment-id:4958004463 --> @N0zoM1z0 commented on GitHub (Jul 13, 2026): Implementation note before coding: The MCP completion protocol does not define arbitrary tool-argument completion. In the SDK/spec used by REA, `completion/complete` accepts only a `PromptReference` or `ResourceTemplateReference`; there is no `ToolReference`. I will therefore implement this issue as guided REA prompts with completable prompt arguments, without claiming that direct `tools/call` arguments are autocompleted. Planned behavior: - Register the six proposed workflows as MCP prompts: investigate a feature, compare application versions, verify a reconstruction, trace a crash, audit residual unknowns, and prepare a bounded process capture. - Back prompt arguments with session-scoped, read-only suggestions from open Hopper documents/procedures, provider identities, retained Evidence v2 records and captures, artifact manifest/occurrence IDs, and active residual unknowns. - Treat suggestions only as discoverability. Returning an ID never grants extraction, process execution, filesystem, network, or unknown-registry authority. - Normalize, deduplicate, and deterministically sort suggestions; filter by the partial value; return at most the protocol maximum of 100 values with `total` and `hasMore`. The completion result has no offset cursor, so large sets require a narrower partial value rather than cursor pagination. - Keep prompt text as orchestration over existing public tools, with explicit evidence/unknown distinctions and containment/approval ordering. It will not duplicate analysis logic. - Exercise list-change behavior when a registered workflow is materially updated. - Add MCP tests for empty sessions, stale IDs, ambiguous names, large result sets, deterministic bounds, and current tool ordering. This keeps the implementation protocol-accurate and independent of PR #103 while still addressing the issue's user-facing workflow and identifier-copying problem.
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#69
No description provided.