# GETAGENTTOOL

## Overview

The GETAGENTTOOL workflow application allows you to extract a tool and its information from a list of tools that can be provided by an application such as [OPENAICHAT](https://docs.workflowgen.com/admin/9.3/workflow-applications/openai/openaichat).

## How it works

* The application allows you to extract the name, identifier, and parameters of the tool being manipulated.
* It's also possible to extract the parameters one by one by specifying the name of the parameter directly in the name.

## Parameters

<table data-full-width="false"><thead><tr><th width="237.2080078125" valign="top">Parameter</th><th width="113.65667724609375" valign="top">Type</th><th width="113.41021728515625" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>TOOLS</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top"><strong>Required</strong><br>Table of tools in JSON format</td></tr><tr><td valign="top"><code>TOOL_INDEX</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">Array index for tool extraction; defaults to <code>0</code></td></tr><tr><td valign="top"><code>TOOL</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Extracted tool in JSON format</td></tr><tr><td valign="top"><code>TOOL_NAME</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Name of tool</td></tr><tr><td valign="top"><code>TOOL_ID</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">ID of tool</td></tr><tr><td valign="top"><code>TOOL_PARAMETERS</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Tool settings in JSON format</td></tr><tr><td valign="top"><code>propertyToExtract</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Property to extract in settings</td></tr></tbody></table>

## Example

#### IN

<table><thead><tr><th width="237.2479248046875" valign="top">Parameter</th><th valign="top">Value</th></tr></thead><tbody><tr><td valign="top"><code>TOOLS</code></td><td valign="top"><code>[ { "name":"GET_STOCK_INFORMATION", "id":"call_Vuc2Ga8jP7vUksxG9C0fwpY8", "parameters": { "product_name": "Vis", "serial_number": "V45645" } }, { "name": "GET_STOCK_INFORMATION", "id": "call_nq3SCVUk0FjAHCeqOZGNXpC8", "parameters": { "product_name": "Vis", "serial_number": "V45645" } } ]</code></td></tr><tr><td valign="top"><code>TOOL_INDEX</code></td><td valign="top"><code>1</code></td></tr></tbody></table>

#### OUT

<table><thead><tr><th width="237.9600830078125" valign="top">Parameter</th><th valign="top">Value</th></tr></thead><tbody><tr><td valign="top"><code>TOOL</code></td><td valign="top"><code>{ "name": "GET_STOCK_INFORMATION", "id": "call_nq3SCVUk0FjAHCeqOZGNXpC8", "parameters": { "product_name": "Vis", "serial_number": "V45645" } }</code></td></tr><tr><td valign="top"><code>TOOL_NAME</code></td><td valign="top"><code>GET_STOCK_INFORMATION</code></td></tr><tr><td valign="top"><code>TOOL_ID</code></td><td valign="top"><code>call_nq3SCVUk0FjAHCeqOZGNXpC8</code></td></tr><tr><td valign="top"><code>TOOL_PARAMETERS</code></td><td valign="top"><code>{ "product_name": "Vis", "serial_number": "V45645" }</code></td></tr><tr><td valign="top"><code>serial_number</code></td><td valign="top"><code>V45645</code></td></tr><tr><td valign="top"> <code>product_name</code></td><td valign="top"><code>Vis</code></td></tr></tbody></table>
