Websites

Websites with Liquid pages by route, layouts, snippets, data and assets.

A website is a resource with kind website. It is served under tensorsites.net and, on paid plans, at custom domains. Pages, layouts and snippets use Liquid. Pages are named by route (/, /blog/:slug). Data templates use JSON. See website_save_template.

Changes go live only when you call website_publish. It publishes all templates, or none if any template fails to parse or render.

Assets are files. Manage them as in a document repository, using the website as space_id. See Upload a file and file_list. Each asset is served at its folder path and name, and at /_assets/<sha256>/<name> (asset_url).

To serve a website on a domain in a domains resource, use domain_connect_website.

The examples use the callTool helper. To connect, see the Quickstart or Authentication.

Websites

Permissions

A limited agent can make only the changes its permissions allow. Read-only access allows no changes. See Access and permissions.

WebsiteAllows
templatesCreate, change and delete templates.
publishPublish the site.
uploadUpload assets.
foldersCreate and delete asset folders.
delete_ownDelete or move assets the agent uploaded.
delete_anyDelete or move any asset.

Websites

Limits

These limits apply alongside the general limits.

WhatLimit
Templates200,000 characters each
Template names200 characters
AssetsThe organization's maximum file size each (5 GiB unless its owner chose otherwise), with names up to 255 characters

Tools · Websites

website_get

Returns a website’s URLs, live release, unpublished changes, recent releases, templates and assets. To upload assets, call file_begin_upload with the website’s id.

Parameters

project_id string Required
The project id.
space_id string Required
The website id, from list_spaces.

Returns

The website’s name, url, verified domains, live release, published_at (null if unpublished), unpublished_changes, recent releases, templates and assets. Releases are newest first, with the live release marked live. Templates omit bodies and include id, kind (page, layout, snippet or data) and name (a page’s route). Each asset is served at its path.

tools/call · website_get
curl https://tensorworks.net/mcp \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "website_get",
      "arguments": {
        "project_id": "b6909c9cf00c1d482686b5f52eadd58e",
        "space_id": "7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5"
      }
    }
  }'
Result
{
  "name": "Launch site",
  "url": "https://7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5.tensorsites.net",
  "domains": [
    "https://www.example.com"
  ],
  "release": "8d0f6b2e4c1a7395e8f0d2b4a6c8e1f3579b2d4f6a8c0e1b3d5f7a9c2e4b6d8f",
  "published_at": "2026-09-30T23:46:04.520Z",
  "unpublished_changes": true,
  "releases": [
    {
      "release": "8d0f6b2e4c1a7395e8f0d2b4a6c8e1f3579b2d4f6a8c0e1b3d5f7a9c2e4b6d8f",
      "published_at": "2026-09-30T23:46:04.520Z",
      "live": true
    }
  ],
  "templates": [
    {
      "id": "c353e591edfc32a9c547face5787e619",
      "kind": "layout",
      "name": "default",
      "updated_at": "2026-09-30T23:46:04.500Z"
    },
    {
      "id": "34543519def5cdf5c1663bcae19fd3d3",
      "kind": "page",
      "name": "/",
      "updated_at": "2026-09-30T23:46:04.510Z"
    },
    {
      "id": "ed03eac040234778c504377a68dd318e",
      "kind": "page",
      "name": "/blog/:slug",
      "updated_at": "2026-09-30T23:46:04.530Z"
    }
  ],
  "assets": [
    {
      "path": "/images/logo.png",
      "id": "496e4da976654fe6cd27f46f1bb93bc4ec5ca3ebf9907cfe38cd8711a9489d2e",
      "size": 2048
    }
  ]
}

Tools · Websites

website_get_template

Returns a template and its body. Pages, layouts and snippets use Liquid. Data templates use JSON.

Parameters

project_id string Required
The project id.
space_id string Required
The website id, from list_spaces.
template_id string Required
The template id, from website_get.

Returns

The template’s id, kind, name, body, created_at and updated_at.

tools/call · website_get_template
curl https://tensorworks.net/mcp \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "website_get_template",
      "arguments": {
        "project_id": "b6909c9cf00c1d482686b5f52eadd58e",
        "space_id": "7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5",
        "template_id": "ed03eac040234778c504377a68dd318e"
      }
    }
  }'
