MCP tools reference

Inputs, outputs and examples for upload_file, create_upload_url, finish_upload, list_links, get_link_analytics and get_account_analytics.

Six tools, all acting as the owner of the API key: four to publish and list files, two to read analytics. Every result has a short text answer for the assistant to show you, plus structuredContent with the same data as JSON. Failures come back as a tool error with a plain-English message (for example a plan limit), not as a protocol error.

upload_file#

Publish a file sent in the call itself and return its public link. Up to 3 MB.

Arguments

filenamestringrequired
Name with extension, e.g. report.pdf or index.html. Not a path.
contentstring
The file as UTF-8 text (HTML, Markdown, CSV, SVG, JSON…). Send this or content_base64.
content_base64string
The file as base64 (PDF, images, ZIP…). Send this or content.
content_typestring
MIME type. Optional: guessed from the extension.
titlestring
Link title shown on the page. Defaults to the file name.
Call
{
  "name": "upload_file",
  "arguments": {
    "filename": "summary.html",
    "content": "<!doctype html><h1>Q3 summary</h1>…",
    "title": "Q3 summary"
  }
}
Result
{
  "content": [{ "type": "text", "text": "Published: https://linkinseconds.com/p/q3-summary" }],
  "structuredContent": {
    "slug": "q3-summary",
    "title": "Q3 summary",
    "url": "https://linkinseconds.com/p/q3-summary"
  }
}

If the file is held by the safety scan, the text says it is being reviewed and structuredContent.review is true.

create_upload_url#

Start an upload for a file too big to send inline. Returns a one-time URL, valid for 10 minutes, that accepts exactly size_bytes bytes.

Arguments

filenamestringrequired
Name with extension.
size_bytesintegerrequired
Exact size in bytes.
content_typestring
MIME type. Optional: guessed from the extension.
structuredContent
{
  "path": "6f1c…/a1b2c3d4.mp4",
  "upload_url": "https://…",
  "method": "PUT",
  "headers": { "Content-Type": "video/mp4" }
}

The text result includes a ready-to-run command for the assistant:

Shell
curl -X PUT -H "Content-Type: video/mp4" --data-binary @demo.mp4 "UPLOAD_URL"

finish_upload#

Call after the PUT. Checks and scans the file, then returns the link, the same way as upload_file.

Arguments

pathstringrequired
The path from create_upload_url.
filenamestringrequired
The same file name.
content_typestring
The same content type used for the PUT.
titlestring
Link title.

Read-only. Lists the account's links, newest first.

Arguments

limitinteger
1 to 100, default 20.
Text result
- Q3 summary: https://linkinseconds.com/p/q3-summary (live)
- Brand guidelines: https://linkinseconds.com/p/brand-guidelines-a (live)

structuredContent.links has the same fields as GET /api/v1/links.

Read-only. How one link performed over a UTC window: views, unique visitors, time on the file, how far readers got (pages for a PDF, watch-through for video and audio, scroll depth for pages), countries, devices, traffic sources and the busiest hour. The text result is a short summary the assistant can read out; structuredContent is the full report, the same JSON as GET /api/v1/links/{slug}/analytics.

Arguments

slugstringrequired
The link's slug (the part after /p/) or its full URL, e.g. https://linkinseconds.com/p/q3-summary.
rangestring
7d, 14d, 30d, 90d or all. Default 30d. UTC days.
Call
{
  "name": "get_link_analytics",
  "arguments": { "slug": "https://linkinseconds.com/p/q3-summary", "range": "30d" }
}
Text result
Q3 summary (https://linkinseconds.com/p/q3-summary)
Last 30 days: 128 views (+41% vs the previous 30 days), 96 unique visitors.
Average time 1m 42s, median 1m 1s. 22% left within 5 seconds.
Readers reached 58% of the 12-page document on average; 23% read to the last page. Page 3 held attention longest (41s).
Top countries: India 54%, United States 21%.
62% on mobile, mostly Safari on iOS.
Traffic: Direct 70%, Referral 23%, QR scan 7%; top referrer linkedin.com.
Busiest: Tuesday 14:00 UTC.
12 downloads all-time; 19% had opened it before.
Period: 2026-09-05 to 2026-10-05 (UTC, end exclusive).

structuredContent has a link object (slug, title, url, kind) followed by every field of the report: range, totals, deltas, series, breakdowns, timing, content, insights and recent.

get_account_analytics#

Read-only. The whole account over a UTC window, with the top links named in the text and listed in structuredContent.top_links (up to 25). Same shape as GET /api/v1/analytics.

Arguments

rangestring
Same values as above. Default 30d.
Call
{ "name": "get_account_analytics", "arguments": { "range": "7d" } }
Text result
Across 42 links
Last 7 days: 412 views (+8% vs the previous 7 days), 301 unique visitors.
Average time 1m 4s, median 38s. 30% left within 5 seconds.
Top countries: India 48%, United States 26%, Germany 9%.
57% on mobile, mostly Chrome on Android.
Traffic: Direct 66%, Referral 24%, QR scan 10%; top referrer x.com.
Busiest: Wednesday 10:00 UTC.
58 downloads all-time; 14% had opened it before.
Top links: Q3 summary (128 views), Brand guidelines (77 views), Launch video (51 views).
Period: 2026-09-28 to 2026-10-05 (UTC, end exclusive).

On a Free account

Both analytics tools return a tool error that still states the views and unique visitors for the range (those are free), explains that the rest is a Pro feature and points to the pricing page. structuredContent then carries only range, views, uniques and pro_required: true.

What the tools can't do

They can't change link settings, delete links, or create albums and websites. That keeps a mistaken or tricked assistant from breaking links you have already shared. Do those in the dashboard.

Annotations: list_links, get_link_analytics and get_account_analytics are marked read-only and idempotent; the upload tools are marked as non-destructive writes that reach the open web, so careful clients ask you before running them.

Last updated 4 October 2026. Something unclear or missing? Tell us.