> For the complete documentation index, see [llms.txt](https://docs.workflowgen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.workflowgen.com/admin/10.0/workflow-applications/getagenttool.md).

# 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](/admin/10.0/workflow-applications/openai/openaichat.md).

## 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.workflowgen.com/admin/10.0/workflow-applications/getagenttool.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