Result
{
  "id": "ed03eac040234778c504377a68dd318e",
  "kind": "page",
  "name": "/blog/:slug",
  "body": "{% assign post = site.data.posts | where: \"slug\", route.params.slug | first %}{% unless post %}{% not_found %}{% endunless %}…",
  "created_at": "2026-09-30T23:46:04.500Z",
  "updated_at": "2026-09-30T23:46:04.530Z"
}

Tools · Websites

website_save_template

Creates a template, or updates the template with the given template_id. Omitted fields are unchanged. Pages are named by route, such as /, /about, /blog/:slug (read as route.params.slug) or a route ending in *rest. The /404 page handles unmatched requests. The route’s last segment sets the content type (/feed.xml, /robots.txt). Templates can read site (name, url, data.<name>, pages), request and route. Pages can use {% layout 'default' %} with blocks, {% render 'header' %}, {% redirect '/new' %} and {% not_found %}. Changes go live when you call website_publish.

Parameters

project_id string Required
The project id.
space_id string Required
The website id, from list_spaces.
template_id string
The id of the template to update. Omit to create a new template.
kind enum
Required for new templates. One of page, layout, snippet or data. Can’t be changed later.
name string
Required for new templates. For pages, a route. For other kinds, lowercase letters, digits, - and _, with / for folders. Renaming a template assigns it a new id.
body string
Required for new templates. Up to 200,000 characters. Data templates must be JSON.

Returns

The template, as returned by website_get_template, under its new id if renamed.

tools/call · website_save_template
curl https://tensorworks.net/mcp \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "website_save_template",
      "arguments": {
        "project_id": "b6909c9cf00c1d482686b5f52eadd58e",
        "space_id": "7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5",
        "kind": "page",
        "name": "/",
        "body": "{% layout 'default', title: 'Home' %}{% block content %}<h1>{{ site.name }}</h1>{% endblock %}"
      }
    }
  }'
Result
{
  "id": "34543519def5cdf5c1663bcae19fd3d3",
  "kind": "page",
  "name": "/",
  "body": "{% layout 'default', title: 'Home' %}{% block content %}<h1>{{ site.name }}</h1>{% endblock %}",
  "created_at": "2026-09-30T23:46:04.510Z",
  "updated_at": "2026-09-30T23:46:04.510Z"
}

Tools · Websites

website_delete_template

Deletes a template. The published site keeps using it until the next publish.

Parameters

project_id string Required
The project id.
space_id string Required
The website id, from list_spaces.
template_id string Required
The template id.

Returns

The deleted template’s id.

tools/call · website_delete_template
curl https://tensorworks.net/mcp \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "website_delete_template",
      "arguments": {
        "project_id": "b6909c9cf00c1d482686b5f52eadd58e",
        "space_id": "7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5",
        "template_id": "ed03eac040234778c504377a68dd318e"
      }
    }
  }'
Result
{
  "deleted": "ed03eac040234778c504377a68dd318e"
}

Tools · Websites

website_publish

Publishes the website’s current state. If any template fails to parse, or any fixed-route page fails to render, nothing is published and the error names the template and line.

Parameters

project_id string Required
The project id.
space_id string Required
The website id, from list_spaces.

Returns

The published release, unchanged (true if nothing changed since the last publish), and the url and domains where the site is served.

tools/call · website_publish
curl https://tensorworks.net/mcp \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "website_publish",
      "arguments": {
        "project_id": "b6909c9cf00c1d482686b5f52eadd58e",
        "space_id": "7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5"
      }
    }
  }'
Result
{
  "release": "8d0f6b2e4c1a7395e8f0d2b4a6c8e1f3579b2d4f6a8c0e1b3d5f7a9c2e4b6d8f",
  "unchanged": false,
  "url": "https://7f3e9a1c5b2d48e6a0c4f8b2d6e1a3c5.tensorsites.net",
  "domains": [
    "https://www.example.com"
  ]
}

Questions or something missing? Contact us.