Skip to main content
Plugins

Custom Plugins

When Alibaba Cloud Bailian's official plugins cannot meet your business needs, you can extend large language model capabilities by creating custom plugins. This document guides you through the entire process—from creation and debugging to usage—enabling seamless integration of required APIs.

Workflow

  1. Create or Import a Plugin: Define basic plugin information, or import directly from Alibaba Cloud Marketplace.
  2. Add Tools (not required for imported plugins): Configure specific API endpoints, request parameters, and response data for the plugin.
  3. Debug and Publish: Test API connectivity online; publish only after confirming full functionality.
  4. Use in Applications: Associate the plugin with an agent and invoke it via chat testing or API integration.

Creating a Custom Plugin

Refer to the sections below: “Step 1: Create a Plugin” and “Step 2: Create a Tool.”

Step 1: Create a Plugin

1

Access the Plugin Page

Navigate to the Plugins page and click Create Plugin.
2

Fill in Plugin Information

  • Plugin Name: Enter a semantically meaningful name (supports Chinese and English).
    Example: Dormitory Rules Lookup Tool test
  • Plugin Description: A brief natural-language description of the plugin’s functionality and use cases. This helps the LLM determine whether to invoke the plugin for a given task.
    Example: Retrieves dormitory rules content based on an input numeric index.
  • Plugin URL: The endpoint URL for accessing the plugin. Different paths under the same domain are treated as separate APIs (i.e., tool paths).
    Example: https://domitorgreement-plugin-example-icohrkdjxy.cn-beijing.fcapp.run
If authentication is required, toggle on Authentication Required, then fill in the authentication configuration.Authentication Parameter Reference:
ParameterDescription
Header List (optional)When authentication is needed, custom headers may be used to pass authentication credentials.
Authentication Required (optional)Determines whether Alibaba Cloud Bailian applications must authenticate when calling your custom plugin. Whether authentication is required depends on your API provider’s security policy.
Authentication TypeSupports two modes: Service-level Authentication and User-level Authentication. Location supports Header or Query; Type supports basic, bearer, and appcode.
3

Confirm Creation

After completing the form, click Confirm Creation & Create Tool, or click Continue Adding Tools.

Step 2: Create a Tool

1

Fill in Tool Information and Configure Parameters

Tool Information:
ParameterDescription
Tool NameEnter a semantically meaningful name (supports Chinese and English).
Tool DescriptionA concise, accurate natural-language description of the tool’s function and use case—helps the LLM decide whether to invoke this tool.
Tool PathRelative path to the plugin URL; must begin with a forward slash (/).
HTTP MethodSelect GET or POST, depending on your API requirements.
Content-TypeChoose application/json or application/x-www-form-urlencoded.
Configure Input Parameters:Click Add Input Parameter, then configure each parameter:
  • Parameter Name: Use descriptive names to help the LLM understand what value should be extracted (e.g., city).
  • Parameter Description: Briefly and precisely describe the purpose and format of the parameter (e.g., date, described as “date in yyyy-MM-dd format”).
  • Type: Specifies the data type of the parameter.
  • Pass-through Mode:
    • LLM Extraction: Indicates that the LLM must extract this parameter’s value from user input.
    • Business Pass-through: Indicates that the value is passed directly from external systems without modification.
Sub-properties under an Object-type parameter cannot be left empty. Click the icon at the end of the object row to add sub-properties.
Configure Output Parameters:Click Add Parameter, then define all output parameters (all fields are mandatory). The LLM uses these definitions—combined with the user’s query—to filter and restructure the API response.Advanced Configuration (Optional):Provide LLM invocation examples to reduce missed or false invocations—especially useful when input parameters are complex or prone to misconstruction by the model.
2

Save Draft

After configuration, click Save Draft.
3

Online Debugging

Click Test Tool, enter authentication details (if enabled) and sample input values, then click Run.
If the test fails, adjust configurations based on error messages in the result, then retest until successful.
4

Publish the Tool

Once testing passes, click Publish. Only published tools can be invoked within applications.

Importing Plugins from Alibaba Cloud Marketplace

Alibaba Cloud Marketplace provides numerous ready-to-use APIs. You can activate required APIs there and import them into your Alibaba Cloud Bailian plugin list.
1

Navigate to Import Page

Go to the Plugins page and click Import from Marketplace. First-time imports require service-linked role authorization.
2

Activate Marketplace API

In the Import Marketplace Plugin dialog, click View Details to navigate to Alibaba Cloud Marketplace and activate the desired API. Wait until its status shows Activated.
3

Import Plugin

After activation, return to the Alibaba Cloud Bailian console, click Import from Marketplace, select the activated API, and click OK.
4

Test and Publish

Plugins imported from Marketplace start as drafts—you must test and publish before using them:
  1. Click Debug in the corresponding tool row to open the tool test page.
  2. Enter parameters and click Run.
  3. After successful execution, return to the tool editing page and click Publish.
When importing from Marketplace, the system auto-fills input/output parameters—but some fields may be missing. During publishing, review any error messages and resolve issues per guidance.

Using Plugins

Method 1: Publish the plugin as an MCP service, then add that MCP service to your Agent application.

Step 1: Publish Plugin as MCP Service
1. In the plugin list, hover over the target plugin card and click **Publish as MCP Service**.
2. After successful publishing, view detailed MCP service information on the MCP Management page.

Step 2: Add MCP Service to Agent Application
1. Navigate to the orchestration page of your Agent application and click `+` in the MCP block.
2. In the “Select MCP Service” panel, switch to the **Custom MCP** tab, locate the MCP service converted from your plugin, and click **Add**.
3. Test whether the plugin behaves as expected.
4. After verification, publish the application.

Method 2: From the Application Management page, go to your Agent application’s orchestration page, add the MCP service in the MCP block, test plugin behavior, and publish the application.

Managing Custom Plugins and Tools

Deleting a Plugin

Deleting a plugin removes all its tools permanently. Any applications referencing this plugin will become nonfunctional. This action cannot be undone—proceed with caution.
In the Plugin List, locate the target plugin and click ... > Delete.

Editing a Plugin

  1. In the Plugin List, locate the target plugin and click View Details.
  2. Click Edit Plugin in the top-right corner, update plugin information, and save.
Changes to plugin information take effect immediately. If you modify the plugin URL, headers, or authentication settings, tool invocations may break—retest and republish affected tools.

Editing a Tool

After modifying tool information, you must retest and republish for changes to take effect.
  1. In the Plugin List, locate the plugin containing the target tool and click View Details.
  2. Click Edit in the tool’s row, update tool information, and click Save Draft.
  3. Click Test Tool to debug online.
  4. After successful execution, click Publish.

Deleting a Tool

Deleting a tool breaks any applications invoking it. This action cannot be undone—proceed with caution.
  1. In the Plugin List, locate the plugin containing the target tool and click View Details.
  2. Click Delete in the tool’s row.

Error Codes

Common errors during tool publishing are listed below:
Error CodeError MessageDescription
130040Missing description for parameter xxCause: Description is missing for parameter xx. Solution: Add the parameter description and republish the tool.
130022Failed to save tool information / Please verify example parametersPossible Cause 1: An Object-type input or output parameter has empty sub-properties. Solution: Click the icon at the end of the object row to add required sub-properties. Possible Cause 2: HTTP method is set to GET, but an Object-type parameter is configured in inputs. Solution: GET requests do not support Object-type input parameters—use another type instead.