{
"$defs": {
"Parameter": {
"description": "Parameter class for parameterized Plugins. This structure is
intended to match that which is used in the OpenAPI
function calling specification.
It is used to define the parameters that a plugin can accept,
and also for creating the function calling prompt api.",
"properties": {
"name": {
"description": "The name of the parameter.",
"title": "Name",
"type": "string"
},
"type": {
"$ref": "#/$defs/ParameterType",
"description": "The data type of the parameter (e.g., string, integer)."
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A description of the parameter.",
"title": "Description"
},
"required": {
"default": false,
"description": "Whether the parameter is required.",
"title": "Required",
"type": "boolean"
},
"enum": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of allowed values for the parameter. Example: [Celsius, Fahrenheit]",
"title": "Enum"
},
"default": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The default value of the parameter, if any.",
"title": "Default"
}
},
"required": [
"name",
"type"
],
"title": "Parameter",
"type": "object"
},
"ParameterType": {
"description": "Enum for parameter types.",
"enum": [
"string",
"integer",
"float",
"boolean"
],
"title": "ParameterType",
"type": "string"
},
"SAMPluginCommonMetadata": {
"description": "Smarter API Plugin Manifest - common Metadata class.",
"properties": {
"name": {
"description": "The camelCase name of the manifest resource",
"title": "Name",
"type": "string"
},
"description": {
"description": "The description for this resource. Be brief. Keep it under 255 characters.",
"title": "Description",
"type": "string"
},
"version": {
"description": "The semantic version of the manifest. Example: 0.1.0",
"title": "Version",
"type": "string"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The tags of the manifest. These are fully functional but are not currently used. Example: [tag1, tag2]",
"title": "Tags"
},
"annotations": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The manifest annotations. These are fully functional but are not currently used.",
"title": "Annotations"
},
"pluginClass": {
"description": "The class of the plugin. one of: [static, api, sql]",
"title": "Pluginclass",
"type": "string"
}
},
"required": [
"name",
"description",
"version",
"pluginClass"
],
"title": "SAMPluginCommonMetadata",
"type": "object"
},
"SAMPluginCommonStatus": {
"description": "Smarter API Plugin Manifest - Status class.",
"properties": {
"account_number": {
"default": null,
"description": "Plugin.status.account_number: The account owner of this Plugin. Read only.",
"title": "Account Number",
"type": "string"
},
"username": {
"default": null,
"description": "Plugin.status.account_number: The Smarter user who created this Plugin. Read only.",
"title": "Username",
"type": "string"
},
"created": {
"default": null,
"description": "Plugin.status.created: The date in which this Plugin was created. Read only.",
"format": "date-time",
"title": "Created",
"type": "string"
},
"modified": {
"default": null,
"description": "Plugin.status.modified: The date in which this Plugin was most recently changed. Read only.",
"format": "date-time",
"title": "Modified",
"type": "string"
}
},
"title": "SAMPluginCommonStatus",
"type": "object"
},
"SAMSqlPluginSpec": {
"description": "Smarter API SqlData Connection Manifest SqlConnection.spec",
"properties": {
"connection": {
"description": "SqlPlugin.spec.selector[obj]: the name of an existing SqlConnector to use for the SqlPlugin",
"title": "Connection",
"type": "string"
},
"sqlData": {
"$ref": "#/$defs/SqlData",
"description": "SqlPlugin.spec.selector[obj]: the SqlData to use for the SqlPlugin"
}
},
"required": [
"connection",
"sqlData"
],
"title": "SAMSqlPluginSpec",
"type": "object"
},
"SqlData": {
"description": "Smarter API - generic API Connection class.",
"properties": {
"sqlQuery": {
"description": "The SQL query that this plugin will execute when invoked by the user prompt.",
"title": "Sqlquery",
"type": "string"
},
"parameters": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Parameter"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A JSON dict containing parameter names and data types. Example: {unit: {type: string, enum: [Celsius, Fahrenheit], description: The temperature unit to use.}}",
"title": "Parameters"
},
"testValues": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TestValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A JSON dict containing test values for each parameter. Example: {product_id: 1234}.",
"title": "Testvalues"
},
"limit": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": 100,
"description": "The maximum number of rows to return from the query. Must be a non-negative integer.",
"title": "Limit"
}
},
"required": [
"sqlQuery"
],
"title": "SqlData",
"type": "object"
},
"TestValue": {
"description": "TestValue class for SqlPlugin and ApiPlugin test values.",
"properties": {
"name": {
"description": "The name of the parameter being tested.",
"title": "Name",
"type": "string"
},
"value": {
"description": "The test value for the parameter.",
"title": "Value"
}
},
"required": [
"name",
"value"
],
"title": "TestValue",
"type": "object"
}
},
"description": "Smarter API Manifest - Sql Connection Model",
"properties": {
"apiVersion": {
"description": "apiVersion[String]: Required. The API version of the AbstractSAMBase.",
"title": "Apiversion",
"type": "string"
},
"kind": {
"description": "kind[String]: Required. The kind of resource described by the manifest.",
"title": "Kind",
"type": "string"
},
"metadata": {
"$ref": "#/$defs/SAMPluginCommonMetadata",
"description": "Plugin.metadata[obj]: Required, the Plugin metadata."
},
"spec": {
"$ref": "#/$defs/SAMSqlPluginSpec",
"description": "SqlPlugin.spec[obj]: Required, the SqlPlugin specification."
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/SAMPluginCommonStatus"
},
{
"type": "null"
}
],
"default": null,
"description": "Plugin.status[obj]: Optional, Read-only. Stateful status information about the Plugin."
}
},
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
],
"title": "SAMSqlPlugin",
"type": "object"
}