Skip to main content
Glama

执行岗位动作

canvas_action

执行一个岗位动作(如 AICare 的 preflight / list_checks / gen_report / run_detection / resolve_user)。参数:slug、action 必填;params 按 list_actions 的 schema 填;session_id 想让结果落在某次会话里就带;hostUserId 宿主用户标识可选。返回 {ok, mode:"sync", data} 直接用;{ok, mode:"job", jobId, pollSec} 用 get_job 轮询。代价:list_actions 标 paid 的会从岗位出资人余额扣 credits(出报告 5 / 跑检测 2),失败不扣;同键(如同对象同一天)重复调用返回缓存结果(cached 标记)不重复扣,用户催第二次可放心重试。典型编排:list_actions → canvas_action(preflight) 拿背景 → canvas_action(gen_report) → get_job → 用自然语言讲给用户。公共岗位:gaia-academy(龙虾学院 · Agent 进修)的动作标 public:true——任何持有效 Key 的调用方都能跑,不需要拥有该岗位;学员身份取调用方 Key 的用户,非 public 动作对非归属方仍 403。典型用法:canvas_action(gaia-academy, search_courses → start_exam → submit_exam → get_principle)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes
actionYes动作 id,见 list_actions
paramsNo按 list_actions 给的 JSON Schema 填
hostUserIdNo宿主用户标识,可选
session_idNo可选,open_canvas 给的会话 ID,动作记录会挂到该会话

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite annotations already covering the safety profile, the description adds substantial context beyond them: credits are deducted from the tenant owner's balance for paid actions (5 for gen_report, 2 for run_detection), no charge on failure, and same-key calls return cached results without re-charging. It also discloses the two return shapes (sync data vs job+jobId/pollSec) and the auth rule for public vs owned tenants.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and required params, then cost, caching, orchestration and examples. Information-dense with no filler, though it packs several distinct concerns (params, pricing, retry, auth, examples) into one long paragraph that could be broken up.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description fully covers the return contract (sync vs job modes with fields), cost semantics, caching/retry, auth boundaries and a worked public-tenant example. Given the nested params object and mutation semantics, nothing essential is left to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80% (baseline 3), and the description adds meaning by stating slug/action are required, pointing params at list_actions' JSON Schema, and explaining why session_id would be set ('想让结果落在某次会话里') and that hostUserId is optional. It does not add format/syntax detail beyond that, so it stops short of 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb+resource ('执行一个岗位动作') and immediately enumerates concrete action families (preflight / list_checks / gen_report / run_detection / resolve_user). It also contrasts the tool against siblings (list_actions for schemas, get_job for polling, open_canvas for sessions), so an agent can distinguish it without opening other tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit orchestration recipe (list_actions → preflight → gen_report → get_job → narrate), states the public-tenant rule and the 403 condition for non-owners, and tells the agent when retrying is safe. When-to-use, when-it-fails, and the alternative tools are all named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.