Update function
function_updateUpdate a TypeScript edge function (Deno runtime). When code is provided it is typechecked before it is saved; read /.kliv/edge/kliv-edge-api.md for the kliv-edge SDK surface. Expose a chatbot tool with tool: {description, parameters}; select its tool_name in chatbot_connection_set tools.
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": {
"name": "<name>",
"explanation": "<explanation>",
"account": "<account>"
},
"name": "function_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Optional. TypeScript edge function code (Deno), typechecked before save. Starter: import { defineEdgeFunction, json } from "kliv-edge"; export default defineEdgeFunction(async ({ request }) => json({ path: new URL(request.url).pathname })); A raw (request) => Response default export also works. Use the single EdgeContext argument for platform capabilities, not request headers. Secrets: secrets.get(name) / secrets.require(name). kliv-edge is the only supported bare import; npm:, jsr:, and URL imports are allowed. Read /.kliv/edge/kliv-edge-api.md; kliv-edge-api.d.ts and examples/ are beside it. Read-only reference; save code through this tool. | |
| name | Yes | Function name | |
| path | No | URL path (optional) | |
| role | No | head supplies crawler link-preview metadata; requires access_policy public. null unmarks the hook. Omit to retain the role. | |
| tool | No | Omit to preserve; null on update removes the binding. | |
| account | Yes | Account (app) UUID; call account_list to find it | |
| description | No | Function description (optional) | |
| explanation | Yes | Why you are making this call, in one sentence for the user. | |
| access_field | No | Field to check for group_match (use 'groups') or metadata_match (a server-managed user metadata key, e.g. 'department'; user-editable metadata is never matched) | |
| access_policy | No | Access policy: public, authenticated, group_match, metadata_match, or entitlement_match (optional) | |
| access_match_type | No | Match type: equals or contains (the caller holds this value), intersects (the caller holds any value in this JSON array) | |
| access_match_value | No | Value to match. For group_match, an app-role key like 'editors', or a group uuid. 'manage-team' admits every team's founders and managers, so it is not an app-admin check. For intersects, a JSON array of them | |
| access_match_features | No | JSON array of feature lookup_keys for entitlement_match (e.g. '["subscribers","pro-tier"]'). The function is callable iff the visitor holds an active entitlement to any listed feature. |