{"id":116121,"plugin_id":"plugin_asdk_app_6ae37a13301c81919b3c62b884f60c6b","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-25T18:15:59.249Z","digest":"c1e040c20f5c1c498f5f2ebc25637b89beeb103b4eedb5903a37b0dc619d1527","against":null,"payload":{"description":"Use when administering a Scenario team from an agent through MCP: restricting which models a team or project can run (model access control, allowlist, blocklist), inviting or removing team and project members, changing roles, capping a member's Creative Unit spend, creating or deleting projects, auditing API keys and their roles or scopes, or attributing consumption per user or model. Keywords: governance, model control, consumption cap, spend limit, API key hygiene, team admin, enterprise.","included_files":[],"name":"scenario-team-admin","skill_md_contents":"---\nname: scenario-team-admin\ndescription: \"Use when administering a Scenario team from an agent through MCP: restricting which models a team or project can run (model access control, allowlist, blocklist), inviting or removing team and project members, changing roles, capping a member's Creative Unit spend, creating or deleting projects, auditing API keys and their roles or scopes, or attributing consumption per user or model. Keywords: governance, model control, consumption cap, spend limit, API key hygiene, team admin, enterprise.\"\nlicense: MIT\n---\n\n# Scenario Team Administration\n\n## Overview\n\nEnterprise teams govern Scenario from the same agent that generates on it: which models anyone may\nrun, who is on the team and in which projects, how much each member may spend, and which API keys\nexist with which roles. Every tool here is catalog-only: `scenario_tools_search` returns the schema\nand lane, and `scenario_tool_execute_read` / `write` / `delete` runs it with `{name, parameters}`,\nscope ids inside `parameters` (see the `scenario` skill). Two facts decide most failures before any\nargument does: the identity behind the call, since team-level writes need a human team admin over\nOAuth and refuse API keys, and the list mode the team runs, since the same model-access edit means\nthe opposite thing in blocklist and allowlist mode. `teams_list` already tells you both: each team\nrow carries `modelsManagement`, its model lists, `plan`, and `context.userRole`. A credential that\nreaches one team and one project has its scope; more than one is a stop-and-list, per the `scenario`\nskill. If a sibling skill named here is missing from your available skills, load it with `skill_get`\n(Scenario MCP) or ask the user to install it (https://github.com/scenario-labs/skills#install);\nunattended, proceed from tool schemas and flag the gap.\n\n## Quick reference\n\n| Task                 | Tool                                                                | Lane                       | Notes                                                                                |\n| -------------------- | ------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------ |\n| Read model access    | `model_access_get`                                                  | read                       | Mode plus the team's active list; `project_id` adds that project's list alongside it |\n| Change model access  | `model_access_update`                                               | write                      | `level` `team` or `project`; exactly one of `add_models`, `remove_models`            |\n| Team roster          | `team_members_list`                                                 | read                       | Members and pending invitations                                                      |\n| Invite               | `team_members_add`                                                  | write                      | 1 to 32 `emails`, `role`, optional `project_ids` joined on acceptance                |\n| Roles and spend caps | `team_members_update`                                               | write                      | `member_ids` 1 to 32; `role` and/or `max_consumption`                                |\n| Remove from the team | `team_members_remove`                                               | delete                     | Also withdraws invitations; access ends immediately                                  |\n| Project roster       | `project_members_list`, `_add`, `_update`, `_remove`                | read, write, delete        | Roles `admin` (Owner), `editor` (Contributor), `reader` (Viewer)                     |\n| API keys             | `api_keys_list`, `api_key_get`, `api_key_update`, `api_key_delete`  | read, write, delete        | Project scope; `api_key_create` returns the portal link and nothing else             |\n| Projects             | `project_get`, `project_create`, `project_update`, `project_delete` | read, write, write, delete | Create needs a team admin over OAuth and counts against the plan's project limit     |\n| Who spent what       | `usage`                                                             | read (default tools)       | Per-user and per-model consumption in the default response                           |\n\n## Model access: read the mode before editing\n\n`model_access_get` returns `models_management` and only the mode's active list; the inactive stored\nlist is never surfaced. In blocklist mode (the default) every catalog model is available except\nthose on the team or project blocklist, and the two lists block as a union. In allowlist mode a\nmodel is available only when it sits on both the team and the project allowlist; a project with an\nempty allowlist denies every model, and a project with no allowlist configured falls back to the\nteam list.\n\n`model_access_update` edits whichever list the mode makes active, so `add_models` blocks in\nblocklist mode and allows in allowlist mode: read the mode first, every time. Switching the mode is\nnot available through MCP; it lives in the web app's team settings, so locking a team down to an\napproved set starts with the user flipping to allowlist there. Unattended, that switch is a\nstop-and-report: log that the lock waits on it and the exact calls that follow, and take the\nblocklist-safe partial (blocking the named unwanted models at project level), saying that other\nprojects stay open. Narrowing a list the credential can edit is in scope when the task states the\ntarget set: `remove_models` runs after the adds succeed, so the list never ends empty.\n`level: \"team\"` needs a team admin over OAuth, and the server refuses API keys on that endpoint.\n`level: \"project\"` takes the projects to edit in `projects` (1 to 200) and needs the admin role on\nevery one of them: one unauthorized project fails the whole request and nothing updates, and a\nsingle-project key can only edit its own project's list. `project_id` on the call is tenant context\nfor OAuth sessions, never the target. In allowlist mode a project admin can add only models already\non the team allowlist (a project list narrows the catalog, never widens it), removing a base model\nfrom a team allowlist cascade-removes the trained models built on it, and a team-level add validates\nevery id, one unknown id failing the whole call. `updated: false` means the diff was a no-op, not an\nerror. A blocked model disappears from what members can run, and the error a member sees when\nrunning one anyway is a restriction, not moderation (see `scenario-moderation`).\n\n## Members and spend caps\n\n`team_members_update` takes `member_ids` from `team_members_list` and sets `role` (`admin` or\n`member`), `max_consumption`, or both. The cap is in Creative Units over the current billing period:\na value of zero or more caps, `-1` is unlimited, and `null` clears the per-member override so the\nteam-wide default applies. Roles can be set by a team admin over OAuth or a team-scoped API key with\nthe `team.members.manage` scope; caps need a real team admin, and a key that tries is refused per\nmember. Demoting the last admin fails server-side. The bulk member tools process one row at a time\nand report an outcome per member; a response with `status: \"partial\"` is finished by calling again\nwith its `remaining` list.\n\n`team_members_add` invites 1 to 32 emails at `role` (default `member`) and joins them to\n`project_ids` on acceptance; outcomes are `invited`, `failed`, or `skipped` with the reason (already\na member, already invited, seat limit reached). `project_id` on the call grants nothing. Like role\nchanges, inviting takes a team admin over OAuth or a team-scoped key with `team.members.manage`; a\nproject-scoped key gets a permission error. A pending invitation carries no member id, so its cap\nwaits for acceptance. `project_members_add` takes people already on the team, as user ids or emails\n(emails need `team_id` to resolve), with a required project role.\n\nRemoval is the delete lane and immediate: `team_members_remove` ends the person's access everywhere\nand withdraws pending invitations, `project_members_remove` leaves team membership and other\nprojects untouched. List first, confirm the exact names with the user, then remove; unattended,\nremove only the members the task instructions name.\n\n## API keys\n\n`api_keys_list` and `api_key_get` are project-scoped and return each key's `id`, `api_key_id`, name,\nstatus, scope, role, projects, and creation date, plus a `manage_keys_url`; team-scoped keys are not\nattached to projects and never appear here, only in the portal. `api_key_update` changes a key's\n`role` to `admin`, `editor`, `reader`, or a custom `;`-separated scope list (the reference's example\nis `assets.read;models.run`); name, status, and usage limits are portal-only, and a limit takes an\nEnterprise plan and a human admin. Creation is deliberately not an MCP operation: `api_key_create`\nreturns the portal link, the secret is shown once there, and it never passes through the\nconversation (the `scenario` skill's rule on secrets holds here). `api_key_delete` takes the key as\n`key_id` (either the `id` or the `api_key_id` from the listing), cannot be undone, needs a project\nadmin, and refuses the key the current session is authenticated with: list, confirm the exact key\nwith the user, then delete; unattended, delete only a key the task instructions name and exactly one\nkey matches.\n\n## Projects\n\n`projects_list` (default toolset) finds what exists; create only when nothing matches.\n`project_create` takes `team_id`, `name`, and `privacy_mode`; a description needs a follow-up\n`project_update`. It needs a human team admin over OAuth (API keys are refused) and counts against\nthe plan's project limit, which refuses the call once reached: report the limit, never delete a\nproject to make room. Pass the returned `project.id` as `project_id` from then on. In a team with no\nprojects, the API first creates a default project, which stays even when the call is refused: check\n`projects_list` afterwards and offer to rename it with `project_update` rather than keep two\n(unattended: report it, change nothing).\n\n- **Privacy.** `privacy_mode: true`, on `project_create` or `project_update`, limits non-admin\n  members to the assets and models they created; project and team admins still see everything.\n  Turning it off shows every member everything: confirm with the user first; unattended, only when\n  the task instructions say so.\n- **Rename.** `project_update` changes only the fields passed: `name`, `description` (up to 2,000\n  characters), `privacy_mode`, `avatar_asset_id`. Access, model lists, and credit caps live in the\n  tools above or the web app.\n- **Delete.** `project_delete` runs on the delete lane, is irreversible, and takes the project's\n  models, generation records, API keys, and memory with it. Confirm the name and id from\n  `project_get` first. It takes the target as `project_id`, and is refused while anyone but the\n  caller holds a role on the project or a key is attached: report who remains and ask, and never\n  remove a member or delete a key to unblock it without a separate confirmation of each. The creator\n  joins as Admin by default (`auto_join`), which blocks a delete by anyone else. Unattended, delete\n  only a project the task instructions name, when exactly one matches, and report a refusal and\n  stop.\n\n## Who spent what\n\n`usage` is in the default toolset and returns a summary by default: headline CU totals, per-user\nconsumption, per-model CU and job counts sorted descending, and per-asset-kind counts, bounded by\n`start_date` and `end_date` (ISO dates); `project_id` filters the figures, so a single-project\ncredential ranks spend inside that project, not across the team. An undated call returns\nproject-lifetime figures, so always pass the range: `totals` and the per-user `consumption` rows\n(`userId`, `total`) follow `start_date` and `end_date`, and a member ranking comes from those rows.\nThe per-day series (`include: [\"usages.daily\"]` per usage type, `[\"modelUsages.daily\"]` per model)\ncarry no user dimension; `nsfwUsages` adds moderation totals and `activity` the raw event log. Never\nattribute spend by adding up your own calls. Read consumption before setting caps: both are in CU\nover the billing period, and a cap below what a member has already spent stops them at once.\n\n## Worked example: lock a project to approved models and cap the contractors\n\n1. `scenario_tools_search` with `query=\"model access\"`, then `query=\"team members\"`: schemas and\n   lanes for the calls below.\n2. `scenario_tool_execute_read` with `name: \"model_access_get\"`,\n   `parameters: {\"team_id\", \"project_id\"}`. The team is in blocklist mode, so \"only these three\n   models\" is not expressible: tell the user to switch the team to allowlist in the web app's team\n   settings, then re-read; unattended, log the gap with the calls below and stop, blocking any\n   models the task names as unwanted at project level in the meantime.\n3. In allowlist mode, the team list first: `scenario_tool_execute_write` with\n   `name: \"model_access_update\"`,\n   `parameters: {\"team_id\", \"project_id\", \"level\": \"team\", \"add_models\": [<the three ids>]}`; this\n   is the call that needs the caller to be a team admin over OAuth (`context.userRole` on the\n   `teams_list` row says whether they are). Then the project: `level: \"project\"`,\n   `projects: [<project id>]`, the same `add_models`, which succeeds only because the team list now\n   carries them.\n4. `scenario_tool_execute_read` with `name: \"team_members_list\"`: the two contractors' member ids.\n   `scenario_tool_execute_write` with `name: \"team_members_update\"`,\n   `parameters: {\"team_id\", \"project_id\", \"member_ids\": [<two ids>], \"max_consumption\": 2000}`. On\n   `status: \"partial\"`, call again with `remaining`.\n5. `scenario_tool_execute_read` with `name: \"api_keys_list\"` for the project. A render-farm key\n   running as `admin` is narrowed with `api_key_update`, `role: \"assets.read;models.run\"`, and any\n   key nobody can account for is deleted only after the user confirms it by name.\n6. Confirm: `model_access_get` with `project_id` shows the project list `configured` with the three\n   ids; later in the period, `usage` with the date range and `include: [\"usages.daily\"]` shows the\n   contractors' consumption against the cap.\n\n## Common mistakes\n\n- Editing model access without reading `models_management`: `add_models` blocks in one mode and\n  allows in the other.\n- Trying to lock a team to a short list while in blocklist mode: that is an allowlist job, and the\n  mode switch is a web-app setting.\n- Team-level writes through an API key: refused by design; the caller is a human team admin over\n  OAuth.\n- `arguments` instead of `parameters` on the executor: dropped silently and surfaced as a scope\n  error (see `scenario`).\n- Setting caps with a `team.members.manage` key: it can change roles, not caps.\n- Reading an undated `usage` call as the period's spend: its figures are project-lifetime. Pass\n  `start_date` and `end_date`, rank members from the dated `consumption` rows, and use the per-day\n  series only to cross-check a period total, since it carries no user dimension.\n- Expecting `api_keys_list` to show team-scoped keys: they exist only in the portal.\n- Passing `project_id` to `team_members_add` to grant project access: `project_ids` grants;\n  `project_id` is tenant context.\n- Deleting a key or removing a member without listing and confirming first: the delete lane is\n  irreversible, and `api_key_delete` refuses the session's own key.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}