Skip to content

MCP: allow locked exists filters on vector fields declared with index_missing #788

Description

@vishal-bala

Description

An MCP custom tool profile whose lock.filter uses exists on a vector field is rejected at startup, even when the field is declared with index_missing: true.

_validate_locked_exists_fields (redisvl/mcp/tools/profiles.py) rejects exists on any vector field before it reaches the index_missing check that applies to every other field type. That was the right call while a vector field could not be created with index_missing, because every call would have failed. Once #771 lands, Redis accepts INDEXMISSING on vector fields and answers ismissing(@field) on them, so a locked "only documents that have an embedding" filter becomes a working query that the profile still refuses.

Proposed change

After #771 merges, let exists on a vector field fall through to the existing index_missing check: allow it when the field declares index_missing, and keep the current startup error otherwise. Whether exists on vector fields should be offered in locked filters at all is a design question for the maintainers. If the answer is no, the error message should give that as the reason instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions