cms_function
Read, edit, version, and run CMS files and HTTP backend functions using action-based operations; use help to view full documentation and argument schema.
Instructions
CMS files and HTTP functions (backend code): read, edit, version, run. Pick the operation with action and pass that action's arguments (help:true returns its full documentation and schema).
get_http_function: Get the main HTTP function file.
get_http_function_snippet: Read specific function(s) by name.
edit_http_function: Edit the HTTP function file by function name — best for targeted changes (fix a bug, rename, add one function).
update_http_function: Write the FULL HTTP function file content.
create_cms_file: Create a new CMS file.
update_cms_file: Update the code content of an existing CMS file
save_file_version: Save a version snapshot of a CMS file for rollback
restore_file_version: Roll a CMS file back to a saved version in one step: reads the version's content and writes it back to the file.
run_function: Run a deployed HTTP function.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cms_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | CMS file ID [update_cms_file] | |
| code | No | New function code (for replace_function and add) or new import block (for update_imports) [edit_http_function] | |
| help | No | Return the action's full documentation and argument schema instead of running it | |
| name | No | File name [create_cms_file, update_cms_file] | |
| type | No | File type [create_cms_file] | |
| action | No | Edit action [edit_http_function] | |
| method | No | HTTP method [run_function] | |
| params | No | Parameters [run_function] | |
| content | No | Full JS code content [update_http_function, create_cms_file, update_cms_file, save_file_version] | |
| overview | No | true=function list only, false=full code (default) [get_http_function] | |
| is_public | No | Mark as public version [save_file_version] | |
| version_id | No | Which version to restore (api_find 'file versions' → api_get). [restore_file_version] | |
| cms_file_id | No | CMS file ID [save_file_version, restore_file_version] | |
| function_name | No | Target function name (for replace_function and remove) [edit_http_function, run_function] | |
| include_guide | No | Include coding guide (only needed once) [get_http_function] | |
| function_names | No | Function names (e.g. [get_http_function_snippet] |