Skip to content

Use Controller Tools in Chat ​

Local Controller tools in Chat ​

Chat uses the same conversation and composer for direct replies, follow-ups, fresh business reads, and proposed changes. There is no separate Agent mode, flag, or role. Start with Use Private Chat for access and conversation behavior.

On each turn, Chat gives the configured model compact declarations for the registered Controller Tools visible to the signed-in user in the current SSR Site and active instance. Ordinary @Mcp.tool() Actions and those marked usage: 'agentFunction' are eligible; usage: 'mcp' is external-only. Site admission and the Action's native authorization still apply. Chat discovers and calls Actions in-process: no MCP connection, token or scopes are used. The model can request the exact input, output, or query contract with cabloy_tool_contract; contract visibility does not necessarily make a tool callable. For example, the image upload Action is contract-only in Chat. The server still validates the full contract before execution.

The model can receive current tool declarations, contracts and authorized projected read results. Select Actions and output.pick projections with the configured provider's data boundary in mind. Chat rechecks visibility before passing current tool results into a later model step.

For a user with current Chat access and SSR Site admission who owns the conversation in the active instance, Chat sends saved dialogue to the configured provider as plain user and assistant messages. This includes tool-assisted replies and saved Action receipts, not raw historical tool calls, results, or transient progress. Changes to resource permissions do not retroactively remove saved dialogue from this context. Fresh reads and writes must pass the current tool and native Action checks; an old request or confirmation never authorizes a new write. If current Site admission is lost, Chat sends neither tools nor saved conversation context for that Site.

The page shows tool names and projected progress, not raw tool events or provider payloads. Chat streams eligible first-step prose immediately, even when visible tools are available. If that step enters tool execution, the transient prose is reset before the first progress item; only the accepted answer is published after the existing disclosure and settlement checks. A direct first-step answer that passes those checks is not replayed as a second full delta. Tool-derived history and confirmed-write continuations remain review-gated and do not expose provisional prose. Reload restores saved messages and pending review, not transient progress. Same-key replay never calls the model or the tools again.

On a tool-enabled turn, the first model request lists the selected Chat Skills by name and description. The model can call cabloy_load_skill with an exact listed name to read its guidance on demand, even when all available Actions are read-only. A Skill does not make a tool visible or authorize a call. The bundled Skills cover queries, write proposals, image uploads, and Resource page handoffs.

Review and confirm writes ​

For a mutating Controller Tool, the model must obtain the tool's exact input and output contracts in an earlier step. Loading the mutation Skill is guidance, not a prerequisite. The write call creates a pending proposal without executing the Action. The user reviews the exact submitted values and confirms or rejects. Confirmation rechecks the current user, Site admission, exact Action binding, arguments and native authorization. Only the request that commits the claim may call the Action. Rejection and expiry do not execute the Action, and an unknown outcome is never automatically retried.

The Chat Scene (cabloy-ai:default) sets the review window with limits.confirmationWindowMs, which defaults to 20 * 60_000 (20 minutes). See Chat budgets for configuration. The window starts when Chat stages the proposal, using the Scene settings bound at the start of that send. A config change applies to new sends; pending cards keep their recorded expiry. This window is separate from the confirmed Action's 60-second dispatch deadline, the model step timeout, and the continuation deadline.

After a successful confirmation, Chat saves the Action receipt and starts one fresh Agent in the same conversation. The Agent receives eligible conversation history, followed by the original request and the confirmed Action call and result. Only that confirmation is sent as a structured call and result; its parent run is not duplicated in the prepended history. The continuation has its own durable deadline and step count, using the effective Chat Scene limits at confirmation. Ordinary write continuations can use authorized read tools and Skills, but cannot repeat the write or propose a new one. The only exception is an acknowledged image upload whose review pinned a separate create or image replacement, described below. A repeated decision returns the saved run state without dispatching again. If the follow-up fails or expires, the Action receipt remains saved; do not repeat the Action to recover a missing reply.

Open business records ​

Chat guides the model to include a clickable detail link by default when a successful read resolves a specific record the user wants to inspect or follow up on, or a small set of explicitly selected records. A confirmed creation with a returned record ID gets the same handoff. The user need not ask for a link. Broad lists (even a page with one row), field-only answers, reports, aggregates, internal reads, and ambiguous results do not trigger this default. An explicit no-link request takes precedence. Opening a list, blank form, or edit page requires explicit browser intent. Ordinary updates do not get a default link.

