Class CatalogSearchRequest

java.lang.Object
com.github.copilot.generated.rpc.CatalogSearchRequest

@CopilotExperimental @Generated("copilot-sdk-codegen") public final class CatalogSearchRequest extends Object
A bounded catalog search. Both the query length and the result count are capped by the schema so a caller cannot request an unbounded scan.

Required inputs are constructor arguments. Optional inputs have fluent setters.

Since:
1.0.0
  • Constructor Details

    • CatalogSearchRequest

      public CatalogSearchRequest(CatalogClientContract contract, String query)
      Creates a request with its required inputs.
      Parameters:
      contract - Protocol version and capabilities the caller requires.
      query - Free-text search query. Persisted as tool input for session continuity, but omitted from telemetry.
  • Method Details

    • getContract

      public CatalogClientContract getContract()
      Returns the contract property.
      Returns:
      Protocol version and capabilities the caller requires.
    • getQuery

      public String getQuery()
      Returns the query property.
      Returns:
      Free-text search query. Persisted as tool input for session continuity, but omitted from telemetry.
    • getLimit

      public Long getLimit()
      Returns the limit property.
      Returns:
      Maximum number of candidates to return. Defaults to 10 when omitted.
    • getKinds

      public List<CatalogCandidateKind> getKinds()
      Returns the kinds property.
      Returns:
      Restrict results to these candidate kinds. Agent Plugins are opt-in and require the `agent-plugin-discovery` capability so protocol-v3 clients generated before that variant cannot receive an unknown result; when omitted, the backwards-compatible MCP server and AI skill kinds are searched.
    • getPage

      public CatalogSearchPage getPage()
      Returns the page property.
      Returns:
      Numbered navigation using metadata from an earlier response. Requires catalog-search-pagination and the same query, kinds, categories and effective limit. Omit for a fresh first-page search.
    • getPolicySessionId

      public String getPolicySessionId()
      Returns the policySessionId property.
      Returns:
      Select an existing attached local session. Requires authenticated, session-bound search. The runtime never creates, resumes or reconfigures a session to honour this selector.
    • getCategories

      public List<String> getCategories()
      Returns the categories property.
      Returns:
      Restrict results to resources in at least one of these server-defined workflow categories, such as `design` or `test`. Requires the `catalog-search-categories` capability. Each value is a lowercase slug; the known set is not exhaustive, and a category the server does not recognise matches nothing. Omit to search every category.
    • setLimit

      public CatalogSearchRequest setLimit(Long value)
      Sets the limit property.
      Parameters:
      value - Maximum number of candidates to return. Defaults to 10 when omitted.
      Returns:
      this request
    • setKinds

      Sets the kinds property.
      Parameters:
      value - Restrict results to these candidate kinds. Agent Plugins are opt-in and require the `agent-plugin-discovery` capability so protocol-v3 clients generated before that variant cannot receive an unknown result; when omitted, the backwards-compatible MCP server and AI skill kinds are searched.
      Returns:
      this request
    • setPage

      public CatalogSearchRequest setPage(CatalogSearchPage value)
      Sets the page property.
      Parameters:
      value - Numbered navigation using metadata from an earlier response. Requires catalog-search-pagination and the same query, kinds, categories and effective limit. Omit for a fresh first-page search.
      Returns:
      this request
    • setPolicySessionId

      public CatalogSearchRequest setPolicySessionId(String value)
      Sets the policySessionId property.
      Parameters:
      value - Select an existing attached local session. Requires authenticated, session-bound search. The runtime never creates, resumes or reconfigures a session to honour this selector.
      Returns:
      this request
    • setCategories

      public CatalogSearchRequest setCategories(List<String> value)
      Sets the categories property.
      Parameters:
      value - Restrict results to resources in at least one of these server-defined workflow categories, such as `design` or `test`. Requires the `catalog-search-categories` capability. Each value is a lowercase slug; the known set is not exhaustive, and a category the server does not recognise matches nothing. Omit to search every category.
      Returns:
      this request