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

# Discover internal-link inventory pages

> Discover up to 100 owned-site URLs from robots-declared sitemaps or sitemap.xml.

`preview_internal_link_inventory`

Discover up to 100 owned-site URLs from robots-declared sitemaps or sitemap.xml. Retains a 15-minute preview with source digests; no snapshots, page captures or monitors until selected URLs are confirmed. Retry with the same requestId.

<Note>This command name is absent from deployment evidence dated 2026-09-20. Hosted availability for this current definition is unverified; inspect your connected catalog before invoking it. Verify the command and its input schema in the selected environment.</Note>

| Access | Behavior |
| - | - |
| `watches:write`, `watches:read` | Writes or admits work |

This operation changes saved state. Review its inputs and retry behavior before calling.

## Example request

Connect through [MCP](/guides/connect-mcp), [CLI](/guides/connect-cli), or [HTTP](/guides/connect-http). Replace example identifiers with records from your workspace.

<CodeGroup>
  ```json MCP theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "preview_internal_link_inventory",
      "arguments": {
        "projectId": "prj_example",
        "requestId": "discover-2026-10-15"
      }
    }
  }
  ```

  ```bash CLI theme={null}
  agentlinkops call preview_internal_link_inventory --args '{"projectId":"prj_example","requestId":"discover-2026-10-15"}'
  ```

  ```bash HTTP theme={null}
  curl --fail-with-body https://app.agentlinkops.com/v1/commands/preview_internal_link_inventory \
    -H "Authorization: Bearer $AGENTLINKOPS_TOKEN" \
    -H 'Content-Type: application/json' \
    --data '{"projectId":"prj_example","requestId":"discover-2026-10-15"}'
  ```
</CodeGroup>

## Returned result

Illustrative data validated against the documented response schema. IDs and dates are examples, not a live account capture. MCP returns this data in `structuredContent` and in a text content block; generic HTTP and CLI return the JSON result directly.

```json theme={null}
{
  "preview": {
    "id": "ilp_example",
    "projectId": "prj_example",
    "domain": "example.com",
    "createdAt": "2026-10-15T12:00:00.000Z",
    "expiresAt": "2026-10-15T12:15:00.000Z",
    "state": "complete",
    "urls": [
      "https://example.com/"
    ],
    "documents": [],
    "coverage": {
      "completeSiteCensus": false,
      "truncated": false,
      "reasons": []
    }
  },
  "limits": {
    "sitemapDocuments": 3,
    "indexDepth": 2,
    "timeoutMs": 20000,
    "documentBytes": 2097152,
    "offeredUrls": 100,
    "inventoryUrlBytes": 131072,
    "requests": 10,
    "retentionMs": 900000,
    "startsPerMinute": 3
  }
}
```

## Input fields

Omit optional fields when you do not want to supply them. Null is accepted only where listed. Unknown input properties are rejected.

| Field | Type | Presence | Meaning and constraints |
| - | - | - | - |
| `projectId` | string | Required | project ID from create/list. minLength: `1`; maxLength: `200` |
| `requestId` | string | Required | Caller-generated retry key. Reuse the same key and inputs to retry this operation; use a new key for a new operation. minLength: `1`; maxLength: `128` |

### Validation and omitted values

Requires watches:read and watches:write. Supply projectId and a requestId of 1-128 characters. Discovery reads robots.txt and eligible declared sitemaps on the exact project hostname. It tries /sitemap.xml if no URLs were accepted and the sitemap document allowance remains.

Each new preview allows at most three sitemap documents, index depth two, ten outbound requests, 20 seconds, 2 MiB across fetched document bodies and 128 KiB of offered URL text. It returns at most 100 unique URLs. Robots rules, publisher pacing and public-network restrictions apply.

The retained preview expires 15 minutes after creation. Reuse the same requestId after an uncertain response to retrieve that preview while it remains unexpired, without starting another discovery. A concurrent retry can return pending. On a retry after 25 seconds, an interrupted pending preview becomes complete with preview\_interrupted; retrying does not resume its fetches. Use a new requestId when you choose to discover again. New starts are limited to three per workspace per minute.

Inspect coverage.reasons and coverage.truncated even when state is complete. An empty or partial preview is possible; complete describes the discovery operation, not website coverage. completeSiteCensus is always false. Source document dates, digests, statuses and failure reasons describe the retained evidence.

Choose URLs from a complete, unexpired preview, then call create\_internal\_link\_snapshot with previewId and the selected inventory. Discovery alone creates no snapshot, captures no inventory pages and enrolls no monitors. Processing the saved snapshot requires a separate call.

