scenario-admin-analytics
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScenario Admin Analytics
Scenario 管理分析
Overview
概述
Turn Scenario MCP usage data into answers, CSV, Markdown, a PDF with charts, or an offline dashboard. All Scenario data collection stays on MCP. No direct API, SDK, browser scraping, or credentials in reporting scripts. Use the skill for connection setup. If a sibling skill named here is missing from your available skills, ask the user to install it (); unattended, proceed from tool schemas and flag the gap.
scenarionpx skills add scenario-labs/skills --skill <name>Resolve the customer through and, when needed, . Reuse the user's selected scope. If several names match, ask using the discovered choices; unattended, use the task's explicit team/project ID pair, otherwise stop and list the choices. Never choose the first silently. For an organization-wide request, use with an accessible context project. This covers projects accessible to the credential, not additional access rights. For a project use (default); supplies authentication context and the default analytics filter. selects other projects within that team and cannot accompany . Deduplicate selected IDs. Do not add a team total to its project subtotals or sum project unique-user counts.
teams_listprojects_list({team_id})scope:"team"scope:"project"project_idproject_idsscope:"team"将Scenario MCP使用数据转化为答案、CSV、Markdown、带图表的PDF或离线仪表板。所有Scenario数据收集均在MCP上完成。报告脚本中不涉及直接API调用、SDK、浏览器爬虫或凭证。使用 skill进行连接设置。如果你的可用skill中缺少此处提到的同类skill,请让用户安装();在无人值守模式下,基于工具schema继续操作并标记缺失项。
scenarionpx skills add scenario-labs/skills --skill <name>通过解析客户信息,必要时使用。复用用户选择的scope。如果有多个名称匹配,使用已发现的选项询问用户;无人值守模式下,使用任务明确指定的team/project ID对,否则停止并列出所有选项。切勿静默选择第一个结果。对于组织范围的请求,使用并搭配一个可访问的上下文项目。这仅涵盖凭证可访问的项目,不会授予额外访问权限。对于单个项目,使用(默认值);提供认证上下文和默认分析过滤器。用于选择同一团队内的其他项目,不能与同时使用。对选中的ID去重。不要将团队总计加到其项目小计中,也不要累加各项目的独立用户数。
teams_listprojects_list({team_id})scope:"team"scope:"project"project_idproject_idsscope:"team"Quick reference
快速参考
| Question | MCP usage data | Calculation |
|---|---|---|
| Top three models | | Sort by |
| All model CU for three months | Add | Export every model, grouping time buckets by UTC month. |
| Who consumed most CU? | | Rank |
| Top models per user | Repeat scoped | Rank each response's models; include CU and jobs. |
| Top five users for ten models | Same per-user queries | Select the top ten models overall, then rank five identities within each. |
| Explain a difference | | Inspect recorded evidence; follow |
Discover the current schema with when missing or stale. Normally call visible directly. If catalog-only, use , never . A host may retain an older direct signature after deployment: if the fresh catalog exposes missing fields, use that same read executor with its schema or reconnect. An old host signature does not establish a missing capability. Ground calls in the public usage reference and live catalog.
scenario_tools_search({query:"usage",limit:1})usagescenario_tool_execute_read({name:"usage",parameters:{...}})argumentsAlways set both dates. Bounds are inclusive: a complete March ends at . State UTC buckets. For an undated question assume the last 30 complete days; for "last three months" assume the last three complete calendar months, stating the window. An undated API call defaults to 31 days, not lifetime. Current-day figures are provisional. The API enforces its range limit; do not invent a fixed cap. If it rejects a large range, split into non-overlapping inclusive windows, retain each source, and combine additive measures without summing unique-identity counts.
2026-03-31T23:59:59.999ZBegin with summary JSON; add for reports. Time buckets may be finer than daily for short ranges; aggregate by timestamp then UTC day, rejecting duplicate timestamps. is paginated in batches of at most 100 via ; follow the returned next offset, not guessed completeness. Summaries repeat on activity pages: count them once. Avoid activity for ordinary rankings.
include:["modelUsages.daily","entities"]activityactivity_offset| 问题 | MCP使用数据 | 计算方式 |
|---|---|---|
| 排名前三的模型 | | 按 |
| 三个月内所有模型的CU | 添加 | 导出所有模型,按UTC月份对时间桶分组。 |
| 谁消耗的CU最多? | | 按 |
| 每个用户的常用模型排名 | 针对单个 | 对每个响应中的模型排序;包含CU和任务数。 |
| 十个模型对应的前五名用户 | 相同的按用户查询 | 先选出整体排名前十的模型,再在每个模型中对五个用户身份排序。 |
| 解释数据差异 | | 检查已记录的证据;如果需要完整的活动记录,跟随 |
当schema缺失或过时时,使用获取当前schema。通常直接调用可见的。如果仅支持目录模式,使用,切勿使用。主机在部署后可能保留旧的直接调用签名:如果新目录显示存在缺失字段,使用同一读取执行器及其schema,或重新连接。旧的主机签名不代表功能缺失。调用需基于公开usage参考文档和实时目录。
scenario_tools_search({query:"usage",limit:1})usagescenario_tool_execute_read({name:"usage",parameters:{...}})arguments始终同时设置开始和结束日期。时间范围是包含边界的:完整的3月截止到。明确说明UTC时间桶。对于未指定日期的问题,假设为过去30个完整日;对于“最近三个月”,假设为过去三个完整的自然月,并说明时间窗口。未指定日期的API调用默认返回31天数据,而非全部历史数据。当日数据为临时数据。API有自身的范围限制;不要虚构固定上限。如果大范围请求被拒绝,拆分为不重叠的包含边界的时间窗口,保留每个数据源,合并可累加指标,但不要累加独立身份计数。
2026-03-31T23:59:59.999Z从摘要JSON开始;生成报告时添加。短时间范围的时间桶可能比日粒度更细;先按时间戳聚合,再按UTC日聚合,剔除重复时间戳。通过分页,每批最多100条;跟随返回的下一个偏移量,不要猜测是否完整。摘要会在activity页面重复出现:仅计数一次。普通排名查询避免使用activity。
include:["modelUsages.daily","entities"]activityactivity_offsetAccounting and confidence
核算与可信度
totals.totalCUconsumption[].valueconsumption[].totalvalue + discounttotalCUcostValidate echoed and dates; check consumption against overall CU, time buckets against model summaries, and per-user model sums against the unfiltered models. The scope echo records applied filters; it does not prove access to every customer project. State established scope and results directly. Do not carry an old "unverified consumption" warning onto validated data.
scopeModel series measure generation activity and exclude separately recorded refunds and non-model operations. Consequently model CU need not equal overall consumed CU. Show the measured difference without asserting its cause; inspect usage sections if an explanation is requested. Never allocate it to models, sum overlapping usage-type categories, or substitute job billing snapshots for consumption. If a check fails, withhold only the affected attribution, report the exact mismatch, and investigate through MCP.
For user/model matrices, collect one same-scope, same-period usage query per , including zero or negative rows. Never join independent user and model summaries by proportion. Reconcile all model CU and jobs before claiming complete coverage; if identities are missing, investigate MCP identity/activity metadata rather than inventing attribution. Resolve names through returned entities; if names are missing and the recipient needs identifiable users, discover and join its returned email by ID. Retain stable IDs internally, and distinguish API identities when metadata identifies them. Unknown identity type stays unknown. If "most used" has no stated metric, rank by jobs and show CU; an explicit CU request ranks by CU. Break ties deterministically by stable ID. Top-N rows include both metrics.
consumption[].userIdteam_members_listtotals.totalCUconsumption[].valueconsumption[].totalvalue + discounttotalCUcost验证回显的和日期;将消耗数据与总CU核对,将时间桶数据与模型摘要核对,将按用户的模型总和与未过滤的模型数据核对。scope回显仅记录已应用的过滤器;不代表能访问所有客户项目。直接说明已确认的scope和结果。不要将旧的“未验证消耗”警告套用到已验证的数据上。
scope模型系列衡量生成活动,不包含单独记录的退款和非模型操作。因此模型CU不一定等于总消耗CU。展示测量到的差异,但不要断言原因;如果用户要求解释,再检查usage的各个部分。切勿将差异分摊到各个模型,不要累加重叠的使用类型类别,也不要用任务计费快照代替消耗数据。如果检查失败,仅保留受影响的归因,报告具体的不匹配情况,并通过MCP进行调查。
对于用户/模型矩阵,为每个收集一次同scope、同周期的usage查询,包括零值或负值行。切勿按比例关联独立的用户和模型摘要。在声称覆盖完整之前,核对所有模型的CU和任务数;如果身份信息缺失,调查MCP身份/活动元数据,而不是虚构归因。通过返回的entities解析名称;如果名称缺失且接收方需要可识别的用户信息,调用并通过ID关联返回的邮箱。内部保留稳定ID,并在元数据可识别时区分API身份。未知身份类型保持未知。如果“最常用”未指定指标,按jobs排序并展示CU;明确要求CU维度时按CU排序。按稳定ID确定性地打破平局。前N行同时包含两个指标。
consumption[].userIdteam_members_listCache, output, and environment fallback
缓存、输出与环境降级
Inspect capabilities, not product names. With files and Python use the bundled offline helper; the agent collects MCP data and the script only transforms local snapshots. Read local reporting for envelopes, commands, dependencies, supported filters, and cache validation. The dashboard template uses the warm paper, charcoal, and terracotta palette of Scenario's public site, with local font fallbacks.
Cache by connection/account namespace, schema version, team, context project, scope, selected project/user IDs, exact dates, sections, and activity offset. Default TTL is one hour; "refresh" bypasses it. User/model questions also require fresh per-user snapshots. Preserve original retrieval timestamps; re-importing an export must not make it fresh. Summary-only data cannot answer a new trend question. Expired data may support a clearly labeled historical/offline answer. A connection change or accounting/scoping fix invalidates affected caches. Keep private snapshots outside repositories, omit credentials and unnecessary personal data, and delete on request. Retrieval time does not guarantee upstream freshness.
With ephemeral execution, use session files and explain their lifetime. With MCP but no files/execution, answer small questions directly and supply Markdown or fenced CSV; caching is session-only. If PDF generation is unavailable, offer local print-ready HTML when supported. Never claim an unsaved file or unrendered PDF exists. Without MCP, use a supplied prior MCP snapshot with its provenance and age, or report the connection gap; no alternate Scenario data surface.
Answer direct questions first with scope, dates, metric, and retrieval time. Reports include consumed CU, model jobs, model breadth, concentration, trends, identity rankings, and reconciliation. The helper supports CU/job sorting, configurable models per user, monthly CSV, and user/model/date dashboard filters when per-user time buckets exist. Full-period overall and identity consumption remain labeled separately from filtered generation activity. Refreshing a dashboard requires another MCP fetch; never publish customer data as part of this skill.
Park unsupported requests under "Not available through MCP", naming the missing evidence and any supported alternative. Usage alone cannot establish ROI, time saved, ticket attribution, delivered-output adoption, historical eligible-seat counts, or retention. Permission failures, empty results, incomplete coverage, and unsupported metrics are distinct outcomes.
检查功能而非产品名称。如果有文件和Python环境,使用捆绑的离线助手;Agent收集MCP数据,脚本仅转换本地快照。阅读本地报告了解信封格式、命令、依赖项、支持的过滤器和缓存验证。仪表板模板采用Scenario官网的暖纸色、炭灰色和陶土色调色板,并提供本地字体降级方案。
按连接/账户命名空间、schema版本、团队、上下文项目、scope、选中的项目/用户ID、精确日期、数据段和activity偏移量进行缓存。默认TTL为1小时;“刷新”操作会绕过缓存。用户/模型相关问题还需要最新的按用户快照。保留原始获取时间戳;重新导入导出文件不应视为最新数据。仅含摘要的数据无法回答新的趋势问题。过期数据可用于明确标记为历史/离线的答案。连接变更或核算/scope修复会使受影响的缓存失效。将私有快照保存在仓库外,剔除凭证和不必要的个人数据,并按要求删除。获取时间不保证上游数据的新鲜度。
在临时执行环境中,使用会话文件并说明其生命周期。如果有MCP但没有文件/执行环境,直接回答小问题并提供Markdown或带围栏的CSV;缓存仅在会话内有效。如果无法生成PDF,在支持的情况下提供本地可打印HTML。切勿声称存在未保存的文件或未渲染的PDF。没有MCP时,使用提供的先前MCP快照(注明来源和时效),或报告连接缺失;没有其他Scenario数据来源。
回答直接问题时,首先说明scope、日期、指标和获取时间。报告包含消耗的CU、模型任务数、模型覆盖广度、集中度、趋势、身份排名和对账结果。当存在按用户的时间桶时,助手支持按CU/任务排序、可配置的每个用户模型数、月度CSV,以及用户/模型/日期维度的仪表板过滤器。全周期的总体消耗和身份消耗与过滤后的生成活动分开标记。刷新仪表板需要再次进行MCP获取;切勿将客户数据作为此skill的一部分发布。
将不支持的请求归类为“无法通过MCP获取”,说明缺失的证据和任何支持的替代方案。仅使用数据无法确定ROI、节省时间、工单归因、交付产出采用率、历史符合条件的席位数量或留存率。权限失败、空结果、覆盖不完整和不支持的指标是不同的结果。
Worked example
示例
Request on September 17, 2026: "Across all projects, give me the top five models per user by CU with job counts, a three-month CSV, and a PDF."
- Resolve the team and an accessible context project. State June 1 through August 31, the last three complete calendar months. Discover the current usage schema if needed.
- Check the exact cache, including user coverage. On a miss call . Placeholders come from discovery.
usage({team_id:"<selected team>",project_id:"<context project>",scope:"team",start_date:"2026-06-01T00:00:00Z",end_date:"2026-08-31T23:59:59.999Z",include:["modelUsages.daily","entities"],response_format:"json"}) - For each consumption identity repeat that query with . Save each complete
user_ids:["<returned identity ID>"]envelope. Verify dates, scope, and model-by-model reconciliation. Do not add these user totals to the parent total.{query,response,fetched_at} - Ingest the parent and per-user envelopes, then render with . Return the answer plus full model/monthly CSV and per-user rankings. Subsequent top-three or job-ranked questions reuse these fresh snapshots offline.
--rank-by cu --top-models-per-user 5 --pdf - Render every PDF page to images and inspect layout before delivery; disclose if visual verification is unavailable. Test dashboard filters against known totals. Keep customer artifacts local.
2026年9月17日的请求:“在所有项目中,给我每个用户按CU排序的前五名模型(含任务数)、三个月的CSV和一份PDF。”
- 解析团队和一个可访问的上下文项目。说明时间范围为6月1日至8月31日,即最近三个完整自然月。必要时获取当前的usage schema。
- 检查精确匹配的缓存,包括用户覆盖范围。缓存未命中时调用。占位符来自发现过程。
usage({team_id:"<selected team>",project_id:"<context project>",scope:"team",start_date:"2026-06-01T00:00:00Z",end_date:"2026-08-31T23:59:59.999Z",include:["modelUsages.daily","entities"],response_format:"json"}) - 对每个消耗身份,使用重复该查询。保存每个完整的
user_ids:["<returned identity ID>"]信封。验证日期、scope和逐模型对账结果。不要将这些用户总计加到父级总计中。{query,response,fetched_at} - 导入父级和按用户的信封,然后使用渲染。返回答案以及完整的模型/月度CSV和按用户排名。后续的前三模型或按任务排名的问题可离线复用这些最新快照。
--rank-by cu --top-models-per-user 5 --pdf - 在交付前将每个PDF页面渲染为图像并检查布局;如果无法进行视觉验证,需明确说明。对照已知总计测试仪表板过滤器。将客户工件保存在本地。
Common mistakes
常见错误
- Treating an authentication project as the only possible analytics filter, or assuming team scope grants wider permissions.
- Using an exclusive end date, lifetime assumptions, stale schemas, or pre-fix cached figures.
- Subtracting discounts twice, adding API subsets, or forcing model activity to equal overall consumption.
- Reporting a guessed refund explanation, proportional user/model joins, or partial history as complete usage.
- Calling CU "adoption rate" without a denominator, exposing customer snapshots, or using a non-MCP fallback.
- 将认证项目视为唯一可能的分析过滤器,或假设team scope会授予更广泛的权限。
- 使用不包含边界的结束日期、假设为全部生命周期数据、使用过时的schema或修复前的缓存数据。
- 重复扣减折扣、累加API子集数据,或强制模型活动等于总消耗。
- 报告猜测的退款原因、按比例关联用户/模型数据,或将部分历史数据当作完整使用数据。
- 没有分母就将CU称为“采用率”、泄露客户快照,或使用非MCP的替代方案。