Skip to main content

@wildix/wim-tools-client > GetToolCommand

GetToolCommand class

Get a tool by its ID.

Signature:

export declare class GetToolCommand extends GetToolCommand_base 

Extends: GetToolCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { ToolsClient, GetToolCommand } from "@wildix/wim-tools-client"; // ES Modules import
// const { ToolsClient, GetToolCommand } = require("@wildix/wim-tools-client"); // CommonJS import
const client = new ToolsClient(config);
const input = { // GetToolInput
companyId: "STRING_VALUE",
toolId: "STRING_VALUE", // required
};
const command = new GetToolCommand(input);
const response = await client.send(command);
// { // GetToolOutput
// tool: { // Tool
// id: "STRING_VALUE", // required
// companyId: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// category: "STRING_VALUE", // required
// description: "STRING_VALUE", // required
// input: { // ToolInput
// variables: [ // ToolVariableList // required
// { // ToolVariable
// name: "STRING_VALUE", // required
// type: "string" || "number" || "boolean" || "string_array" || "number_array" || "schema", // required
// optional: true || false, // required
// description: "STRING_VALUE",
// schema: "DOCUMENT_VALUE",
// },
// ],
// },
// handler: { // ToolHandler Union: only one key present
// email: { // ToolEmailHandler Union: only one key present
// wns: { // ToolWnsEmailConfig
// to: "STRING_VALUE", // required
// subject: "STRING_VALUE", // required
// text: "STRING_VALUE", // required
// },
// custom: { // ToolCustomEmailConfig
// smtp: { // ToolSmtpConfig
// host: "STRING_VALUE", // required
// port: Number("int"), // required
// username: "STRING_VALUE", // required
// password: "STRING_VALUE", // required
// secure: true || false, // required
// },
// from: "STRING_VALUE", // required
// to: "STRING_VALUE", // required
// subject: "STRING_VALUE", // required
// text: "STRING_VALUE", // required
// html: "STRING_VALUE",
// cc: "STRING_VALUE",
// bcc: "STRING_VALUE",
// replyTo: "STRING_VALUE",
// },
// },
// webhook: { // ToolWebhookConfig
// method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
// url: "STRING_VALUE", // required
// headers: [ // ToolWebhookHeadersList
// { // ToolWebhookHeader
// name: "STRING_VALUE", // required
// value: "STRING_VALUE", // required
// },
// ],
// body: "STRING_VALUE",
// auth: { // ToolWebhookAuth Union: only one key present
// basic: { // ToolWebhookAuthBasic
// username: "STRING_VALUE", // required
// password: "STRING_VALUE", // required
// },
// bearer: { // ToolWebhookAuthBearer
// token: "STRING_VALUE", // required
// },
// oauth: { // ToolWebhookAuthOAuth
// clientId: "STRING_VALUE", // required
// clientSecret: "STRING_VALUE", // required
// endpointUrl: "STRING_VALUE", // required
// scope: "STRING_VALUE",
// },
// },
// timeout: Number("int"),
// },
// search: {},
// chat: { // ToolChatHandler
// config: { // ToolChatConfig
// recipient: { // ToolChatRecipient Union: only one key present
// channelId: "STRING_VALUE",
// userId: "STRING_VALUE",
// },
// text: "STRING_VALUE", // required
// botName: "STRING_VALUE", // required
// },
// },
// sms: { // ToolSmsHandler
// config: { // ToolSmsConfig
// from: "STRING_VALUE", // required
// to: "STRING_VALUE", // required
// message: "STRING_VALUE", // required
// },
// },
// mcp: { // ToolMcpHandler
// serverUrl: "STRING_VALUE", // required
// authorization: { // ToolMcpAuthorization Union: only one key present
// bearer: {
// token: "STRING_VALUE", // required
// },
// customHeaders: { // ToolMcpHeadersMap
// "<keys>": "STRING_VALUE",
// },
// },
// tools: [ // ToolMcpEnabledToolsList // required
// "STRING_VALUE",
// ],
// },
// mcpTool: { // ToolMcpToolHandler
// mcpToolId: "STRING_VALUE", // required
// mcpToolName: "STRING_VALUE", // required
// },
// },
// },
// };