The model can request a view link from cabloy_resource_page_links using the exact Action that produced the record and its returned stable ID. This guidance is part of the helper's description when available; it does not force a tool call or require loading a separate navigation Skill. The helper accepts at most eight page requests and checks permission for each target page independently of the source Action. If a link is unavailable, the model should keep the successful business result without inventing a URL or repeating the Action. In AI Chat, each returned pagePath is a router-local /rest/resource/... path for the current Zova Chat Site; Chat navigation applies the active Site history base. MCP and other external clients continue to receive the absolute resource_link.uri, which includes the current SSR Site path and server-configured origin (SERVER_SERVE_PROTOCOL and SERVER_SERVE_HOST in production). Neither representation accepts an origin supplied by the model or request headers. Returned links are navigation only: they do not prove browser access, record existence, or write success.

Upload an image in Chat ​

Attach one local image in the composer and ask Chat to upload it, use it for one new business record, or replace the image on one existing record. For a replacement, identify the record and intended image field. This is a host-managed upload, not an image input to the model. Chat does not analyze the image or ingest an image URL. If the attachment or a required authorized capability is unavailable, Chat stops rather than substituting another tool or asking for Base64.

  1. Resolve the target and policy. Chat loads the bundled cabloy-mcp-image Skill and looks up the exact input and output contracts for a-image_image_getUploadPolicy and a-image_image_uploadBase64 with cabloy_tool_contract. The upload Action is visible for contract lookup only; the model cannot call it. For a create, Chat also loads the exact create contracts. For a replacement, it loads the exact authorized detail view and full update contracts for the same Resource. For either record write, the writable top-level image identity field's effective rest.form.options.imageScene selects the scene, not the field name or preview relation. For upload-only, the scene must also be unambiguous. Chat reads the scene policy after contract lookup. Before preparing a replacement, Chat also calls the exact detail view after loading the input and output of both the view and update. The target and its complete editable values must support a full update; a list or summary is not sufficient.
  2. Review and confirm the upload. In a later step, Chat calls the Chat-only cabloy_prepare_image with { imageScene }, { imageScene, create: { tool, field, args } }, or { imageScene, replace: { tool, view, field, id } }. Create args omit the stored image field. For replacement, tool and view are the exact update and view tool names, field is the stored image field, and id is the exact string or number record identity. The host preflights the replacement through the native view. The upload card shows the replacement target and field, and the browser offers crop/preview under the current scene policy. Confirming this card uploads only the reviewed bytes; it does not create a record or change its image. Bytes go from the browser to the host, not to the model, and only a-image stores the final image.
  3. Review and confirm the record write separately. The upload continuation receives only the safe upload result { result: { id } }. An upload-only continuation stays read-only. For create, it may stage only the pinned create with the acknowledged image ID inserted. For replacement, it loads both pinned view and update contracts again, calls the exact view for that record in a later model step, and only then proposes the exact update. It projects the complete detail onto the writable input, preserving unrelated values and nested identities, excluding readonly and undeclared data, and changing only the pinned image field. This is a full update, not an image-only patch. Chat compares the proposed update against the projection and shows the target and proposed values in the ordinary confirmation card. On confirmation, it rechecks current authority and the reviewed values; it does not silently submit a different body if they changed. Rechecking is not a lock or a version precondition.
  4. Distinguish acknowledgment from verification. After a replacement update is acknowledged, the host reads the same record through the pinned view and compares its identity and stored image field. The Chat receipt adds imageReplacement: { verified: boolean } to the native result. For example, Student's { result: null } acknowledges completion but proves no linkage on its own. If the read-back is unavailable or disagrees, Chat reports the acknowledged update without claiming that the image link was verified. The completed update's continuation remains read-only.

Upload and the record write are separate. Rejecting or failing the second review does not undo the upload. Chat keeps the acknowledged upload receipt and does not automatically replay, re-upload, compensate, or delete the old image. External MCP clients use the JSON image upload workflow, not the Chat preparation helper.

Released under the MIT License.