View Templates

Saved database view templates.

3 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

view_templates.list

GET

List the workspace's saved database-view templates. System templates are built-in (client-side) and not returned here.

  • AI tool: view_templates_list
  • API: GET /api/invoke/view_templates.list

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {}
}

view_templates.create

POST · mutating

Save a database view as a reusable workspace template. Captures the layout (viewType + config) and the custom fields it needs, so it can be applied to any project in one click.

  • AI tool: view_templates_create
  • API: POST /api/invoke/view_templates.create

Input

Field Type Required Description
name string yes
description string
icon union
viewType string yes
config object
fields object[]
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "icon": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "viewType": {
      "type": "string"
    },
    "config": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "srcId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "name",
          "type"
        ]
      }
    }
  },
  "required": [
    "name",
    "viewType"
  ]
}

view_templates.delete

DELETE · mutating

Delete a workspace view template.

  • AI tool: view_templates_delete
  • API: DELETE /api/invoke/view_templates.delete

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}