Skip to content

Guidance for AI‑Friendly Capability Annotations for Supported $filter Option #2162

@chrisspre

Description

@chrisspre

Problem
Modern AI agents can reliably generate syntactically valid OData query options—including $filter—when given a CSDL model.
However, they consistently struggle to generate service‑supported filter expressions, because:

  • The CSDL describes legal expressions, not supported ones
  • OData Capability annotations do not currently expose enough detail for an agent (or an MCP service author) to know which filter patterns the service actually implements
  • Many services support only a subset of the theoretically legal $filter expressions, often depending on backend indexing, data shape, or runtime constraints
    As a result, AI agents frequently produce $filter expressions that are valid but rejected by the service at runtime.

Gap
There is no existing vocabulary that allows a service to declare:

  • Which $filter patterns are supported
  • Which properties can be filtered with which operators (we have one that gives it which property is allowed but not in which "position")
  • Which functions are allowed
  • Which combinations are valid
  • Any dynamic or implementation‑specific constraints
    This leaves both AI agents and human authors guessing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions