Your AI tool sees these tools once it's connected. It picks the right one from what you ask, so you don't need to name them.

- **Read only** tools look things up and change nothing.
- **Changes your documents** tools add documents or links.
- **Asks you first** tools change something that already exists, such as a link's rules. Most AI tools ask you before they use one.

No tool deletes a document, a link or a version, and no tool returns the text of a document. The only thing a tool can remove is a link's old address when you change the address, and it asks you first.

## Get sharing guide

Explains every way to share a document with Sharelatch (text written in the chat, files, zipped web pages, slide decks) and this person's current limits.

Read only

### What you get back

- guide
- account
- limits

## Publish document

Publishes a document written in this chat as a protected link: HTML (including an artifact), Markdown, text or SVG, at most 2 MB. HTML is published as HTML, with its layout kept. Files on disk, PDFs, images and zipped web pages are uploaded with start_file_upload instead.

Changes your documents

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| fileName | string | Yes | The file name with its extension, such as report.html. The extension decides the document type. |
| content | string | Yes | The document text. At most 2 MB. HTML is published as HTML. |
| title | string | No | The name the owner sees. Leave it out to use the file name. |
| link | object or boolean | No | Rules for the link this creates. Leave it out for a link with no extra rules. False makes no link. |

### What you get back

- document
- link
- appAddress

## Start file upload

Starts an upload of a file on disk: PDF, image, .md, .txt, or a .zip of a web page folder with index.html at the top. Works in AI tools that can run commands. Returns the method, address and headers for sending the file bytes; finish_file_upload completes the upload. A .zip of pictures becomes one slide deck, in file-name order, and can be up to five times the usual file size.

Changes your documents

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| fileName | string | Yes | The file name with its extension, such as report.html. The extension decides the document type. |
| sizeBytes | integer | Yes | The file size in bytes. |
| contentType | string | Yes | The file's content type, such as application/pdf. |
| documentId | string | No | The document. For start_file_upload, set it to replace that document's file, or leave it out to make a new one. |

### What you get back

- uploadId
- upload
- command

## Finish file upload

Finish an upload once the file bytes have been sent to the address from start_file_upload.

Changes your documents

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| uploadId | string | Yes | The upload id returned by start_file_upload. |

### What you get back

- document
- appAddress

## Replace document file

Replace a document's file with HTML, Markdown, text or SVG you wrote in this chat, at most 2 MB. The link addresses stay the same.

Asks you first

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| documentId | string | Yes | The document. |
| fileName | string | Yes | The file name with its extension, such as report.html. The extension decides the document type. |
| content | string | Yes | The document text. At most 2 MB. HTML is published as HTML. |

### What you get back

- document
- links

## Create link

Add another link to a document that already exists. Set the rules and, when the person asks, a chosen address.

Changes your documents

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| documentId | string | Yes | The document. |
| name | string | No | A name only the owner sees, such as Investors. |
| ending | string | No | A chosen address, <host>/<username>/<ending>: 3 to 60 lowercase letters, numbers or hyphens. Leave it out to use only the random address. Needs a username in settings. |
| password | string or null | No | A password of 6 or more characters. Viewers enter it before the document opens. |
| expiresAt | string or null | No | When the link stops working, as an ISO date and time, such as 2026-12-31T18:00:00+05:30. |
| maxViews | integer or null | No | How many views the link allows, from 1 to 1,000. Leave it out for no limit. |
| requireEmail | boolean | No | When true, viewers confirm their email before the document opens. |
| allowDownload | boolean | No | When true, viewers can download the file. |
| keepOldAddress | boolean | No | Keep the old chosen address forwarding to the new one (default). False deletes the old address, so it stops working. |

### What you get back

- link

## Update link

Change a link's name, rules, or chosen address, or turn it off or on.

Asks you first

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| linkId | string | Yes | The link to change, look up, or draw a QR code for. |
| on | boolean | No | True turns the link on. False turns it off. |
| name | string | No | A name only the owner sees, such as Investors. |
| ending | string | No | A chosen address, <host>/<username>/<ending>: 3 to 60 lowercase letters, numbers or hyphens. Leave it out to use only the random address. Needs a username in settings. |
| password | string or null | No | A password of 6 or more characters. Viewers enter it before the document opens. |
| expiresAt | string or null | No | When the link stops working, as an ISO date and time, such as 2026-12-31T18:00:00+05:30. |
| maxViews | integer or null | No | How many views the link allows, from 1 to 1,000. Leave it out for no limit. |
| requireEmail | boolean | No | When true, viewers confirm their email before the document opens. |
| allowDownload | boolean | No | When true, viewers can download the file. |
| keepOldAddress | boolean | No | Keep the old chosen address forwarding to the new one (default). False deletes the old address, so it stops working. |

### What you get back

- link

## List documents

Documents already in this workspace, newest first, with optional search, so an existing document can be found instead of published twice.

Read only

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| query | string | No | Words to search for. |
| cursor | string | No | The nextCursor from the previous page. Leave it out for the first page. |
| limit | integer | No | How many to return, from 1 to 50. Defaults to 20. |

### What you get back

- items
- nextCursor

## Get document

Facts about one document and its links. This never returns the document's text.

Read only

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| documentId | string | Yes | The document. |

### What you get back

- id
- title
- kind
- sizeBytes
- appAddress
- status
- createdAt
- updatedAt
- versionCount
- links
- pdfViewShown

## List links

List links, optionally for one document, with each address and its old addresses.

Read only

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| documentId | string | No | The document. |
| query | string | No | Words to search for. |
| status | string | No | on, off, expired, or used_up. |
| cursor | string | No | The nextCursor from the previous page. Leave it out for the first page. |
| limit | integer | No | How many to return, from 1 to 50. Defaults to 20. |

### What you get back

- items
- nextCursor

## Get analytics

Who opened a document or a link, where they were, and how long they spent on each section. No IP addresses. Viewers are told that reading is tracked.

Read only

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| documentId | string | No | Analytics for this document. Set this or linkId, not both. |
| linkId | string | No | Analytics for this link. Set this or documentId, not both. |
| days | number or number or number | No | 7, 30, or 90. Defaults to 30, and never more than the plan keeps. |

### What you get back

- totals
- byDay
- people
- pages

## Get QR code

A dynamic QR code for print. It keeps working if the chosen address changes.

Read only

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| linkId | string | Yes | The link to change, look up, or draw a QR code for. |
| size | number or number or number | No | The PNG width in pixels: 256, 512, or 1024. Defaults to 512. |

### What you get back

- qrAddress
- linkAddress

## Get usage

This workspace's plan, how many documents are used, the file size limit, links per document, and AI publishes used this month.

Read only

### What you get back

- workspace
- documents
- maxFileBytes
- maxLinksPerDocument
- aiPublishes
- storage