canvas-mcp
TeamAgent Canvas MCP:13 个工具(岗位/动作/异步任务/统计)。可匿名试用沙箱,带 Key 解锁全部。
사용해야 할까요
품질 및 안전성
발견 사항 (4)
- LOWlist_my_staff에서
- LOWget_staff_config에서
- LOWlist_actions에서
- LOWget_stats에서
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"canvas-mcp": {
"command": "npx",
"args": [
"@avatargaia/canvas-mcp"
]
}
}
}실행 가능한 패키지
0.1.3stdio원격 엔드포인트
https://agent.avatargaia.top/api/mcp/canvasstreamable-http할 수 있는 일
도구 목록
도구 (13)
🟢list_templates
列出可开岗的数字员工模板。用于:想知道"系统能开哪些岗位"、或用户要开通新岗位时。返回每个模板的 templateId / 名称 / 说明 / canOpen / missingHandlers / 动作清单。别用它找"已开好的岗位"——那是 list_my_staff。canOpen=false 的模板不可开通(缺实现),别推荐用户选。参数:无。
입력 스키마
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_my_staff
列出我名下的数字员工岗位(slug / 名称 / 模板 / 画布链接)。用户问"我有哪些岗位"用它;后续所有按岗位操作的工具都要 slug,slug 一律从这里拿,不要凭记忆拼。参数:无。
입력 스키마
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪open_canvas(slug, hostUserId, targetId, app)
为岗位生成画布链接 + 会话 ID。用于用户需要"看得见的界面"(看报告/看商品/做检测)。参数:slug 必填;hostUserId 宿主用户标识(强烈建议带,会话归属和离线补推都靠它);targetId 关爱/业务对象;app 指定画布页(如 aicare-kf)。返回 {url, session_id}——把 session_id 存下来,get_session_log / push_screen 都用它。会话在返回时已建立:现在就能 push_screen 给"还没来的人"备卡片,用户打开链接即补推;人打开后聊天/埋点都归到同一个 session_id。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string",
"description": "岗位 slug(见 list_my_staff)"
},
"hostUserId": {
"description": "宿主系统的用户标识,如 AICare 的 userId",
"type": "string"
},
"targetId": {
"description": "关爱对象/服务对象 ID(AICare 类岗位用)",
"type": "string"
},
"app": {
"description": "画布页面,默认岗位配置的;AICare 康护可传 aicare-kf",
"type": "string"
}
},
"required": [
"slug"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_staff_config(slug)
读岗位配置:personaPrompt / serviceFlow / promotionConfig / productSources / contextMode / layoutStyle / templateId / llmMode(只说是否 BYOK,不给密钥)/ tts。参数:slug 必填。改之前先读,否则会用"想当然的人设"覆盖客户调过的版本。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
}
},
"required": [
"slug"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡patch_staff_config(slug, patch)
局部修改岗位配置,patch 只放要改的字段:personaPrompt(人设) / serviceFlow(服务流程,一行一步) / promotionConfig({categories:[{name,priority,url}]}) / productSources([{key,label,searchUrl,weAppId?,weAppUsername?}]) / layoutStyle(split|pip|classic) / contextMode(inline|webhook) / contextWebhookUrl / name。参数:slug、patch 都必填。这是写操作,改的是客户的岗位,改完立刻生效;不确定用户真要改时先复述一遍再调。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"patch": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "要改的字段"
}
},
"required": [
"slug",
"patch"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_actions(slug)
列出这个岗位(按其模板)能做的动作:id / title / description / cost / credits / anonymous / job / params(JSON Schema)。参数:slug 必填。调 canvas_action 前先调它,不要猜 action 名——各岗位动作集不同,params 按它给的 schema 填。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
}
},
"required": [
"slug"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡canvas_action(slug, action, params, session_id, hostUserId)
执行一个岗位动作(如 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)。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"action": {
"type": "string",
"description": "动作 id,见 list_actions"
},
"params": {
"description": "按 list_actions 给的 JSON Schema 填",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"session_id": {
"description": "可选,open_canvas 给的会话 ID,动作记录会挂到该会话",
"type": "string"
},
"hostUserId": {
"description": "宿主用户标识,可选",
"type": "string"
}
},
"required": [
"slug",
"action"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_job(job_id)
按 job_id 查长任务:queued / running / done(带 result) / failed(带 error)。建议每 3 秒查一次。error 是人话(如"关爱对象不存在或已删除"),照原话转述给用户,不要改写成"系统繁忙",也不要拿同参数重试。
입력 스키마
{
"type": "object",
"properties": {
"job_id": {
"type": "string"
}
},
"required": [
"job_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_stats(slug, from, to)
岗位一段时间的汇总:会话数、真人对话轮数、埋点数、动作调用数、tokens、按日曲线。参数:slug 必填;from/to ISO 时间,默认最近 30 天。用户问"这岗位最近怎么样/今天多少人来"就用它,不要靠聊天历史猜数字。需要有效 Key,匿名不开。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"slug"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢list_sessions(slug, q, from, to, limit, ...)
岗位的访客会话列表(最近优先):session_id、宿主用户标识、轮数、时间。参数:slug 必填;q 按宿主用户标识模糊搜;from/to;limit;cursor 翻页传上一页返回的 nextCursor。想看"最近都服务了哪些人"用它,再拿 session_id 看明细。需要有效 Key,匿名不开。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"q": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string"
}
},
"required": [
"slug"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_session_log(slug, session_id)
单个会话按时间正序的完整流水:用户消息 / AI 回复(带 tokens) / 埋点 / 动作调用 / 推屏。参数:slug 和 session_id 两个都必填(slug 用于显式鉴权)。调用前先从 list_sessions 或 open_canvas 拿到合法 session_id。隐私边界:只能读自己岗位的记录。需要有效 Key,匿名不开。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"session_id": {
"type": "string"
}
},
"required": [
"slug",
"session_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢query_events(slug, type, from, to, limit)
跨会话按类型拉事件(倒序):type = chat_user / chat_assistant / track / action_call / page_open / push。参数:slug 必填;type、from/to、limit(≤500)。每条带 source(mcp / page / server,看得出谁发起的);action_call 的 payload 有 params/ok/ms/credits/cached/jobId——计费与排障的证据链;push 的 payload 有 preview。需要有效 Key,匿名不开。
입력 스키마
{
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"type": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500
}
},
"required": [
"slug"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢push_screen(session_id, content, speak, title)
把内容推到某个画布会话的屏上。参数:session_id 必填(来自 open_canvas 或 list_sessions);content 必填,写成一条"助手回复"文本,可含 ```canvas-md(Markdown 卡片)/ ```canvas-html(完整 HTML 文档)/ ```canvas(JSON 块)围栏,围栏外文字显示为字幕;speak=true 朗读字幕;title 可选。会话在线立即上屏;不在线(含还没人打开过的)存为待展示,该会话或同岗位同一 hostUserId 下次打开自动补推。屏属于会话不属于人:别复用别人的 session_id;要执行有副作用的动作(出报告/跑检测)用 canvas_action。需要有效 Key,匿名不开。
입력 스키마
{
"type": "object",
"properties": {
"session_id": {
"type": "string"
},
"content": {
"type": "string",
"description": "含围栏的回复文本"
},
"speak": {
"description": "是否朗读围栏外文字",
"type": "boolean"
},
"title": {
"type": "string"
}
},
"required": [
"session_id",
"content"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}커뮤니티
증거