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

Abierto
#7,322 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
42.3k
Forks
3.5k
Merge medio
16 h 23 min
PR fusionados (30 d)
555

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de volcengine/OpenViking

Todos los issues de volcengine/OpenViking

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.