{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/proactions-ai-kit-configuration-for-templates/_shared/latest--partial-builtin-tools.schema.json",
  "title": "Built-in AI Tools Configuration",
  "description": "Configuration for enabling built-in AI tools in ProActions workflows",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-builtin-tools.schema.json",
    "sourceSha256": "ca4f11b59ca9610a111a65ade142b159c07c76b2ab80c74fa5eb7e71f03d002d"
  },
  "oneOf": [
    {
      "type": "string",
      "enum": [
        "ContainerInfoTools",
        "ContentTools",
        "CustomTools",
        "DocumentInfoTools",
        "FeedbackTools",
        "HighlightTools",
        "HubMcp",
        "ToolDiscovery",
        "UserInfoTools",
        "UserInteractionTools",
        "UtilityTools",
        "activateTools",
        "addFeedback",
        "addJsonFeedback",
        "addKeyValueFeedback",
        "addMetricsFeedback",
        "addPureTextTags",
        "addTableFeedback",
        "askConfirmation",
        "askFreeformQuestion",
        "askMultipleChoice",
        "askSingleChoice",
        "callMcpTool",
        "clearPureTextTags",
        "getChannel",
        "getContainerChannel",
        "getContainerId",
        "getContainerLoid",
        "getContainerMetadata",
        "getContainerMetadataString",
        "getContainerObjectType",
        "getContainerProductName",
        "getContainerSystemMetadata",
        "getContainerSystemMetadataString",
        "getContainerTextContent",
        "getContainerUsageTickets",
        "getContainerUsageTicketsString",
        "getContainerUuid",
        "getContainerVirtualAttributes",
        "getContainerVirtualAttributesString",
        "getContainerWorkflowStatus",
        "getContainerXmlContents",
        "getCurrentTimestamp",
        "getDocumentId",
        "getDocumentIssueDate",
        "getDocumentLoid",
        "getDocumentName",
        "getDocumentSummaryInfo",
        "getDocumentUuid",
        "getDocumentWorkfolder",
        "getMetadata",
        "getMetadataString",
        "getObjectType",
        "getParagraphText",
        "getParagraphXML",
        "getProductName",
        "getPureText",
        "getSelectedElement",
        "getSelectedElementXpath",
        "getSelectedText",
        "getSelectedXML",
        "getSystemMetadata",
        "getSystemMetadataString",
        "getTextAtXpath",
        "getTextContent",
        "getUsageTickets",
        "getUsageTicketsString",
        "getUserFullName",
        "getUserGroups",
        "getUserMetadata",
        "getUserMetadataString",
        "getUserName",
        "getUserSystemMetadata",
        "getUserSystemMetadataString",
        "getUserTeams",
        "getVirtualAttributes",
        "getVirtualAttributesString",
        "getWorkflowStatus",
        "getXmlAtXpath",
        "getXmlContent",
        "highlightTextSegments",
        "insertTextAtCursor",
        "insertTextAtXpath",
        "insertXmlAtCursor",
        "insertXmlAtXpath",
        "isReadonly",
        "isTextSelected",
        "listAvailableTools",
        "markdownToHtml",
        "replaceTextAtCursor",
        "replaceTextAtCursorParagraph",
        "replaceTextAtXpath",
        "replaceXmlAtCursor",
        "replaceXmlAtCursorParagraph",
        "replaceXmlAtXpath",
        "showNotification",
        "updateProgress",
        "validateAndRepairXml",
        "xmlToMarkdown"
      ],
      "description": "Enable all tools from a class by specifying the class name, or enable a single tool by its name"
    },
    {
      "type": "object",
      "required": [
        "class"
      ],
      "properties": {
        "class": {
          "type": "string",
          "enum": [
            "ContentTools",
            "ContainerInfoTools",
            "CustomTools",
            "DocumentInfoTools",
            "FeedbackTools",
            "HighlightTools",
            "HubMcp",
            "ToolDiscovery",
            "UserInfoTools",
            "UserInteractionTools",
            "UtilityTools"
          ],
          "description": "Tool class name"
        },
        "only": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Only enable these specific tools from the class (optional). Accepts raw tool names or provider namespaced names (<toolClass>__<tool>)."
        },
        "xpaths": {
          "type": "object",
          "description": "Named XPath mappings available as tool parameters (optional)",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "alias"
      ],
      "anyOf": [
        {
          "required": [
            "target"
          ]
        },
        {
          "required": [
            "extend"
          ]
        }
      ],
      "properties": {
        "alias": {
          "type": "string",
          "description": "Name of the new virtual tool (the alias namespace is added automatically)"
        },
        "target": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_.-]+$",
          "description": "Underlying tool to call when this alias is invoked (supports <tool>, <toolClass>__<tool>, <toolClass>.<tool>, mcp__<server>__<tool>, mcp.<server>.<tool>)"
        },
        "extend": {
          "type": "string",
          "description": "Optional alias template name to extend"
        },
        "description": {
          "type": "string",
          "description": "Optional description override for the AI (replaces the original tool description)"
        },
        "args": {
          "type": "object",
          "description": "Preset arguments to pass to the underlying tool (merged with AI-provided arguments)"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "aliasTemplate",
        "target"
      ],
      "properties": {
        "aliasTemplate": {
          "type": "string",
          "description": "Name of the alias template (used by aliases via extend)"
        },
        "target": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_.-]+$",
          "description": "Underlying tool to call when this template is used (supports <tool>, <toolClass>__<tool>, <toolClass>.<tool>, mcp__<server>__<tool>, mcp.<server>.<tool>)"
        },
        "description": {
          "type": "string",
          "description": "Optional description for aliases extending this template"
        },
        "args": {
          "type": "object",
          "description": "Preset arguments applied by aliases extending this template"
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "required": [
        "mcp"
      ],
      "properties": {
        "mcp": {
          "type": "string",
          "description": "MCP server name as registered in the Hub"
        },
        "only": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional list of MCP tool names to expose (accepts <tool>, mcp__<server>__<tool>, mcp.<server>.<tool>, or <server>.<tool>)"
        }
      },
      "additionalProperties": false
    }
  ]
}
