Skip to main content
POST
Search semantic model context

Authorizations

Authorization
string
header
required

Auth0-issued user JWT. Provide as Authorization: Bearer <token>.

Body

application/json

Request body for the get_context endpoint

search_targets
object[]
required

Typed search targets describing what to find. Each target specifies a target type and optional search text for semantic matching.

scopes
object[] | null

Optional list of scopes to narrow the search. Results will be scoped to the union of these.

filter_params
object | null

Filter parameter values keyed by filter name. Used with sources that declare #(filter) annotations. Each value is either a single string or an array of strings (matches the dataplane API's filterParams shape). When the new dimensional-index path is enabled and active for a package whose target dimension declares #(filter, required), the corresponding filter values MUST be supplied here — the request will return 400 otherwise. Ignored on the legacy path.

user_prompt
string | null

Optional. The user's prompt that triggered this call, used for observability and downstream ranking. On the first turn this is the user's message verbatim. On follow-up turns where the user's message doesn't convey intent (e.g. "yes" to an agent suggestion), synthesize a short prompt that captures the intent of the turn. Use the same value for every get_context call within a single turn.

limit
integer | null

Maximum number of sources to return in this response (page size). PREFER OMITTING THIS: results are ranked, so the default page (20) already holds the best matches. When the caller supplies the Max-Response-Chars header (the MCP tools always do), the response is additionally bounded to that serialized size, so a page over the budget comes back with fewer sources (cards are unchanged, not stripped) plus a warning — a high limit does not guarantee more sources. A large total_available is a signal to narrow with search_text / scopes (or, on pure source listings, to page with offset), not to raise limit. Reserve explicit limits above 20 for genuine bulk enumeration. Values above 150 are clamped to 150; values below 1 are rejected with 400.

Required range: x >= 1
offset
integer | null

Number of sources to skip before the returned page, copied from a previous response's next_offset. Only meaningful on pure source-listing requests (only source targets, none with search_text) — listings have a deterministic order that can be resumed, while semantically ranked results do not. A non-zero offset alongside any search_text target or non-source target is rejected with 400; negative values are rejected with 400.

Required range: x >= 0

Response

OK

Response from the get_context endpoint

sources
object[]
required

Matched sources sorted by relevance then prominence (empty when no good matches)

ranking
enum<string> | null

How the returned sources were ordered. relevance when any search-text target contributed to the result set (semantic ranking); prominence for pure listings (deterministic usage/catalog order). Omitted when the request produced no result set (e.g. no search targets).

Available options:
relevance,
prominence
total_available
integer | null

Total number of distinct sources that matched or were in scope before the page cap was applied. When greater than returned, more sources exist than were included in this response — narrow with search_text / scopes, or (listings only) page with offset. Always populated by current servers; optional only so clients tolerate responses from servers predating this field.

returned
integer | null

Number of sources included in this response. Always populated by current servers; optional only so clients tolerate responses from servers predating this field.

next_offset
integer | null

The offset value that fetches the next page. Only present on pure source-listing responses when more sources remain past this page; pass it back via the request's offset field. Never present on semantically ranked (search) responses, which cannot be resumed — narrow the query instead.

warnings
string[] | null

Optional warnings about the result set (e.g. when results were truncated or capped). Omitted when empty.