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

# Registry Routes

> Tool catalog, source registration, search, and tool lookup.

## Get catalog

```
GET /api/registry
```

Returns the full serialized tool catalog including all registered sources and their tools.

**Response (200):**

```json theme={null}
{
  "version": "v1",
  "types": {
    "t0": { "type": "object", "properties": { ... } },
    "t1": { "type": "object", "properties": { ... } }
  },
  "tools": [
    {
      "path": "github.issues.list",
      "name": "List Issues",
      "description": "List issues in a GitHub repository",
      "sourceId": "github",
      "inputSchemaRef": "t0",
      "destructive": false,
      "serviceAccountAllowed": false
    }
  ],
  "sources": [
    {
      "id": "github",
      "type": "plugin",
      "name": "GitHub",
      "description": "GitHub issues, pull requests, and repository operations.",
      "toolCount": 3
    }
  ]
}
```

The catalog uses a shared type dictionary (`types`) to deduplicate JSON Schema objects. Tool entries reference schemas by key (e.g., `"t0"`) instead of inlining them.

***

## Register source

```
POST /api/registry/sources
```

Register a new source and import its tools into the catalog.

### Request body

A `SourceConfig` object. See [Adding Sources](/guides/adding-sources) for the full schema.

**Example (plugin source):**

```json theme={null}
{
  "type": "plugin",
  "id": "github",
  "namespace": "github",
  "pluginId": "github"
}
```

### Response (201)

```json theme={null}
{
  "registered": true,
  "sourceId": "github",
  "name": "GitHub",
  "toolCount": 3,
  "tools": ["github.issues.list", "github.issues.create", "github.repos.search"]
}
```

***

## Deregister source

```
DELETE /api/registry/sources/:id
```

Removes a source and all its tools from the catalog.

| Parameter | In   | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`      | path | Yes      | Source ID   |

**Response (200):**

```json theme={null}
{
  "removed": true,
  "sourceId": "github"
}
```

***

## Search tools

```
GET /api/registry/search?q=<query>&limit=<limit>
```

Fuzzy search across all registered tools.

| Parameter | In    | Required | Default | Description  |
| --------- | ----- | -------- | ------- | ------------ |
| `q`       | query | Yes      | --      | Search query |
| `limit`   | query | No       | `10`    | Max results  |

**Response (200):**

```json theme={null}
{
  "query": "issues",
  "results": [
    {
      "path": "github.issues.list",
      "name": "List Issues",
      "description": "List issues in a GitHub repository",
      "destructive": false
    }
  ]
}
```

***

## Get tool

```
GET /api/registry/tool/:path
```

Returns the full `ToolDefinition` for a specific tool.

| Parameter | In   | Required | Description                              |
| --------- | ---- | -------- | ---------------------------------------- |
| `path`    | path | Yes      | Tool path (e.g., `github.issues.create`) |

**Response (200):**

```json theme={null}
{
  "path": "github.issues.create",
  "name": "Create Issue",
  "description": "Create a new issue in a GitHub repository.",
  "inputSchema": { ... },
  "outputSchema": { ... },
  "destructive": true,
  "authProvider": "github",
  "serviceAccountAllowed": false
}
```
