create_function
Creates a new Cognigy.AI function for custom code modules used in integrations, scheduled jobs, or computations. Set dryRun=false to create; default validates only.
Instructions
Creates a new Cognigy.AI Function. Functions are custom code modules for integrations, scheduled jobs, or computations. MUTATING: Set dryRun=false to create.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"name": "<name>"
},
"name": "create_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The function code (JavaScript/TypeScript). Runtime input arrives via trigger_function's parameters. | |
| name | Yes | Name for the function | |
| dryRun | No | If true (default), validates without creating. Set to false to actually create. | |
| projectId | Yes | The project ID to create the function in |