Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex AI Studio
    • About Yandex AI Studio
    • Yandex Workflows
    • Quotas and limits
    • Terms and definitions
  • Compatibility with OpenAI
    • About Yandex Cloud ML SDK
      • Overview
        • Overview
        • Models domain
        • Assistants domain
        • Tools domain
        • Files domain
        • Threads domain
        • Runs domain
        • Search indexes domain
        • Search API domain
        • Datasets domain
        • Tuning domain
        • Batch domain
        • Chat domain
      • Authentication
      • Request retries
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • class yandex_cloud_ml_sdk._tools.domain.Tools
  • Types
  • class yandex_cloud_ml_sdk._tools.tool_call.ToolCall
  • class yandex_cloud_ml_sdk._tools.function_call.FunctionCall
  1. Yandex Cloud ML SDK
  2. SDK reference
  3. SDK
  4. Tools domain

Tools domain

Written by
Yandex Cloud
Updated at September 25, 2025
  • class yandex_cloud_ml_sdk._tools.domain.Tools
  • Types
    • class yandex_cloud_ml_sdk._tools.tool_call.ToolCall
    • class yandex_cloud_ml_sdk._tools.function_call.FunctionCall

class yandexcloudmlsdk.tools.domain.Toolsclass yandex_cloud_ml_sdk._tools.domain.Tools

property function: FunctionToolsTypeT

generative_search(*, description, site=Undefined, host=Undefined, url=Undefined, enable_nrfm_docs=Undefined, search_filters=Undefined)

Creates GeberativeSearch tool which provide access to generative search by Search API for LLMs.

Not to be confused with sdk.search_api.generative. Tools domain is for creating tools for using in LLMs/Assistants and search_api domain is for using Search API directly.

To learn more about parameters and their formats and possible values, refer to generative search documentation

NB: All of the site, host, url parameters are mutually exclusive.

Parameters

  • site (str | Sequence[str] | Undefined) – parameter for limiting search to specific location or list of sites.
  • host (str | Sequence[str] | Undefined) – parameter for limiting search to specific location or list of hosts.
  • url (str | Sequence[str] | Undefined) – parameter for limiting search to specific location or list of URLs.
  • enable_nrfm_docs (bool | Undefined) – tells to backend to include or not to include pages, which are not available via direct clicks from given sites/hosts/urls to search result.
  • search_filters (Sequence[DateFilterType | FormatFilterType | LangFilterType] | DateFilterType | FormatFilterType | LangFilterType | Undefined) – allows to limit search results with additional filters.
>>> date_filter = {'date': '<20250101'}
>>> format_filter = {'format': 'doc'}
>>> lang_filter = {'lang': 'ru'}
>>> tool = sdk.tools.generative_search(
...     search_filters=[date_filter, format_filter, lang_filter],
...     description="description when model should call a tool"
... )
  • description (str)

Return type

GenerativeSearchTool

property rephraser: RephraserFunction

search_index(indexes, *, max_num_results=Undefined, rephraser=Undefined, call_strategy=Undefined)

Creates SearchIndexTool (not to be confused with SearchIndex/AsyncSearchIndex).

Parameters

  • indexes (str | BaseSearchIndex | Iterable[BaseSearchIndex] | Iterable[str]) – parameter takes BaseSearchIndex, string with search index id, or a list of this values in any combination.
  • max_num_results (int | Undefined) – the maximum number of results to return from the search. Fewer results may be returned if necessary to fit within the prompt’s token limit. This ensures that the combined prompt and search results do not exceed the token constraints.
  • rephraser (str | Literal[True] | ~yandex_cloud_ml_sdk._tools.search_index.rephraser.model.Rephraser | ~yandex_cloud_ml_sdk._types.misc.Undefined) – setting for rephrasing user queries; refer to Rephraser documentation for details.
  • call_strategy (Literal['always'] | ~yandex_cloud_ml_sdk._types.tools.function.FunctionDictType | ~yandex_cloud_ml_sdk._tools.search_index.call_strategy.CallStrategy | ~yandex_cloud_ml_sdk._types.misc.Undefined)

Return type

SearchIndexTool

TypesTypes

class yandexcloudmlsdk.tools.toolcall.ToolCallclass yandex_cloud_ml_sdk._tools.tool_call.ToolCall

id: str | None

function: FunctionCallTypeT | None

class yandexcloudmlsdk.tools.functioncall.FunctionCallclass yandex_cloud_ml_sdk._tools.function_call.FunctionCall

name: str

arguments: JsonObject

Was the article helpful?

Previous
Assistants domain
Next
Files domain
© 2025 Direct Cursus Technology L.L.C.