Crevio
An AI agent that runs your online business: products, orders, customers, email, and sites.
我該用這個嗎
品質與安全性
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"crevio": {
"url": "https://mcp.crevio.co/mcp"
}
}
}遠端端點
https://mcp.crevio.co/mcpstreamable-http它能做什麼
工具清單
工具(14)
🟢whoami
Identify the account, user, and credential behind this connection, with plan, credit balance, rate limits, and the tools available. Call it first to verify the setup.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "whoami"
},
"account": {
"type": "object",
"description": "The account every tool call is scoped to.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name"
]
},
"user": {
"type": [
"object",
"null"
],
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"email"
]
},
"credential": {
"type": "object",
"description": "How this connection authenticated.",
"properties": {
"type": {
"type": "string",
"enum": [
"api_key",
"oauth"
]
},
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
},
"required": [
"type"
]
},
"plan": {
"type": "string"
},
"credits": {
"type": "number"
},
"rate_limit": {
"type": "object",
"description": "The API rate limit this credential is subject to.",
"properties": {
"limit": {
"type": "integer"
},
"window_seconds": {
"type": "integer"
}
},
"required": [
"limit",
"window_seconds"
]
},
"limits": {
"type": "object",
"description": "Bounds the delegation tools enforce.",
"properties": {
"ask_timeout_default_seconds": {
"type": "integer"
},
"ask_timeout_max_seconds": {
"type": "integer"
},
"message_max_chars": {
"type": "integer"
}
},
"required": [
"ask_timeout_default_seconds",
"ask_timeout_max_seconds",
"message_max_chars"
]
},
"tools": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"object",
"account",
"credential",
"plan",
"credits",
"tools"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "The account, user, and credential behind this connection, with the limits that apply to it."
}⚪ask_crevio(message, timeout_seconds, approval_mode, idempotency_key)
Delegate a job to the Crevio agent and wait for the result. Starts a run that works your account through the Crevio API (products, customers, orders, email, socials, sites, research), waits up to timeout_seconds, and returns the run with the agent's final reply in `result`. For anything longer, use start_task and wait_for_run.
輸入結構描述
{
"type": "object",
"properties": {
"message": {
"type": "string",
"maxLength": 10000,
"description": "What you want done, in natural language."
},
"timeout_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 90,
"description": "How long to wait for the run to settle before returning (default 60, max 90). On wait_timed_out, call wait_for_run with the run id."
},
"approval_mode": {
"type": "string",
"enum": [
"autonomous",
"supervised",
"read_only"
],
"description": "autonomous (default) acts without review; supervised pauses in needs_input for your approval before each gated write (pending_approval_ids) and otherwise finishes with its proposal; read_only forbids writes."
},
"idempotency_key": {
"type": "string",
"maxLength": 255,
"description": "Retrying with the same key returns the run the first call started instead of starting another."
}
},
"required": [
"message"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🟡start_chat(message, approval_mode, idempotency_key)
Open a chat with the Crevio agent and queue a run, without waiting. Returns the run immediately — its `chat_id` is the conversation to continue with send_message. Follow the run with wait_for_run or get_run.
輸入結構描述
{
"type": "object",
"properties": {
"message": {
"type": "string",
"maxLength": 10000,
"description": "What you want done, in natural language."
},
"approval_mode": {
"type": "string",
"enum": [
"autonomous",
"supervised",
"read_only"
],
"description": "autonomous (default) acts without review; supervised pauses in needs_input for your approval before each gated write (pending_approval_ids) and otherwise finishes with its proposal; read_only forbids writes."
},
"idempotency_key": {
"type": "string",
"maxLength": 255,
"description": "Retrying with the same key returns the run the first call started instead of starting another."
}
},
"required": [
"message"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🟢list_chats(search, limit, starting_after, ending_before)
List the account's chats, newest first.
輸入結構描述
{
"type": "object",
"properties": {
"search": {
"type": "string",
"description": "Only chats whose title matches."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Default 20."
},
"starting_after": {
"type": "string",
"description": "Return the page after this id — the last id from the previous page."
},
"ending_before": {
"type": "string",
"description": "Return the page before this id — the first id from the previous page."
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"data": {
"type": "array",
"items": {
"type": "object",
"description": "A chat — one conversation with the agent, across however many runs it took.",
"properties": {
"object": {
"type": "string",
"const": "chat"
},
"id": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"context_type": {
"type": [
"string",
"null"
],
"enum": [
"general",
"ai_builder",
"customer_support",
"onboarding",
null
]
},
"latest_run_id": {
"type": [
"string",
"null"
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"object",
"id",
"created_at"
]
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"object",
"data",
"has_more"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A page of chats, newest first."
}🟢get_chat(chat_id)
Get a chat's title, kind, and latest run.
輸入結構描述
{
"type": "object",
"properties": {
"chat_id": {
"type": "string",
"description": "A chat id (aichat_...). A run id works too — it resolves to that run's chat."
}
},
"required": [
"chat_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "chat"
},
"id": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"context_type": {
"type": [
"string",
"null"
],
"enum": [
"general",
"ai_builder",
"customer_support",
"onboarding",
null
]
},
"latest_run_id": {
"type": [
"string",
"null"
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"object",
"id",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A chat — one conversation with the agent, across however many runs it took."
}🟡send_message(chat_id, message, timeout_seconds)
Continue a chat with follow-up instructions or answers — the agent keeps its context. Resumes a run waiting in needs_input, or queues a new run when the last one finished. Returns run_busy while a run is still in progress. Optionally waits for the reply.
輸入結構描述
{
"type": "object",
"properties": {
"chat_id": {
"type": "string",
"description": "A chat id (aichat_...). A run id works too — it resolves to that run's chat."
},
"message": {
"type": "string",
"maxLength": 10000,
"description": "The follow-up to send into the conversation."
},
"timeout_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 90,
"description": "Seconds to wait for the reply before returning (default 0: return the new run immediately)."
}
},
"required": [
"chat_id",
"message"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🟢list_messages(chat_id, limit, ending_before)
Read a chat's messages, oldest first. Returns the most recent `limit` messages; page back through older ones with starting_after.
輸入結構描述
{
"type": "object",
"properties": {
"chat_id": {
"type": "string",
"description": "A chat id (aichat_...). A run id works too — it resolves to that run's chat."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200,
"description": "Default 50."
},
"ending_before": {
"type": "string",
"description": "Return the messages older than this id — the first id of the previous page. Paging walks backwards through history, since the default page is the tail."
}
},
"required": [
"chat_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"data": {
"type": "array",
"items": {
"type": "object",
"description": "One message in a run's conversation.",
"properties": {
"id": {
"type": "string"
},
"role": {
"type": "string",
"enum": [
"user",
"assistant"
]
},
"content": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"role",
"content",
"created_at"
]
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"object",
"data",
"has_more"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A page of conversation messages, oldest first."
}🟢wait_for_run(run_id, timeout_seconds)
Wait for a run to settle (completed, failed, or needs_input) and return it with the agent's final reply. Returns wait_timed_out if it is still running when the timeout passes; call again.
輸入結構描述
{
"type": "object",
"properties": {
"run_id": {
"type": "string",
"description": "A run id (trun_...)."
},
"timeout_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 90,
"description": "How long to wait for the run to settle before returning (default 60, max 90). On wait_timed_out, call wait_for_run with the run id."
}
},
"required": [
"run_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🟢get_run(run_id)
Fetch a run's current status, summary, pending approvals, and (once settled) the agent's final reply.
輸入結構描述
{
"type": "object",
"properties": {
"run_id": {
"type": "string",
"description": "A run id (trun_...)."
}
},
"required": [
"run_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🟢list_runs(status, task_id, limit, starting_after, ending_before)
List the account's task runs, newest first — delegated jobs and scheduled tasks alike. Filter by status or task.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
],
"description": "Only runs in this state."
},
"task_id": {
"type": "string",
"description": "Only runs of this task (task_...)."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Default 20."
},
"starting_after": {
"type": "string",
"description": "Return the page after this id — the last id from the previous page."
},
"ending_before": {
"type": "string",
"description": "Return the page before this id — the first id from the previous page."
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"data": {
"type": "array",
"items": {
"type": "object",
"description": "A task run — one delegated job and what is known about its state.",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
]
}
},
"has_more": {
"type": "boolean"
}
},
"required": [
"object",
"data",
"has_more"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A page of task runs, newest first."
}🟡resolve_approvals(run_id, approvals)
Approve or deny the integration actions a run is paused on (status needs_input with pending_approval_ids). Submit a decision for every pending id at once; the run resumes in the background.
輸入結構描述
{
"type": "object",
"properties": {
"run_id": {
"type": "string",
"description": "A run id (trun_...)."
},
"approvals": {
"type": "array",
"description": "One decision per pending approval id — the run stays paused until every one is answered.",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A pending approval id from the run's pending_approval_ids."
},
"approved": {
"type": "boolean",
"description": "True to let the action run, false to deny it."
},
"reason": {
"type": "string",
"description": "Why it was denied (optional)."
}
},
"required": [
"id",
"approved"
]
}
}
},
"required": [
"run_id",
"approvals"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🔴cancel_run(run_id)
Stop a run that is pending, running, or waiting for input. The run is finalized as failed with 'Cancelled by the caller'.
輸入結構描述
{
"type": "object",
"properties": {
"run_id": {
"type": "string",
"description": "A run id (trun_...)."
}
},
"required": [
"run_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}輸出結構描述
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "task_run"
},
"id": {
"type": "string"
},
"task_id": {
"type": "string"
},
"task_name": {
"type": [
"string",
"null"
]
},
"chat_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"completed",
"failed",
"needs_input",
"timed_out",
"unknown",
"skipped"
]
},
"summary": {
"type": [
"string",
"null"
]
},
"error_message": {
"type": [
"string",
"null"
]
},
"pending_approval_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"credits_consumed": {
"type": "integer"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"string",
"null"
]
},
"reused": {
"type": "boolean"
}
},
"required": [
"object",
"id",
"task_id",
"status",
"created_at"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "A task run — one delegated job and what is known about its state."
}🟢api_search(code)
Discover available Crevio API endpoints. Use this BEFORE `api_execute` when you're unsure which endpoint to call, need to check parameter names, or want to explore what's available for a domain (e.g. "experiences", "discounts"). A `tools` method returns the full API catalog — an array of hashes keyed with strings: "method", "path", "summary", "description", "tags", "parameters", "request_body". Examples: `tools.select { |t| t["tags"]&.include?("Products") }.map { |t| "#{t["method"]} #{t["path"]} — #{t["summary"]}" }` `tools.find { |t| t["path"].include?("price_variants") && t["method"] == "POST" }["request_body"]` `tools.map { |t| t["tags"] }.flatten.compact.uniq.sort` — list all API domains
輸入結構描述
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Ruby code to execute. Use `tools` to access the API catalog and filter/search it."
}
},
"required": [
"code"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴api_execute(code)
Execute Ruby in a sandboxed VM against the Crevio REST API. Use `api_search` first to find the endpoint and its body fields, then call it here. Chain calls, transform results, return the final expression. ## Available in your code ``` get(path, params = {}) # paths auto-prefixed with /v1, routed in-process post(path, **body) # body as keyword args or a hash — both work patch(path, **body) delete(path) find_endpoints(query) # -> ["METHOD /path — summary", ...] iso8601(offset_seconds = 0) # mruby Time has no strftime/iso8601 ``` Returns the **last expression**; `puts` is side-channel only. Every run answers `{result:, calls:, output:}` — `calls` audits each REST call (`method`, `path`, `status`, plus `error_code`/`param` on failure). When `result` has unexpected nils, read `calls` for a non-2xx. Never project only success fields (`{id: r["id"]}`) — that hides the error from `result`. ## Rules that the schema does not tell you - Params are unwrapped, Stripe-style: fields at the TOP level. `{product: {...}}` is silently dropped by most endpoints. - Associations take the bare resource name and an id string — `product: "prod_x"`, never `product_id:`. Some required ones never appear in a schema's `properties`. - Courses and content live under `/experiences`, NOT `/products`. - Lists answer `{object: "list", data: [...], has_more}`; single resources answer the object directly. - Connected integrations go through the same REST surface: `post("/connections/<id>/execute", tool: "<tool>", arguments: {...})`, with ids from `get("/connections", search: "<service>")`. - Sandboxed mruby: no `File`, `ENV`, `Net::HTTP`, `Process`. 10s, 10 MB. ## Example — publishing a product (the ordering trap) A product cannot be created active: it needs a price variant first, or the call 422s. ```ruby product = post("/products", name: "...") post("/price_variants", product: product["id"], name: "Standard", amount_type: "fixed", amount: 4900, currency: "usd", billing_type: "one_time") patch("/products/#{product["id"]}", status: "active") ``` API groups: Access, Account, Ads, Analytics, ApiKeys, Approvals, Audio, Billing Portal, BlogCategories, BlogPosts, Bookings, Bots, Broadcasts, Calls, Chapters, CheckoutConfiguration, CheckoutLinks, Checkouts, Connections, Customers, Deployments, Discounts, Domains, Email, Email Suppressions, EventSessions, EventSources, EventTypes, Events, Experiences, Files, FormSubmissions, FormationDocuments, Formations, Forms, ForumPosts, Images, Invoices, Jobs, Leads, LegalPages, Lessons, LinkItems, Logs, Me, OrderItems, Orders, Phone Consents, Phone Numbers, Phone Suppressions, PriceVariants, Products, Refunds, Reviews, Schedules, Secrets, Sites, Skills, Socials, Status, Subscriptions, Tags, TaskRuns, Tasks, Topics, Usage, Users, Video, Web, WebhookEndpoints, WebhookEvents.
輸入結構描述
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Ruby code to execute. Use get/post/patch/delete for REST access or find_endpoints to discover endpoints."
}
},
"required": [
"code"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}建議的提示詞
api_searchget_chatget_chatapi_searchlist_chats社群
證據