XaiTools
Namespace: Vercel.AI.Xai
public static class XaiToolsFactories for the xAI provider-defined tools. Each returns a Tool that xAI runs. Maps to xai.tools.
The name is the name the model and the results use. It defaults to the tool’s wire name.
Inheritance: object
Methods
Section titled “Methods”CodeExecution(string)
Section titled “CodeExecution(string)”public static Tool CodeExecution(string name = "code_execution")The xai.code_execution tool. Maps to codeExecution.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Returns: Tool
FileSearch(XaiFileSearchOptions, string)
Section titled “FileSearch(XaiFileSearchOptions, string)”public static Tool FileSearch(XaiFileSearchOptions options, string name = "file_search")The xai.file_search tool. Maps to fileSearch.
Parameters
| Name | Type | Description |
|---|---|---|
options |
XaiFileSearchOptions | |
name |
string |
Returns: Tool
ImageGeneration(XaiImageGenerationOptions?, string)
Section titled “ImageGeneration(XaiImageGenerationOptions?, string)”public static Tool ImageGeneration(XaiImageGenerationOptions? options = null, string name = "image_generation")The xai.image_generation tool. Maps to imageGeneration.
Parameters
| Name | Type | Description |
|---|---|---|
options |
XaiImageGenerationOptions | |
name |
string |
Returns: Tool
McpServer(XaiMcpServerOptions, string)
Section titled “McpServer(XaiMcpServerOptions, string)”public static Tool McpServer(XaiMcpServerOptions options, string name = "mcp")The xai.mcp tool. Maps to mcpServer.
Parameters
| Name | Type | Description |
|---|---|---|
options |
XaiMcpServerOptions | |
name |
string |
Returns: Tool
ViewImage(string)
Section titled “ViewImage(string)”public static Tool ViewImage(string name = "view_image")The xai.view_image tool. Maps to viewImage.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Returns: Tool
ViewXVideo(string)
Section titled “ViewXVideo(string)”public static Tool ViewXVideo(string name = "view_x_video")The xai.view_x_video tool. Maps to viewXVideo.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Returns: Tool
WebSearch(XaiWebSearchOptions?, string)
Section titled “WebSearch(XaiWebSearchOptions?, string)”public static Tool WebSearch(XaiWebSearchOptions? options = null, string name = "web_search")The xai.web_search tool. Maps to webSearch.
Parameters
| Name | Type | Description |
|---|---|---|
options |
XaiWebSearchOptions | |
name |
string |
Returns: Tool
XSearch(XaiXSearchOptions?, string)
Section titled “XSearch(XaiXSearchOptions?, string)”public static Tool XSearch(XaiXSearchOptions? options = null, string name = "x_search")The xai.x_search tool. Maps to xSearch.
Parameters
| Name | Type | Description |
|---|---|---|
options |
XaiXSearchOptions | |
name |
string |
Returns: Tool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product