Developers
Get access

Session walkthrough

Step through a complete email build, one tool call at a time: why the host calls it, the arguments it sends, and what comes back.

There's no public sandbox yet, so instead of a live console, this replays the calls a host makes for one prompt. Use it to see how the tools fit together before you connect, or to check your own agent's behavior against it.

PromptNorthwind Coffee (invented)

Create a launch email for our Autumn blend in the Northwind Marketing library. Warm, short, one button to northwind.example/autumn. Run the accessibility check when you're done.

  1. stensul-check-auth

    Confirm there's a signed-in session before touching data. On instance-URL connections the host supplies the token, so this passes immediately.

    Arguments
    {}
    Response (captured)
    {
      "hasToken": true,
      "source": "http-bearer",
      "tenant": "<your-instance>",
      "nextStep": "Authenticated via HTTP bearer. You can call data tools now."
    }
  2. stensul-get-libraries

    Find the library named in the prompt and learn its rules: modules, enabled settings, length caps, variations mode.

    Arguments
    {
      "library_key": "northwind_marketing"
    }
    What comes back

    The library's module inventory, variations mode, subject_line_enabled: true, preheader_enabled: true with their caps, supported languages and tags. The assistant now knows it may set a subject line and preheader.

  3. stensul-list-emails

    Find an approved template that fits a product launch.

    Arguments
    {
      "types": [
        "template"
      ],
      "library_keys": [
        "northwind_marketing"
      ],
      "q": "launch"
    }
    What comes back

    A page of templates. The assistant picks "Product launch" and notes its id.

  4. stensul-read-email

    Read the template's structure and guardrails so content can be placed by position without breaking a rule.

    Arguments
    {
      "emailId": "64f0c0ffee0000000000abcd",
      "view": "plan"
    }
    What comes back

    Modules in order (header, opening section, two feature cards, footer), each element's type and position, guardrailProfiles (character caps, palette), which elements can be hidden, and a save_version. The footer text is locked.

  5. stensul-build-email

    Create the whole draft in one call: copy, button, image with alt text, subject line and preheader.

    Arguments
    {
      "name": "Northwind – Autumn blend launch",
      "template_id": "64f0c0ffee0000000000abcd",
      "library_key": "northwind_marketing",
      "subject_line": "The Autumn blend is here",
      "preheader": "Small-batch roast. Ships this week.",
      "content": [
        {
          "position": 2,
          "elements": [
            {
              "position": 1,
              "type": "image",
              "imageContent": {
                "source_url": "https://northwind.example/img/autumn.jpg",
                "alt": "A bag of Autumn blend coffee beside a steaming mug"
              }
            },
            {
              "position": 2,
              "type": "text",
              "text": "Meet the Autumn blend\nCaramel, toasted pecan and a clean finish."
            },
            {
              "position": 3,
              "type": "button",
              "text": "Shop the blend",
              "link": {
                "url": "https://northwind.example/autumn"
              }
            }
          ]
        }
      ]
    }
    What comes back

    A report: the new draft's edit link, what was applied, anything declined by a guardrail (with the reason), images still missing, the new save_version, and a rendered preview shown in the chat.

  6. stensul-run-quality-check

    The prompt asked for the accessibility check.

    Arguments
    {
      "emailId": "64f0c0ffee0000000000ef01"
    }
    What comes back

    errors: each with a message, a rule and a location such as "the 2nd image in the 3rd module". Empty when everything passes.

The result

The assistant replies with the edit link, a one-paragraph summary of what it built, anything it couldn't change (the locked footer), and the check results. The draft is waiting in Stensul for review; nothing was sent.

Try the same prompt yourself: prompt gallery · every tool: reference.

Esc