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

# get_document_by_share_url

> Resolve a pasted Montra share link into its full machine-readable payload.

Someone pastes you a Montra share link. This tool turns it into the payload behind it: the document, every in-scope ticket with its markdown spec, annotated screenshot URLs, recordings, extracted frames, and the agent instructions that come with the share.

Always use this instead of fetching or browsing the share web page. The page is built for people; this returns the same content in a form you can act on, and it works on links the anonymous web fetch would refuse.

## Input

<ParamField body="url" type="string" required>
  The Montra share link exactly as it was given to you, or a bare share token.

  Accepted forms: a `/share/<token>` or `/tasks-for-agents/<token>` URL on any host (a trailing `.json` is fine), or the token on its own (16–128 characters of letters, digits, `-`, and `_`). Query parameters on the URL are honored — `?tickets=<id,id,…>` narrows the payload to the tickets the person selected, and `?documentId=<id>` points at one document inside a folder share. Paste the link whole rather than trimming it.
</ParamField>

<ParamField body="documentId" type="string">
  For folder shares: id of one document from the folder payload's `documents[]` to read in full (UUID). Takes precedence over a `documentId` in the URL.
</ParamField>

## Output

<ResponseField name="access" type="string" required>
  Which resolution leg applied: `public` or `member`. See [How resolution works](#how-resolution-works).
</ResponseField>

<ResponseField name="note" type="string" required>
  Plain-language guidance for this particular response — how to treat the URLs inside it, and whether it is a folder index rather than a document.
</ResponseField>

<ResponseField name="context" type="object" required>
  The share payload. A document share and a folder share return different shapes; `resourceType` tells you which.

  <Expandable title="document share">
    <ResponseField name="resourceType" type="string" required>`document` or `document_ticket`.</ResponseField>
    <ResponseField name="scope" type="string" required>`document` or `ticket`.</ResponseField>
    <ResponseField name="id" type="string" required>Id of the shared resource.</ResponseField>
    <ResponseField name="title" type="string" required>Document title.</ResponseField>
    <ResponseField name="summary" type="string" required>Document summary. `null` when it has none.</ResponseField>
    <ResponseField name="shareUrl" type="string" required>The share URL this payload was resolved from. Can be a legacy expiring link, so when pasting a link anywhere durable — an external tracker, a commit message — use `humanShareUrl` instead.</ResponseField>
    <ResponseField name="humanShareUrl" type="string" required>Durable human-facing link to the same resource, safe to paste into a tracker. `null` when no durable link exists yet.</ResponseField>
    <ResponseField name="agentInstructions" type="object" required>How the share's author wants the payload used — which object is primary, and guidance to follow.</ResponseField>
    <ResponseField name="endpoints" type="object" required>Anonymous `context` and `transcript` URLs for re-fetching. Only resolvable when `access` is `public`.</ResponseField>

    <ResponseField name="tickets" type="array" required>
      The in-scope tickets — the implementation instructions.

      <Expandable title="properties">
        <ResponseField name="id" type="string" required>Ticket id, usable with the ticket tools when the document is in your bound workspace.</ResponseField>
        <ResponseField name="title" type="string" required>Ticket title.</ResponseField>
        <ResponseField name="status" type="string" required>`todo` or `done`.</ResponseField>
        <ResponseField name="summary" type="string" required>One-line gist. `null` when the ticket has none.</ResponseField>
        <ResponseField name="description" type="array" required>The markdown body split into bullet lines.</ResponseField>
        <ResponseField name="descriptionMarkdown" type="string">The original markdown body, unsplit.</ResponseField>
        <ResponseField name="timestampMs" type="number" required>Offset into the source recording the ticket points at, in milliseconds.</ResponseField>
        <ResponseField name="inputId" type="string" required>Id of the recording in `recordings[]` this ticket came from. `null` for hand-added tickets.</ResponseField>
        <ResponseField name="humanShareUrl" type="string" required>Durable link scoped to this one ticket, ready to paste into an external tracker. `null` when no durable link exists.</ResponseField>
        <ResponseField name="images" type="array" required>Annotated screenshots — `id`, `timestampMs`, `caption` (`null` when absent), and `annotatedImageUrl`. Load these before implementing; the user's markup is the instruction.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="extractedFrames" type="array" required>Unannotated frames from the recording, as supporting context: `id`, `timestampMs`, `description` (`null` when absent), `inputId` (`null` when unattributed), `frameUrl`.</ResponseField>
    <ResponseField name="recordings" type="array" required>The document's inputs: `id`, `title` (`null` when unnamed), `kind`, `durationMs` (`null` when unknown), `transcriptUrl`, and `mediaUrl` (`null` when no media).</ResponseField>
    <ResponseField name="generation" type="object">Present while task generation can still change the ticket list. When it says generation is not complete, the tickets here are partial — wait and re-read before implementing. Absent means complete.</ResponseField>
  </Expandable>

  <Expandable title="folder share">
    <ResponseField name="resourceType" type="string" required>`folder`.</ResponseField>
    <ResponseField name="id" type="string" required>Folder id.</ResponseField>
    <ResponseField name="title" type="string" required>Folder name.</ResponseField>
    <ResponseField name="shareUrl" type="string" required>The share URL this payload was fetched with.</ResponseField>
    <ResponseField name="humanShareUrl" type="string" required>Durable human-facing link to the folder. `null` when none exists yet.</ResponseField>
    <ResponseField name="agentInstructions" type="object" required>Guidance to follow, as on a document share.</ResponseField>
    <ResponseField name="documents" type="array" required>The folder's documents: `id`, `title`, and a per-document `context` URL. Call this tool again with the same url plus one of these ids as `documentId` to read a document in full.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="transcripts" type="array">
  Recording narration, inlined. Present only in `member` mode, and only for recordings that have a transcript.

  <Expandable title="properties">
    <ResponseField name="inputId" type="string" required>Id of the recording this transcript belongs to.</ResponseField>
    <ResponseField name="text" type="string" required>Full transcript text.</ResponseField>
    <ResponseField name="segments" type="array" required>Timed chunks: `startMs` and `endMs` (either may be `null`) plus `text`.</ResponseField>
  </Expandable>
</ResponseField>

## How resolution works

Resolution happens in two legs, and `access` tells you which one applied.

1. **`public`** — the link is set to *Anyone with the link*, so it resolves through its own access. Every URL in the payload (images, media, transcript and context endpoints) is fetchable without authentication, and you can re-fetch `endpoints.context` later.
2. **`member`** — the link is invite-only, so it resolves as the Montra user who authorized this connection. Your agent is you: you can read your own links and links shared with you regardless of the link's visibility setting.

In `member` mode the payload's anonymous endpoints cannot serve the link, so two things change: image and media URLs are re-minted as **short-lived signed links** — fetch them while you work rather than storing them — and transcripts are **inlined** in `transcripts` instead of being left behind `transcriptUrl`.

## Notes

* This tool works on links from **any** workspace. It is the one deliberate exception to the connection's [workspace binding](/authentication#workspace-binding), because a pasted link names one specific resource. Every other tool stays inside the bound workspace.
* Folder links resolve to an index of the folder's documents. Read one by calling again with the same url plus its `documentId`.
* A `?tickets=` filter means the person chose those tickets deliberately: only they are in scope for implementation, even though the rest of the document is readable for context.
* If the link fails to resolve, it is either invalid, expired, or revoked, or it is invite-only and the connecting Montra account has no access. The fixes are on the sharing side: have the person invite that account, switch the link to *Anyone with the link* in Montra's Share dialog, or send a fresh link.
* The full story — how the same link serves people and agents, and how to fetch a public payload without the connector — is in the [share links guide](/guides/share-links).
