Grok WorldGrok Build CLI field station

回顧期號 / TOOLS

替 custom function 設定窄 schema

讓 model 只提出 call request,由已驗證 application code 驗證 argument、執行並回傳 typed result。

01 / DECIDE

架構決策

Model 需要 private data 或超越文字生成的 bounded action 時採用。

讓 model 只提出 call request,由已驗證 application code 驗證 argument、執行並回傳 typed result。 先把 input、output、state、tool 與 side effect 畫成一條可觀察路徑,再決定 替 custom function 設定窄 schema 的 owner。

02 / OPERATE

三步野戰程序

  1. 01

    鎖定合約

    寫下 caller、資料分類、成功條件、timeout、取消與 ownership。Model 需要 private data 或超越文字生成的 bounded action 時採用。

  2. 02

    執行有界路徑

    只建立一條 end-to-end path,保留 correlation、typed state 與 reversible failure。讓 model 只提出 call request,由已驗證 application code 驗證 argument、執行並回傳 typed result。

  3. 03

    驗證訊號

    把驗收變成可重跑的 fixture、contract test 或 browser test。Replay test 證明 duplicate call 安全且每個 error branch 都有型別。

03 / BOUND

Operation 邊界

Credential 不可放進 argument;高影響 write 需要 approval 與 idempotency。

04 / PROVE

驗收證據

Replay test 證明 duplicate call 安全且每個 error branch 都有型別。

SOURCE / HTTP

可重現來源探針

curl -fsSI 'https://docs.x.ai/developers/tools/function-calling' | sed -n '1,5p'