MCP (Model Context Protocol) code actions allow you to define custom functions that agents can execute in a structured way that AI models can understand.




When you click "Save," the action will be published automatically.
Every MCP action must meet the following conditions:
Element | Description |
A single default exported function | There must be a single export default function. |
Defined parameters | Each parameter must have a name, data type, and description. |
JSDoc documentation | The function and its parameters must be documented using the standard JSDoc format. |
Basic example
/**
* this function multiply by 2
*
* @param myNumber the number to multiply by 2
*
* @return the double
*/
export default function double(myNumber: number): number {
return myNumber * 2;
}
Element | Description |
| Indicates the JSDoc documentation block. |
| General description of the function. Explains what it does. |
| Parameter: name (myNumber), type (number), and description. |
| Return value: explains what the function returns. |
| Defines the single exported function that the MCP code will run. |
MCP-type code actions are available in beta mode. Their functionality may change in future versions.
Remember to visit our Help Center for further information.
Botmaker Team