[Feature]: expose since/until/time_field in the MCP find and search tools

オープン
#7,322 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Read the MCP find and search tool definitions and the REST filter helper openviking/utils/search_filters.py::merge_search_filter to trace how retrieval filters are built. Check how the tools handle both listed modes and the skill package path, then run the relevant MCP tests. Done means both tools accept and apply the time window across the specified paths, and reject inverted windows or unknown time_field values.

索引モデルが issue の本文から書いたものです。

説明

Summary

The REST retrieval endpoints already accept since / until / time_field:

  • POST /api/v1/search/find and POST /api/v1/search/search (FindRequest / SearchRequest)
  • the Python SDK through FindOptions / SearchOptions
  • the TypeScript SDK through FindOptions / SearchOptions

The MCP find and search tools do not. An MCP client therefore cannot express a time window as a filter and has to bake it into the query text instead.

That costs a model round-trip on every call, and it is not deterministic: the model may phrase the window loosely, and the result is then bounded by the semantic match rather than by the timestamp. It also means the same operation has a different contract depending on whether the caller speaks HTTP or MCP - the same divergence that #2990 reported for context_type and that was fixed for that field only.

Proposal

Add the three parameters to the MCP tools and compile them into the same metadata filter the REST route builds (openviking/utils/search_filters.py::merge_search_filter):

Tool New parameters Notes
find since, until, time_field Applies to the item-level retrieval path and to the context_type="skill" package path.
search since, until, time_field Applies to both mode="list" and mode="context".

time_field accepts updated_at (default) or created_at, matching the REST contract.

Why this shape

  • Deterministic. The window becomes a metadata predicate evaluated by the server instead of a phrase the model has to get right.
  • No extra model call. The filter is compiled into the existing retrieval filter, so the request still performs the same single embedding and the same retrieval. The window only narrows the candidate set, which makes the call cheaper rather than more expensive.
  • Same contract on every surface. REST, the SDKs, and MCP then describe the same operation the same way.

Acceptance

  • find(query="...", since="7d") returns only the entries inside the window.
  • find(query="...", since="7d", time_field="created_at") filters on the creation time instead.
  • search(query="...", mode="context", since="7d") applies the same window in context mode.
  • An inverted window and an unknown time_field are rejected with the tool's usual argument error.
主要言語
Python
スター
42.3k
フォーク
3.5k
平均マージ
16時間 23分
マージ済み PR(30日)
555

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

volcengine/OpenViking のほかの issue

volcengine/OpenViking の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。