## Output fields

Fields inside optional or nullable parents apply only when that parent exists. [Common schema conventions](/reference/schemas) explain evidence states, empty lists and extensions.

* **`preview`** (object, required): additional fields rejected
* **`limits`** (object, required): additional fields rejected

<Accordion title="All fields and nested objects">
  | Field | Type | Presence | Meaning and constraints |
  | - | - | - | - |
  | `preview` | object | Required | additional fields rejected |
  | `preview.id` | string | Required | Resource identifier returned by the operation. minLength: `1`; maxLength: `200` |
  | `preview.projectId` | string | Required | Identifier returned by the related operation. minLength: `1`; maxLength: `200` |
  | `preview.domain` | string | Required | |
  | `preview.createdAt` | string | Required | |
  | `preview.expiresAt` | string | Required | |
  | `preview.state` | string | Required | Saved lifecycle or evidence state, as enumerated for this record. values: `"pending"`, `"complete"` |
  | `preview.urls` | array | Required | maxItems: `100` |
  | `preview.documents` | array | Required | maxItems: `13` |
  | `preview.documents[].requestedUrl` | string | Required | |
  | `preview.documents[].finalUrl` | string / null | Required | |
  | `preview.documents[].checkedAt` | string | Required | |
  | `preview.documents[].sha256` | string / null | Required | |
  | `preview.documents[].status` | integer / null | Required | Resource lifecycle status. |
  | `preview.documents[].reason` | string / null | Required | Recorded explanation; null when no explanation applies. |
  | `preview.documents[].kind` | string | Required | values: `"robots"`, `"index"`, `"urlset"`, `"unknown"` |
  | `preview.coverage` | object | Required | Dataset scope and completeness, including limits on what these results establish. additional fields rejected |
  | `preview.coverage.completeSiteCensus` | boolean | Required | must equal `false` |
  | `preview.coverage.truncated` | boolean | Required | |
  | `preview.coverage.reasons` | array | Required | |
  | `limits` | object | Required | additional fields rejected |
  | `limits.sitemapDocuments` | number | Required | must equal `3` |
  | `limits.indexDepth` | number | Required | must equal `2` |
  | `limits.timeoutMs` | number | Required | must equal `20000` |
  | `limits.documentBytes` | number | Required | must equal `2097152` |
  | `limits.offeredUrls` | number | Required | must equal `100` |
  | `limits.inventoryUrlBytes` | number | Required | must equal `131072` |
  | `limits.requests` | number | Required | must equal `10` |
  | `limits.retentionMs` | number | Required | must equal `900000` |
  | `limits.startsPerMinute` | number | Required | must equal `3` |
</Accordion>

[Download input schema](/schemas/preview_internal_link_inventory.input.json) · [Download output schema](/schemas/preview_internal_link_inventory.output.json)

## Errors and retries

In the same workspace and project, retry with the original requestId. While the preview is available, retries return its current pending or complete result without restarting discovery. Check state and coverage.reasons before confirming URLs. Previews expire after 15 minutes. For a deliberate new discovery attempt after expiry or an interrupted result, use a new requestId. Operation-specific errors include `INVALID_INPUT`, `PROJECT_ACCESS_DENIED`, `INTERNAL_LINK_DISCOVERY_UNAVAILABLE`, `INTERNAL_LINK_PREVIEW_NOT_FOUND`, `INTERNAL_LINK_PREVIEW_EXPIRED`, `INTERNAL_LINK_SCOPE_MISMATCH`, `INTERNAL_LINK_PREVIEW_RATE_LIMIT`, `INTERNAL_LINK_SCOPE_DELETING`.

See [error recovery](/reference/errors) for status, scope, cooldown, cursor and retry handling. Unknown observations are result data and do not establish loss.

## HTTP resource routes

These existing resource routes share the operation’s domain behavior. Their parameter placement, status and response envelope can differ from generic invocation. See [HTTP route details](/reference/http/routes).

| Method and route | Success | Details |
| - | - | - |
| `POST /v1/internal-links/preview` | 200 | Supply projectId and requestId in the JSON body. HTTP 200 returns a retained discovery preview and its limits, which may be pending, empty or partial. Requires watches:read and watches:write. Reuse requestId to retrieve the same unexpired preview after an uncertain response; confirm selected URLs through create\_internal\_link\_snapshot separately. |

## Continue

[create\_internal\_link\_snapshot](/reference/commands/create_internal_link_snapshot)

Follow the [related workflow](/guides/internal-links), inspect [capability status](/capability-status), or return to the [command index](/reference/index).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.