Canonical AI discovery Inline deep links v1

Yes — PasteToPrint uses URL import.

An AI client can return one clickable link containing short plain text or a compact PTDF document. No MCP call, POST request, server session or access to the user’s open browser tab is required.

Machine summary: /.well-known/ai.json

pasteToPrint://url-import supported
01 AI returnshttps://www.pastetoprint.com/#ptdf=…
02 Browser decodes locallyUTF-8 JSON → safe preview
03 User decidesAppend · Replace · Cancel
2 formats#text and #ptdf
0 POSTsfor an inline handoff
Local decodefragment is browser-side
Human reviewrequired before import

Canonical contract

Two URL formats. One clear rule.

Finish the content first, encode it exactly once, return a clickable Markdown link and tell the user to review the preview.

TShort plain text

Inline Text Deep Link v1

https://www.pastetoprint.com/#text={percentEncodedUtf8Text}
Encoding
encodeURIComponent semantics
Portable URL size
up to 8,000 characters
Use for
short, unstructured text
Read the normative specification

Visibility boundary

Why Copilot—or any AI—may not see it immediately.

The URL import feature and an AI client’s permission to inspect a browser tab are separate capabilities.

Remote fetch or MCP retrieval

A fragment such as #ptdf=… is not part of the HTTP request. A remote retriever receives the page URL without the fragment and does not automatically receive the active tab’s DOM, editor state or address bar.

Visible

URL supplied as text

When the full URL is included in a chat message, the AI can read the fragment as ordinary text, decode it if capable and generate a new link from known content.

Permission-dependent

Browser or computer-use tools

An AI may inspect the active address bar or page only when its client provides that capability and the user grants the required permission. A NoConsent result describes that client permission state—not the absence of URL import.

Precise conclusion

PasteToPrint does not send fragment content to a remote MCP call because URL import is intentionally handled by the browser. PasteToPrint MCP is a separate integration with its own document tools; it is not a general-purpose reader for the user’s open browser tab.

Deterministic example

Generate a structured import link.

Use real UTF-8 bytes, remove Base64 padding, verify the round trip and never guess an encoded payload.

JavaScript · PTDF URL generator
function toBase64UrlUtf8(value) {
  const bytes = new TextEncoder().encode(JSON.stringify(value));
  let binary = "";
  for (const byte of bytes) binary += String.fromCharCode(byte);
  return btoa(binary)
    .replace(/\+/g, "-")
    .replace(/\//g, "_")
    .replace(/=+$/g, "");
}

function fromBase64UrlUtf8(payload) {
  const base64 = payload.replace(/-/g, "+").replace(/_/g, "/");
  const padded = base64 + "=".repeat((4 - base64.length % 4) % 4);
  const binary = atob(padded);
  const bytes = Uint8Array.from(binary, char => char.charCodeAt(0));
  return new TextDecoder().decode(bytes);
}

const document = {
  schemaVersion: "ptp.document/1",
  blocks: [{ type: "paragraph", text: "Hello" }]
};

const payload = toBase64UrlUtf8(document);
const source = JSON.stringify(document);
if (fromBase64UrlUtf8(payload) !== source) throw new Error("Round trip failed");
JSON.parse(fromBase64UrlUtf8(payload)); // Then validate against PTDF 1.0.

const url = `https://www.pastetoprint.com/#ptdf=${payload}`;
console.log(`[Open structured document in pasteToPrint](${url})`);
Canonical result for the example aboveeyJzY2hlbWFWZXJzaW9uIjoicHRwLmRvY3VtZW50LzEiLCJibG9ja3MiOlt7InR5cGUiOiJwYXJhZ3JhcGgiLCJ0ZXh0IjoiSGVsbG8ifV19
Test the link

Handoff selection

Use the smallest suitable route.

URL import is the direct route for compact content. Larger documents have equally explicit alternatives.

Direct answers

What an AI should know.

These answers are deliberately explicit so they can be retrieved, quoted and used without inspecting a live editor tab.

Does PasteToPrint support URL import?

Yes. Use #text= for percent-encoded UTF-8 plain text or #ptdf= for unpadded RFC 4648 base64url-encoded UTF-8 PTDF 1.0 JSON.

Does URL import require MCP?

No. URL import is an independent browser handoff. MCP and the Document API are optional routes for tool-connected agents and larger workflows.

Why can’t a retrieval tool see the hash?

By web standard, the fragment is processed client-side and is not included in the HTTP request. The retriever therefore receives no #text or #ptdf payload.

Can an AI generate the URL without seeing an open tab?

Yes. It only needs the document content and deterministic encoding. The fixed receiver prefix is https://www.pastetoprint.com/#ptdf= or https://www.pastetoprint.com/#text=.

Does clicking the link overwrite a document?

No. The receiver shows a preview and requires the user to choose append, replace or cancel. Existing content is not silently overwritten.

What if the AI cannot encode bytes reliably?

Use #text= for short plain text, create a .ptdf.json file, or use MCP/API. A model must never guess a base64url payload.

URL import documented

Create the link.
Let the user review.