# get_registry

Discover the artifacts available in a Paradoc registry

Canonical URL: https://docs.paradoc.dev/ai-tools/get-registry/

Fetches a registry's `registry.json` and returns the artifacts it lists.

## Input

| Field          | Type           | Required | Description                                                                                         |
| -------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------- |
| `registry_url` | `string` (URL) | No       | Registry base URL. Falls back to `defaultRegistryUrl` in the [config](/ai-tools/api#configuration). |

If neither is set, the tool returns a `missing_registry_url` error.

## Output

| Field            | Type                            | Description                                                |
| ---------------- | ------------------------------- | ---------------------------------------------------------- |
| `registry_url`   | `string`                        | The registry that was read                                 |
| `artifacts_path` | `string`                        | Optional path under which the registry keeps its artifacts |
| `items`          | `{ name, path? }[]`             | The listed artifacts. Empty when the call fails.           |
| `error`          | [`ToolError`](/ai-tools#errors) | Set when the registry could not be read                    |

## Direct usage

```typescript
import { executeGetRegistry } from "@paradoc/ai-tools"

const result = await executeGetRegistry({
  registry_url: "https://public.paradoc.dev",
})
```

With a configured default, the input can be empty:

```typescript
const result = await executeGetRegistry({}, {
  defaultRegistryUrl: "https://public.paradoc.dev",
})
```

## Example response

The item list is shortened here.

```json
{
  "registry_url": "https://public.paradoc.dev",
  "items": [
    { "name": "pet-addendum" }
  ]
}
```
