@wildix/wim-tools-client > DiscoverToolsCommand
DiscoverToolsCommand class
Discover tools from an MCP server.
Signature:
export declare class DiscoverToolsCommand extends DiscoverToolsCommand_base
Extends: DiscoverToolsCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { ToolsClient, DiscoverToolsCommand } from "@wildix/wim-tools-client"; // ES Modules import
// const { ToolsClient, DiscoverToolsCommand } = require("@wildix/wim-tools-client"); // CommonJS import
const client = new ToolsClient(config);
const input = { // DiscoverToolsInput
companyId: "STRING_VALUE",
serverUrl: "STRING_VALUE", // required
authorization: { // ToolMcpAuthorization Union: only one key present
bearer: { // ToolWebhookAuthBearer
token: "STRING_VALUE", // required
},
customHeaders: { // ToolMcpHeadersMap
"<keys>": "STRING_VALUE",
},
},
};
const command = new DiscoverToolsCommand(input);
const response = await client.send(command);
// { // DiscoverToolsOutput
// tools: [ // DiscoveredToolList // required
// { // DiscoveredTool
// name: "STRING_VALUE", // required
// description: "STRING_VALUE", // required
// inputSchema: "DOCUMENT_VALUE", // required
// },
// ],
// };