feat(mcp): expose thread search - #8722
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
There was a problem hiding this comment.
Reviewed the new ThreadSearchMcpService and its call sites against the Effect service conventions. One violation found: a standalone ThreadSearchMcpServiceShape interface instead of an inline Context.Service interface. Imports, make/layer naming, dependency acquisition (yield* ThreadManagementService / yield* ProjectionSnapshotQuery), and the test-only Layer.mock seams all look consistent with the conventions.
Posted via Macroscope — Effect Service Conventions
Thread transfer impact
This comment will update automatically after the next completed run. |
7ae406d to
fe198b0
Compare
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This adds a bounded, read-only MCP search tool around the existing projection query, with capability/project scoping, strict result limits, and coverage for contracts, integration, and registration behavior. Existing thread-read behavior and stored data remain unchanged unless the new search/anchor path is explicitly used. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
fe198b0 to
e5585e8
Compare
eaff951 to
0b3444c
Compare
0b3444c to
41673f5
Compare
71d9d5c to
37bc376
Compare
37bc376 to
3430825
Compare
Pull Request is not mergeable
3430825 to
70a74a5
Compare
|
Superseded as the active MCP proposal by #10561 in the rebuilt MCP stack, following the maintainer request to review thin service wrappers separately from service hardening. This is not a full feature-parity replacement. This filters the global top results, so a project can underfill the requested limit. It is not exhaustive or paginated. Project-first SQL pagination and search-service correctness changes belong in a separate service PR. Closing this mixed proposal without merging. The remote branch |
Problem
Agents can read known threads but cannot search durable thread content and then navigate directly to a matching visible message.
Change
Expose
t3_thread_searchas a read-only MCP tool over the bounded projection query from #8721. The tool:t3_thread_read.anchorstart inclusively at the matching visible source/message identityinvalid_requestand persistence failures to fixed structural errors without exposing SQL detailst3_thread_updateregistration and metadata behavior intactBehavior
Search is read-only and never imports transcripts, acknowledges child delivery, or returns full messages. An anchor that is foreign, stale, rolled back, or no longer visible fails instead of falling back to a raw ordinal.
Validation
vp test run apps/server/src/mcp/OrchestratorMcpToolkit.integration.test.ts apps/server/src/mcp/toolkits/worktree/registration.test.ts packages/contracts/src/orchestratorMcp.test.ts packages/shared/src/t3McpToolPresentation.test.ts(15/15)t3,@t3tools/contracts, and@t3tools/sharedtypechecksgit diff --checkDependency
Upper member of native stack #8785. Depends on #8721.
Implemented by GPT-5.6-Sol via Codex in T3 Code.