> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genesiscomputing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DataStage Tools

> Discover IBM InfoSphere DataStage 11.7 projects and jobs and export original DSX project definitions from Genesis Data Agents.

## Overview

The `datastage_tools` group provides read-only access to IBM InfoSphere
DataStage 11.7 through a saved [IBM DataStage connection](/docs/Setup/Connections#ibm-datastage-117-connections).
Each call connects to the configured Windows Classic client host over SSH and
invokes one IBM read-only command. Configure the connection before granting
this tool group to an agent.

The group supports discovery and complete project exports only. It has no run,
import, compile, write, promotion, or pipeline-trigger operation.

## `datastage_tool`

Use `datastage_tool` to list visible projects, list jobs in a project, or export
the project's original DSX definition and parameter content.

| Parameter | Type | Default | Description |
| - | - | - | - |
| `action` | string | required | One of `LIST_PROJECTS`, `LIST_JOBS`, or `EXPORT_PROJECT`. |
| `connection_id` | string | required | Saved DataStage connection, such as `datastage.dev`. |
| `project` | string or null | `null` | DataStage project. Required for `LIST_JOBS` and `EXPORT_PROJECT`; omit for `LIST_PROJECTS`. |
| `bot_id` | string or null | implicit | Calling agent identity. |
| `thread_id` | string or null | implicit | Current thread identity. Required for `EXPORT_PROJECT`, which saves the file in that thread's file storage. |
| `user_id` | string or null | implicit | Calling user identity. |

Examples:

```python theme={null}
datastage_tool(
    action="LIST_PROJECTS",
    connection_id="datastage.dev",
)
datastage_tool(
    action="LIST_JOBS",
    connection_id="datastage.dev",
    project="Finance",
)
datastage_tool(
    action="EXPORT_PROJECT",
    connection_id="datastage.dev",
    project="Finance",
)
```

`LIST_PROJECTS` returns the visible project names. `LIST_JOBS` returns the jobs
visible in the selected project. `EXPORT_PROJECT` transfers the original DSX
bytes, up to the 20 MiB limit, validates that the result is a complete DSX job
definition, and saves it to the current thread's file storage as
`<project>.dsx`. The response identifies the saved file and includes its path,
size, owner, and SHA-256 hash; parameter values remain in the file rather than
being copied into the tool response.

Failures return `success: false` with a safe error message. A connection test
and each tool operation use the configured pinned SSH host key and the
DataStage read-only credentials.
