Extend LLM capabilities with custom plugins when official plugins don't meet your needs. This guide covers creation, testing, and usage for integrating third-party APIs.
Workflow
-
Create a plugin: Define the basic information for the plugin.
-
Add a tool: Configure the specific API path, request parameters, and response data for the plugin.
-
Test and publish: Test the API connectivity online and publish the tool after you confirm that it functions as expected.
-
Use in an application: Associate the plugin with an agent and call it through conversational tests or API integration.
Create a custom plugin
Create a custom-developed plugin
Step 1: Create a plugin
-
Go to the Plugins page and click Create Plugin.

-
Enter the plugin information.

Plug-in Name: Enter a semantic name. Chinese and English are supported.
Example: Dormitory Convention Query Tool Test
Plug-in Description: A brief description of the plugin's features and use cases. This helps the LLM determine whether to call the plugin for the current task. Use natural language for the description.
Example: Queries the content of a specific dormitory convention entry based on the input numeric index.
Plug-in URL: The endpoint of the plugin.
Example:https://domitorgreement-plugin-example-icohrkdjxy.cn-beijing.fcapp.run
-
Under the same domain name, different paths represent separate APIs. Each path corresponds to the Tool Path when you create a tool below.
-
Different tools under the same plugin share the same domain name. Each tool’s path corresponds to an independent API.
For example, a plugin named xx contains two APIs:
Query: https://xxx.com/query
Delete: https://xxx.com/delete
In this example,
https://xxx.comcorresponds to the Plug-in URL, and/queryand/deletecorrespond to the Tool Path when you create a tool below. This indicates that the plugin contains two tools.
If authentication is required, turn on the Enable Authentication switch and enter the authentication settings.
-
-
After you finish, click or click Continue to Add Tool.
Step 2: Create a tool
-
Enter the tool information, configure input and output parameters, and set advanced configurations.

-
Click Save Draft after configuring.
-
Test the tool's API connectivity online.

Click Test Tool, enter the authentication information (if authentication is enabled) and the input parameter values, then click Start Running.
If the run fails, adjust the configuration based on the error message in the Run Result and test again until it runs successfully.
Enter input parameter values manually or in code. For complex input parameters, use Code Editing to submit complete input parameters and values in JSON format.
-
After the test passes, click Publish. Only tools that are Published can be called in an application.
Use a plugin
Console
-
Method 1: In the Tools, add a published tool to an application.
A tool can only be associated with an Agent Application in the same workspace.
-
In the tool's row, click Add to Application and select the target application.
-
Verify the tool has been added in the application.
Add up to 10 tools. The application selects which tool to call.
-
Test whether the plugin works as expected.
-
No authentication: You can chat with the LLM in the input box to test the plugin.
-
User-level or service-level authentication: Before starting the conversation, click
to configure the authentication token to be passed. If you do not leave the current page, you only need to configure it once. -
If a tool's input parameter has its Passing Method set to Business Pass-through, you must click
to configure the variable value to be passed before starting the conversation. If you do not leave the current page, you only need to enter it once.
-
-
After testing, Publish the application.
-
-
Method 2: In the Plugins, add tools from a plugin to an agent.
-
Find the target plugin and click Add to Agent.
A tool can only be associated with an Agent Application in the same workspace.
By default, only published tools are added. You can select up to 10 published tools to add to an agent application.
-
Refer to the steps in Method 1 to test the plugin on the application's product page and then Publish the application.
-
-
Method 3: Add plugin tools in the Alibaba Cloud Model Studio, test the plugin functionality, and Publish the application.
API
Get the tool ID
Pass the tool ID when calling via API to identify the tool correctly.
-
In the Plugins, find the plugin that the tool belongs to and click View Details.
-
Hover your mouse over the
icon next to the tool name. -
Click the
icon to copy the tool ID.
-
When you call an application via an API, if the associated plugin has business pass-through parameters or has User-level Authentication enabled, you must use the
biz_paramsparameter to pass authentication or pass-through parameter information. For more information, see Application Calling - DashScope API.
Manage custom plugins and tools
Error codes
The following table lists common error messages that may occur when you publish a tool:
|
Error code |
Error message |
Description |
|
130040 |
Parameter description is missing for xx |
The parameter description for xx is missing. Add it and republish the tool. |
|
130022 |
Failed to save tool information. Check whether the example parameters are correct. |
A sub-property of an Object type parameter in the input or output parameters is empty. Click the Or, the request method is GET, but an input parameter is configured as the Object type. The GET request method does not support Object type input parameters—select a different type. |
icon at the end of the object's row to add a sub-property.