module_add_param
Insert a module parameter declaration and update the params array in an OpenSIPS module C source. Supports str and int types with a default value.
Instructions
Add a module parameter to an existing OpenSIPS module C source.
Inserts the parameter variable declaration and updates the params array.
Parameters
module_source:
The existing C source code of the module.
param_name:
Name of the parameter (e.g. db_url).
param_type:
Parameter type: str or int.
default_value:
Default value for the parameter.
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": {
"module_source": "<module_source>",
"param_name": "<param_name>"
},
"name": "module_add_param"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_source | Yes | ||
| param_name | Yes | ||
| param_type | No | str | |
| default_value | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||