Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Storyblok

Scalekit connector
Open markdown

The Storyblok connector lets your AI agent act in each user's Storyblok account. Each user connects their own Storyblok API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 26 tools.

Tools
26
What they doRead · write · destructive
12 · 10 · 412 read10 write4 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Storyblok connection

    In AgentKit > Connections, create a Storyblok connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'storyblok'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Storyblok:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'storyblok_spaces_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Storyblok credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • storyblok_asset_getGet one asset's details.Read-only

    Get Asset

    Get one asset's details. Returns id, filename (URL), alt, title, copyright, focus, content_type, size and folder. Use storyblok_assets_list to find the ID.

    Inputs

    asset_idstringrequired
    Numeric ID of the asset. Get it from storyblok_assets_list. Example: 14417
    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
  • storyblok_assets_listList assets (images, videos, documents) in a space.Read-only

    List Assets

    List assets (images, videos, documents) in a space. Returns assets with id, filename (URL), short_filename, alt, title, content_type, content_length and tags. Use this to find an asset URL to place in story content.

    Inputs

    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
    by_altstring
    Filter by alt text. Example: Product shot
    by_titlestring
    Filter by title. Example: Summer hero
    in_folderinteger
    Only assets in this asset folder ID; -1 for deleted assets. Example: 1203
    is_privateboolean
    If true, only private assets. Example: false
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Items per page. Default 25, maximum 1000 (100 for tags). Example: 25
    searchstring
    Search by filename. Example: hero
    sort_bystring
    Sort, for example created_at:desc or short_filename:asc. Example: created_at:desc
    with_tagsstring
    Only assets with any of these tags (comma-separated). Example: featured
  • storyblok_component_getGet one component (block type) with its field schema.Read-only

    Get Component

    Get one component (block type) with its field schema. Returns component with id, name, display_name, schema, is_root, is_nestable and component_group_uuid. Use this to see the exact fields a block accepts.

    Inputs

    component_idstringrequired
    Numeric ID of the component. Get it from storyblok_components_list. Example: 4123
    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
  • storyblok_components_listList the components (block types) defined in a space.Read-only

    List Components

    List the components (block types) defined in a space. Returns components with id, name, display_name, schema (field definitions), is_root and is_nestable. Use this to learn which blocks and fields story content can use before writing content.

    Inputs

    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
    by_idsstring
    Only components with these IDs (comma-separated). Example: 4123,4124
    in_groupstring
    Only components in this component folder (UUID). Example: 8a2b1c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d
    is_rootboolean
    true for only content type blocks, false for only nestable blocks. Example: true
    searchstring
    Search components by name or display name. Example: teaser
    sort_bystring
    Sort by a property, for example name:asc or updated_at:desc. Example: name:asc
  • storyblok_datasource_entries_listList the entries of a datasource.Read-only

    List Datasource Entries

    List the entries of a datasource. Returns datasource_entries with id, name, value, dimension_value and position. Use this to read option lists or find an entry ID.

    Inputs

    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
    datasource_idinteger
    Numeric ID of the datasource. Use this or datasource_slug. Example: 91234
    datasource_slugstring
    Slug of the datasource. Use this or datasource_id. Example: product-categories
    dimensioninteger
    Dimension ID, to return each entry's dimension_value. Example: 3312
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Items per page. Default 25, maximum 1000 (100 for tags). Example: 25
    searchstring
    Search entry names. Example: shoes
  • storyblok_datasources_listList datasources (key-value lists such as options or translations) in a space.Read-only

    List Datasources

    List datasources (key-value lists such as options or translations) in a space. Returns datasources with id, name, slug and dimensions. Use this to find a datasource_id for its entries.

    Inputs

    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
    pageinteger
    Page number, starting at 1. Example: 1
    per_pageinteger
    Items per page. Default 25, maximum 1000 (100 for tags). Example: 25
  • storyblok_releases_listList the releases (scheduled bundles of changes) in a space.Read-only

    List Releases

    List the releases (scheduled bundles of changes) in a space. Returns releases with id, name, release_at and released. Use this to find a release_id for storyblok_story_create or storyblok_story_update.

    Inputs

    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293
  • storyblok_space_getGet one space's settings.Read-only

    Get Space

    Get one space's settings. Returns the space with id, name, domain, languages, default_root, stories_count, assets_count and plan details. Use this to check enabled languages and limits.

    Inputs

    space_idstringrequired
    Numeric ID of the Storyblok space. Find it with storyblok_spaces_list or in the space's Settings > Space. Example: 288868932106293