> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/developer-guide/classic-api/data-access/organization-tables/tool.md).

# Tool

Schema reference for tools and the versioned code packages behind them.

### Tools Table

**Table Name:** `tools`\
**Description:** Tool configurations and metadata

{% tabs %}
{% tab title="Schema" %}

| Column           | Type      | Description                  |
| ---------------- | --------- | ---------------------------- |
| `_id`            | string    | Tool identifier              |
| `created_at`     | timestamp | Creation timestamp           |
| `deprecated`     | boolean   | Deprecation status           |
| `description`    | string    | Tool description             |
| `envvars`        | json      | Environment variables        |
| `name`           | string    | Tool name                    |
| `org_id`         | string    | Organization identifier      |
| `region_name`    | string    | Deployment region            |
| `secret_envvars` | json      | Secret environment variables |
| `tags`           | json      | Associated tags              |
| `updated_at`     | timestamp | Last update timestamp        |
| {% endtab %}     |           |                              |

{% tab title="Query Example" %}

```sql
SELECT
  name,
  description,
  deprecated,
  tags
FROM tools
WHERE deprecated = false;
```

{% endtab %}
{% endtabs %}

### Tool Versions Table

**Table Name:** `tool_versions`\
**Description:** Version history and configurations for tools

{% tabs %}
{% tab title="Schema" %}

| Column                       | Type      | Description                                       |
| ---------------------------- | --------- | ------------------------------------------------- |
| `_id`                        | string    | Version identifier                                |
| `amigo_scaffold_commit_hash` | string    | Scaffold commit hash                              |
| `created_at`                 | timestamp | Creation timestamp                                |
| `creator`                    | json      | Creator info `{ user_id, user_org_id }`           |
| `creator_user_id`            | string    | Creator user ID                                   |
| `deprecated`                 | boolean   | Deprecation status                                |
| `input_schema`               | json      | Input schema definition                           |
| `org_id`                     | string    | Organization identifier                           |
| `project_directory`          | string    | Project directory path                            |
| `region_name`                | string    | Deployment region                                 |
| `required_envvars`           | json      | Required environment vars                         |
| `required_secret_envvars`    | json      | Required secret vars                              |
| `tool_commit_hash`           | string    | Tool commit hash                                  |
| `tool_id`                    | string    | Parent tool ID                                    |
| `updated_at`                 | timestamp | Last update timestamp                             |
| `version`                    | json      | Semantic version object `{ major, minor, patch }` |
| {% endtab %}                 |           |                                                   |

{% tab title="Query Example" %}

```sql
SELECT
  tool_id,
  version,
  deprecated,
  created_at,
  project_directory
FROM tool_versions
ORDER BY created_at DESC;
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amigo.ai/developer-guide/classic-api/data-access/organization-tables/tool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
