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

# Attention: Confirm Kbsource Upload

> Finish uploading a file to the Attention knowledge base and start indexing it. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Finish uploading a file to the Attention knowledge base and start indexing it.

> [!NOTE]
>
> Tool ID: `attention_confirm_kbsource_upload`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'attention_confirm_kbsource_upload',
  {
    "sourceId": "source_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute attention_confirm_kbsource_upload --input '{
  "sourceId": "source_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": {
      "type": "example",
      "id": "id_123",
      "attributes": {
        "title": "VP of Engineering",
        "source_type": "manual",
        "content": "Example message"
      }
    }
  }
}
```

Use `deepline describe attention_confirm_kbsource_upload --json` for the latest machine-readable contract.

## Input reference

Validates the uploaded file (format via magic bytes, size against limit) and triggers indexing. If validation fails, the file is deleted from S3 and the source is removed. Supported formats: PDF, Markdown, HTML, plain text. Maximum size: 100 MB.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.sourceId` | `string` | Yes | — | The unique identifier of the KB source |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Validates the uploaded file (format via magic bytes, size against limit) and triggers indexing. If validation fails, the file is deleted from S3 and the source is removed. Supported formats: PDF, Markdown, HTML, plain text. Maximum size: 100 MB.",
    "properties": {
      "sourceId": {
        "type": "string",
        "description": "The unique identifier of the KB source"
      }
    },
    "required": [
      "sourceId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `object` | No | — | — |
| `result.data.data.type` | `string` | No | — | Resource type |
| `result.data.data.id` | `string` | No | — | Unique identifier of the KB source |
| `result.data.data.attributes` | `object` | No | — | — |
| `result.data.data.attributes.title` | `string` | No | — | Title of the KB source |
| `result.data.data.attributes.source_type` | `"manual" \| "upload"` | No | — | Type of source: manual (inline content) or upload (S3 file) Allowed: `manual`, `upload`. |
| `result.data.data.attributes.content` | `string` | No | — | Content of the source (present on get, absent on list) |
| `result.data.data.attributes.format` | `string` | No | — | Content format (e.g. text/markdown, application/pdf, text/html, text/plain) |
| `result.data.data.attributes.status` | `"pending" \| "uploading" \| "indexing" \| "indexed" \| "failed"` | No | — | Processing status of the source Allowed: `pending`, `uploading`, `indexing`, `indexed`, `failed`. |
| `result.data.data.attributes.file_size` | `integer` | No | — | File size in bytes |
| `result.data.data.attributes.chunk_count` | `integer` | No | — | Number of indexed chunks |
| `result.data.data.attributes.created_at` | `string` | No | — | Creation timestamp Format: `date-time`. |
| `result.data.data.attributes.updated_at` | `string` | No | — | Last update timestamp Format: `date-time`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Resource type"
              },
              "id": {
                "type": "string",
                "description": "Unique identifier of the KB source"
              },
              "attributes": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the KB source"
                  },
                  "source_type": {
                    "type": "string",
                    "description": "Type of source: manual (inline content) or upload (S3 file)",
                    "enum": [
                      "manual",
                      "upload"
                    ]
                  },
                  "content": {
                    "type": "string",
                    "description": "Content of the source (present on get, absent on list)"
                  },
                  "format": {
                    "type": "string",
                    "description": "Content format (e.g. text/markdown, application/pdf, text/html, text/plain)"
                  },
                  "status": {
                    "type": "string",
                    "description": "Processing status of the source",
                    "enum": [
                      "pending",
                      "uploading",
                      "indexing",
                      "indexed",
                      "failed"
                    ]
                  },
                  "file_size": {
                    "type": "integer",
                    "description": "File size in bytes"
                  },
                  "chunk_count": {
                    "type": "integer",
                    "description": "Number of indexed chunks"
                  },
                  "created_at": {
                    "type": "string",
                    "description": "Creation timestamp",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "description": "Last update timestamp",
                    "format": "date-time"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Attention provider guide](https://deepline.com/docs/providers/attention/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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