<!-- Gerado por `npm run docs:gen` (backend/scripts/docs-gen.ts) a partir de `tools/list` do catálogo built-in (`src/mcp/catalog.ts`). Não edite à mão: `npm run docs:check` falha se este arquivo divergir do código. -->

# Tools MCP built-in

Catálogo que o gateway `/mcp` publica em `tools/list`, agrupado por toolset. O que um
agente enxerga depende do toolset pedido (header `x-agentpack-toolsets`, query ou chave
de agente) e do escopo da credencial: sem o escopo da coluna **Escopo**, a tool some do
`tools/list`. Tools de MCPs externos (toolset `proxied`) dependem do projeto e não entram
aqui. Schemas completos: `agentpack_describe_tool { name }` pelo próprio `/mcp`.

## Toolsets

| Toolset | Padrão | Tools | Descrição |
| --- | --- | --- | --- |
| `core` | sim | 16 | Projects, memories, agent prompt reads and the cross-entity search. |
| `tasks` | sim | 20 | Task board: tasks with planned dates and the roadmap timeline, todos, work queue, attachments and task links. |
| `knowledge` | sim | 8 | Knowledge pages: versions, hierarchy, task links and search. |
| `skills` | sim | 9 | Skill catalog, folders and project links. |
| `decisions` | não | 7 | Human decisions of a task (HITL): create, list, supersede and cancel decisions, hand answers and more-information requests to the human, return a task to the decision queue. |
| `core-admin` | não | 6 | Project and memory removal, memory history (versions, restore) and the audit trail. |
| `tasks-admin` | não | 8 | Task and todo removal, unlinking, task dependencies and the task event history. |
| `knowledge-admin` | não | 6 | Knowledge removal, unlinking, moves in the page tree and page history (versions, restore). |
| `skills-admin` | não | 4 | Skill removal, project unlinking and skill package transport (import, export). |
| `skills-history` | não | 3 | Skill version history: list and read the versions of a skill and restore one. |
| `prompts` | não | 5 | Agent prompts of a project: create, update and duplicate, plus task links (list and read are in core). |
| `prompts-admin` | não | 2 | Agent prompt trash: move a prompt to the project trash and bring it back. |
| `prompts-history` | não | 3 | Agent prompt version history: list and read the versions of a prompt and restore one. |
| `render` | não | 20 | Render authoring: screens, nodes, components, styles and tokens (project catalog or design system), design-system apply, validation and screenshots. |
| `render-admin` | não | 39 | Render administration: map, history, previews, usage, whole libraries, design-system lifecycle, starter kit, ports, bundles, assets, extraction and deletes. |
| `github` | não | 80 | GitHub API with the owner's token: reads need read, writes need github:write. |
| `proxied` | sim | 0 | Tools of the registered external MCP servers, scoped by X-AgentPack-Project (or the agent key's projects). |

Total de tools built-in: 236.

## `core`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_describe_tool` | read | read-only, idempotent | `name` | **Describe tool.** Get the full definition of one tool you may call (description, input schema and annotations), even when its toolset is not enabled in this connection. Use it after agentpack_search_tools to build a call. Unknown name, or a tool you cannot call, is NOT_FOUND. |
| `agentpack_knowledge_search` | read | read-only, idempotent | `projectId`, `q?`, `category?`, `scope?`, `demandId?`, `tags?`, `limit?`, `offset?`, `cursor?` | **Search knowledge.** Full-text + fuzzy search (Postgres FTS in Portuguese, trigram fallback) over the knowledge pages of a project. Returns { items, total, nextCursor } with ranked summaries, no HTML body. Filters: category, scope ('general'\|'demand'), demandId, tags (comma-sep). Paginate with nextCursor or offset, never both. Snippets carry &lt;mark&gt; tags: sanitize before putting them in a DOM. |
| `agentpack_memory_create` | write | — | `projectId`, `title`, `content?`, `category?`, `tags?`, `validUntil?` | **Create memory.** Create a memory in a project: persistent context that agents read before working (decisions, preferences, rules, learnings, context, notes). Search with agentpack_memory_list first and update an existing memory instead of duplicating it. Content is limited to 100 KB. Returns the created memory with tags as an array. |
| `agentpack_memory_get` | read | read-only, idempotent | `id` | **Get memory.** Get a memory by ID with its markdown `content`, `version` (send it as expectedVersion on writes) and validity (supersededById, validUntil). Deleted memories are not found; restore them with agentpack_memory_restore. |
| `agentpack_memory_list` | read | read-only, idempotent | `projectId`, `category?`, `tags?`, `search?`, `includeSuperseded?`, `page?`, `pageSize?` | **List memories.** List the current memories of a project, one page at a time: { items, total, page, pageSize, pages } where each item is { id, title, category, tags, version, supersededById, validUntil, updatedAt } — without the markdown `content`. Superseded or expired memories are hidden unless includeSuperseded. Load a body with agentpack_memory_get. |
| `agentpack_memory_supersede` | write | destructive, idempotent | `id`, `replacementId?`, `replacement?`, `expectedVersion?` | **Supersede memory.** Invalidate an obsolete memory instead of deleting it: it points at its replacement and stops being valid now, so lists hide it. Pass replacementId (an existing current memory of the same project) or replacement { title, content, category, tags } to create it. Returns { superseded, replacement }. |
| `agentpack_memory_update` | write | destructive, idempotent | `id`, `title?`, `content?`, `category?`, `tags?`, `validUntil?`, `expectedVersion?` | **Update memory.** Update a memory's title, content, category, tags or validUntil; omitted fields keep their value and `tags` replaces the whole list. Pass expectedVersion (the version you read) to fail with VERSION_CONFLICT instead of overwriting someone else's save; the replaced state is kept in the history. Use agentpack_memory_supersede when the memory became obsolete. |
| `agentpack_project_context` | read | read-only, idempotent | `projectId` | **Get project context.** Get what an agent must know before working in a project: its ACTIVE skills, its rule and decision memories and its root knowledge pages, as summaries, plus mustRead (the reading order, each item with the tool that loads its body). Use it first when you join a project, then agentpack_task_get for a task. Fits in 20 KB: when something is left out, truncated is true and totals counts everything. |
| `agentpack_project_create` | write | — | `name`, `description?` | **Create project.** Create an AgentPack project and return its ID. Use before creating Render screens or a map; catalogs can be global. |
| `agentpack_project_get` | read | read-only, idempotent | `id` | **Get project.** Get a project by ID. Returns the full project row with counts and timestamps. |
| `agentpack_project_list` | read | read-only, idempotent | — | **List projects.** List the projects the caller reaches (all of them, or only the projects of an agent key). Returns the summary shape { id, name, description, tags, counts } — same fields as the REST list endpoint, no timestamps. |
| `agentpack_project_update` | write | destructive, idempotent | `projectId`, `name?`, `description?` | **Update project.** Rename a project or replace its description. Returns the updated projectId, name and description. |
| `agentpack_prompt_get` | read | read-only, idempotent | `id`, `offset?` | **Get agent prompt.** Get an agent prompt by ID with its markdown content, isActive and version (send it as expectedVersion on writes). A body over 12 KB comes truncated with contentTruncated, contentSize and contentNextOffset: call again with offset to read the rest. A prompt outside the projects you reach is not found. |
| `agentpack_prompt_list` | read | read-only, idempotent | `projectId`, `search?`, `tags?`, `isActive?`, `view?`, `page?`, `pageSize?` | **List agent prompts.** List the agent prompts of a project, one page at a time: { items, total, page, pageSize, pages } where each item is { id, name, description, tags, isActive, version, updatedAt } — without the markdown content. Only active prompts enter the agent context. Load a body with agentpack_prompt_get. |
| `agentpack_search` | read | read-only, idempotent | `q`, `projectId`, `types?`, `limit?`, `offset?` | **Search everything in a project.** One ranked search over a project's knowledge pages (body included), memories and tasks, plus the global skill and MCP catalogs. Returns { items, total, counts, limit, offset, hasMore }; each item has type (knowledge\|memory\|task\|skill\|prompt\|mcp), id, title, projectId, score and an escaped snippet with &lt;mark&gt; around matches. Load an item with the get tool of its type. Paginate with offset. |
| `agentpack_search_tools` | read | read-only, idempotent | `query`, `toolset?`, `limit?` | **Search tools.** Search every tool you may call by name, title and description, including tools of toolsets that are not enabled in this connection (active: false, e.g. render, github, tasks-admin). Use it before guessing a tool name or enabling a large toolset; then agentpack_describe_tool for the input schema. Returns name, title, toolset, active and a one-line summary, best match first. |

## `tasks`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_task_attachment_add` | write | — | `taskId`, `filename`, `mimeType`, `contentBase64`, `decisionId?` | **Attach file to task.** Attach a small file to an existing task as base64 (pdf, txt, md, csv, json, png, jpg or zip; the type follows the file extension). Pass decisionId when the file supports a human decision of this task. Prefer Knowledge for text that will be reread and edited. Returns the attachment metadata. |
| `agentpack_task_attachment_get` | read | read-only, idempotent | `taskId`, `attachmentId`, `offset?`, `maxBytes?` | **Read task attachment.** Read a task attachment. Text files (txt, md, csv, json) come as UTF-8 text in windows of 64 KB by default (maxBytes up to 200 KB): pass nextOffset as offset to continue. PNG and JPEG come as an image block, PDF and ZIP as contentBase64, up to 524288 bytes; a larger binary returns isError PAYLOAD_TOO_LARGE with the HTTP download path. |
| `agentpack_task_attachment_list` | read | read-only, idempotent | `taskId` | **List task attachments.** List the files attached to a task: id, filename, mimeType, size, sha256 checksum, decisionId (file that supports a human decision) and createdAt, without content. Read one with agentpack_task_attachment_get. |
| `agentpack_task_claim` | write | — | `taskId`, `agentId`, `ttlSeconds?` | **Claim task.** Claim a task for agentId with a lease of ttlSeconds, or renew your own lease; an expired lease counts as free. Fails with CONFLICT and details.reason CLAIM_HELD (another agent holds it), DEPENDENCY_OPEN or TASK_NOT_CLAIMABLE (gated or closed). Returns the task and the lease. |
| `agentpack_task_claim_next` | write | — | `projectId`, `agentId`, `ttlSeconds?` | **Claim next ready task.** Pick the first ready task of a project (same order as agentpack_task_next) and claim it for agentId with an expiring lease, skipping tasks another agent claims meanwhile. Returns { claimed: true, task, lease } or { claimed: false } when nothing is ready. |
| `agentpack_task_context_bundle` | read | read-only, idempotent | `taskId`, `budgetBytes?` | **Get task context bundle.** Call this before executing a task: one payload with the task, todos, decisions and gate, memory/skill/prompt/knowledge link summaries, attachment metadata with text attachments inlined, and mustRead (execution skills and prompts, constraint/decision memories, solution/reference knowledge, decision attachments) with the tool that reads each. Fits budgetBytes; the rest is in budget.omitted. |
| `agentpack_task_create` | write | — | `projectId`, `title`, `description?`, `status?`, `priority?`, `startAt?`, `endAt?`, `allDay?`, `tags?`, `decisions?`, `memoryLinks?`, `skillLinks?`, `knowledgeLinks?` | **Create task.** Create a task with its human decisions, planned dates and memory, skill and knowledge links in one atomic write: a link to a record missing from the project fails with VALIDATION_ERROR and nothing is saved. A required decision gates the task in awaiting_human_decision; awaiting_* needs one, done/cancelled cannot carry one. Returns the stored task with its decisions and links. |
| `agentpack_task_get` | read | read-only, idempotent | `id` | **Get task.** Get a task by ID: description, todos[], decisions[] (options and answers as arrays), attachment metadata, memoryLinks/skillLinks/knowledgeLinks (summaries only) and the latest 50 taskEvents (taskEventsTruncated: older ones exist, see agentpack_task_event_list). Before executing prefer agentpack_task_context_bundle; skill, memory and knowledge bodies come from their own get tools. |
| `agentpack_task_knowledge_list` | read | read-only, idempotent | `taskId` | **List task knowledge.** List the Knowledge pages linked to a task with relationType (reference, attachment, solution), title, summary, category, format and version, without the body. Read a page with agentpack_knowledge_get; link one with agentpack_knowledge_link_task. |
| `agentpack_task_list` | read | read-only, idempotent | `projectId`, `status?`, `priority?`, `search?`, `tags?` | **List tasks.** List up to 200 tasks of a project, most urgent first, then most recently updated. Returns the summary shape { id, title, status, priority, tags, todosCount, todosCompleted } — without the description body and without the per-task todo list. Use `agentpack_task_get` to load a specific task's description and todos. |
| `agentpack_task_memory_link` | write | idempotent | `taskId`, `memoryId`, `relationType?`, `note?` | **Link memory to task.** Link a Memory to a Task with context, decision, constraint, or outcome relation. |
| `agentpack_task_memory_list` | read | read-only, idempotent | `taskId` | **List task memories.** List Memories linked to a Task; call memory_get to read their content. |
| `agentpack_task_next` | read | read-only, idempotent | `projectId`, `limit?` | **Next ready tasks.** List the tasks of a project an agent can start now: status todo (no pending human decision), no active lease and every dependency done, most urgent first, then oldest. Read-only: take one with agentpack_task_claim, or use agentpack_task_claim_next to pick and claim in one call. |
| `agentpack_task_release` | write | destructive, idempotent | `taskId`, `agentId` | **Release task.** Give back the lease agentId holds on a task so another agent can take it; moving the task to done or cancelled releases it too. Fails with CONFLICT CLAIM_HELD when another agent holds an active lease. Returns { released } (false when agentId held nothing). |
| `agentpack_task_skill_link` | write | idempotent | `taskId`, `skillId`, `relationType?`, `note?` | **Link skill to task.** Link a Skill from the global catalog to a Task. relationType: 'execution' (default — read this skill BEFORE doing the work), 'reference' (optional support) or 'validation' (checklist to review the result). `skillId` accepts the skill id or its slug. Idempotent per (taskId, skillId, relationType): re-linking the same trio only updates the note. |
| `agentpack_task_skill_list` | read | read-only, idempotent | `taskId` | **List task skills.** List Skills linked to a Task with their relationType. Returns only the skill summary (id, slug, name, description, tags) — never the markdown body; call agentpack_skill_get with the id to load the content of the ones you will follow. |
| `agentpack_task_timeline_list` | read | read-only, idempotent | `projectId`, `from?`, `to?`, `includeUnscheduled?`, `unscheduledLimit?` | **List project timeline.** List the roadmap of a project: tasks whose planned dates overlap the window (default today-30d to today+90d; at most 366 days), by start date, with status, priority, todo progress and dependsOnIds; includeUnscheduled adds tasks without dates. truncated: more than fits, so narrow from/to. Plan dates with agentpack_task_update (startAt, endAt). |
| `agentpack_task_update` | write | destructive, idempotent | `id`, `title?`, `description?`, `status?`, `priority?`, `tags?`, `startAt?`, `endAt?`, `allDay?` | **Update task.** Update a task; startAt/endAt replan it (null clears). Status changes follow the HITL state machine: while a required decision is pending the task can only move between awaiting_human_decision, awaiting_more_information and cancelled (blocked, todo, in_progress and done are refused), and awaiting_* is refused without one (see gate in agentpack_task_context_bundle). Returns the updated task. |
| `agentpack_todo_create` | write | — | `taskId`, `title`, `order?` | **Create todo.** Add a todo (checklist item) to a task. Omit `order` to append it after the last todo (positions start at 1). Returns the created todo; mark it done later with agentpack_todo_update. |
| `agentpack_todo_update` | write | destructive, idempotent | `id`, `title?`, `isCompleted?`, `order?` | **Update todo.** Update a todo's title, completion flag (`isCompleted`) or order; omitted fields keep their value. Returns the updated todo, or an error when the ID does not exist. |

## `knowledge`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_knowledge_ancestors` | read | read-only, idempotent | `projectId`, `knowledgeId` | **Get knowledge ancestors.** Get the breadcrumb path (root → parent) for a knowledge page. Returns { items } with the ancestors' summaries (no full HTML), from the root down to (but excluding) the leaf. |
| `agentpack_knowledge_children` | read | read-only, idempotent | `projectId`, `parentId`, `page?`, `pageSize?` | **List knowledge children.** List direct children of a knowledge page (1 level), in their manual order. Pass parentId='root' to list root-level pages of a project. Returns { items, total, page, pageSize, pages } with summaries (no full HTML). |
| `agentpack_knowledge_create` | write | — | `projectId`, `title`, `summary?`, `content?`, `format?`, `category?`, `parentId?`, `scope?`, `demandId?`, `tags?`, `order?` | **Create knowledge page.** Create a knowledge page in the project's knowledge base. `format`: 'markdown' (default choice, themed by the app) or 'html' (Tailwind; follow the app theme with `dark:` variants, never fixed light or dark colors). `parentId` nests it under another page (up to 10 levels). Link another page with `[text](knowledge:ID)` or `&lt;a href="knowledge:ID"&gt;`. Details: skill agentpack-knowledge-html. |
| `agentpack_knowledge_descendants` | read | read-only, idempotent | `projectId`, `knowledgeId`, `page?`, `pageSize?` | **Get knowledge descendants.** Get the subtree (descendants at all depths) of a knowledge page in tree order (depth-first, siblings in their manual order). Returns { items, total, page, pageSize, pages } with summaries (no full HTML). |
| `agentpack_knowledge_get` | read | read-only, idempotent | `id` | **Get knowledge page.** Get a knowledge page by ID. Returns the FULL row including the `content` body, which is HTML or Markdown according to `format`. HTML is rendered sandboxed in the UI (iframe srcdoc) with Tailwind injected — use it for landing pages, storytelling, timelines, etc. |
| `agentpack_knowledge_link_task` | write | idempotent | `knowledgeId`, `taskId`, `relationType?` | **Link knowledge to task.** Link a knowledge page to a Task (demand) — creates a N:N KnowledgeTicketLink entry. The task must belong to the page's project (INVALID_TASK otherwise). relationType: 'reference' (default), 'attachment', or 'solution'. Idempotent: re-running with same (knowledgeId, taskId) updates the relationType. |
| `agentpack_knowledge_list` | read | read-only, idempotent | `projectId`, `category?`, `tags?`, `search?`, `page?`, `pageSize?` | **List knowledge pages.** List knowledge pages for a project, one page of results at a time. Returns { items, total, page, pageSize, pages } where each item is the summary shape { id, title, summary, category, tags } — without the `content` body. Use `agentpack_knowledge_get` to load a specific page's full content, and `agentpack_knowledge_search` for ranked search. |
| `agentpack_knowledge_update` | write | destructive, idempotent | `id`, `title?`, `summary?`, `content?`, `format?`, `category?`, `parentId?`, `tags?`, `order?`, `expectedVersion?` | **Update knowledge page.** Update an existing knowledge page. Pass `format` ('markdown'\|'html') when changing the body kind. Same theming/linking rules as knowledge_create apply. Pass `parentId` to re-nest (null = move to root). Title/summary/content/format changes archive the old state as a version; pass `expectedVersion` (the `version` you read) to get VERSION_CONFLICT instead of overwriting a newer save. |

## `skills`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_project_skill_add` | write | — | `projectId`, `skillId`, `isActive?` | **Add skill to project.** Activate a skill from the global catalog in a project by creating the project↔skill link. Returns the link { id, skillId, isActive, addedAt }, or an error when the skill is already linked or the project or skill does not exist. |
| `agentpack_project_skill_list` | read | read-only, idempotent | `projectId`, `activeOnly?` | **List project skills.** List the skills linked to a project, with isActive. By default only the active ones, which are the skills an agent must follow there; activeOnly=false includes the disabled links. Returns summaries { id, slug, name, description, tags, isActive, addedAt }; load a body with agentpack_skill_get. For the whole global catalog use agentpack_skill_list. |
| `agentpack_project_skill_toggle` | write | destructive, idempotent | `projectId`, `skillId`, `isActive` | **Toggle project skill.** Enable or disable a skill already linked to a project without removing the link. Returns the link { id, skillId, isActive, addedAt }, or an error when the link does not exist. |
| `agentpack_skill_create` | write | — | `slug`, `name`, `description`, `content?`, `author?`, `version?`, `tags?` | **Create skill.** Create a skill in the global catalog from its SKILL.md body. slug is the Agent Skills name (1-64 lowercase letters, digits and single hyphens) and must be unique; description (1-1024 characters) says what the skill does and when to use it. To bring a SKILL.md from GitHub, a URL or pasted text use agentpack_skill_import. Returns the created skill. |
| `agentpack_skill_duplicate` | write | — | `id`, `slug?`, `name?` | **Duplicate skill.** Copy a skill (body, files and metadata) into a new editable skill with source local. This is how a built-in skill is customized: built-in skills are read-only. Default slug &lt;slug&gt;-custom and name "&lt;name&gt; (cópia)". Returns the new skill. |
| `agentpack_skill_file_get` | read | read-only, idempotent | `id`, `path`, `offset?`, `limit?` | **Get skill file.** Read one file of a skill on demand: a path from files[] of agentpack_skill_get (scripts, references, assets) or SKILL.md for the body. Use it instead of loading every file. Large files come in chunks: call again with offset = nextOffset until it is null. Returns { path, mimeType, encoding (utf-8 or base64), size, offset, length, nextOffset, content }. |
| `agentpack_skill_get` | read | read-only, idempotent | `id` | **Get skill.** Get a skill by ID or slug: its metadata, the markdown `content` (SKILL.md body) and `files`, the list of auxiliary files (path, size, mimeType) without their content. Use it after agentpack_skill_list to load a skill you will follow, then agentpack_skill_file_get to read only the files you need. A body over 12 KB comes truncated (contentTruncated, contentHint). |
| `agentpack_skill_list` | read | read-only, idempotent | `search?`, `source?` | **List skills.** List skills in the global catalog. Returns ONLY { id, slug, description, tags } — never the full content (use agentpack_skill_get to fetch the body of a specific skill). This keeps the response small enough to fit in the agent's context window when many skills are present. |
| `agentpack_skill_update` | write | destructive, idempotent | `id`, `name?`, `description?`, `content?`, `author?`, `version?`, `tags?` | **Update skill.** Update a skill's name, description, content, author, version or tags; omitted fields keep their value and `tags` replaces the list. Every change is a new version (skills-history toolset). Built-in skills are read-only: the call fails with reason duplicate_to_customize (use agentpack_skill_duplicate). Returns the updated skill, or an error when the ID or slug does not exist. |

## `decisions`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_task_decision_cancel` | write | destructive, idempotent | `taskId`, `decisionId`, `reason` | **Cancel task decision.** Close an open human decision without an answer, with a mandatory reason, and recompute the task gate. Agents can cancel only optional decisions: cancelling a required one releases the task, so it is done by a signed-in person and this tool returns isError with the decision screen URL instead. To fix a wrongly asked decision use agentpack_task_decision_supersede. |
| `agentpack_task_decision_create` | write | — | `taskId`, `key`, `position?`, `question`, `context`, `recommendation?`, `required?`, `selectionType?`, `minSelections?`, `maxSelections?`, `options` | **Create task decision.** Create a structured human decision. A required decision moves an open task (todo, in_progress, blocked) to awaiting_human_decision and is refused on done/cancelled tasks; an optional one never changes the status. Use selectionType multiple with min/maxSelections for checkbox-style questions. |
| `agentpack_task_decision_list` | read | read-only, idempotent | `taskId`, `status?` | **List task decisions.** List structured decisions and their response status for a task. |
| `agentpack_task_decision_respond` | read | read-only, idempotent | `decisionId` | **Hand a task decision to the human.** Agents cannot answer human decisions: only a signed-in person does it on the task's decision screen in the AgentPack UI. This tool never records an answer; it always returns isError with the URL of that screen, so hand the link to the human, wait, and read the answer later with agentpack_task_decision_list. |
| `agentpack_task_decision_supersede` | write | destructive | `taskId`, `decisionId`, `reason`, `decision` | **Supersede task decision.** Replace an open human decision that was asked wrong with a corrected one: the old decision becomes superseded (with the reason) and points to the new one, which needs a new key. The replacement of a required decision must be required too, so the task stays gated. Returns the task status, the pending decision ids and both decisions. |
| `agentpack_task_request_more_information` | read | read-only, idempotent | `taskId` | **Hand a more-information request to the human.** Asking for more information is a human action taken on the task's decision screen in the AgentPack UI. This tool never changes the task; it always returns isError with the URL of that screen for the human. When a task is already in awaiting_more_information, enrich it and call agentpack_task_return_to_decision. |
| `agentpack_task_return_to_decision` | write | — | `taskId`, `context?` | **Return task to decision.** After enriching a more-information task, return it to the human decision queue. |

## `core-admin`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_audit_list` | read | read-only, idempotent | `projectId?`, `actorType?`, `actorId?`, `source?`, `entity?`, `entityId?`, `action?`, `requestId?`, `from?`, `to?`, `page?`, `pageSize?` | **List audit events.** List the audit trail of REST and MCP writes, newest first: { items, total, page, pageSize, pages }. Each item has createdAt, projectId, actorType/actorId, client, source (rest\|mcp\|system), entity/entityId/action, diff (the write input, secrets redacted) and requestId. Filter by projectId, actor, source, entity, entityId, action, requestId or from/to (ISO 8601). An agent key sees only its projects. |
| `agentpack_memory_delete` | write | destructive, idempotent | `id`, `expectedVersion?` | **Delete memory.** Move a memory to the project's memory trash: it disappears from lists and reads but keeps its history and can be brought back with agentpack_memory_restore. Prefer agentpack_memory_supersede when the memory is only outdated. Returns { deleted: true }. |
| `agentpack_memory_restore` | write | destructive, idempotent | `id` | **Restore deleted memory.** Bring a deleted memory back from the project's memory trash, with its content and history. Fails with NOT_IN_TRASH when the memory is not deleted. Returns the restored memory. |
| `agentpack_memory_version_get` | read | read-only, idempotent | `id`, `version` | **Get memory version.** Get one previous version of a memory with its full title, content, category and tags. Compare it with agentpack_memory_get before bringing it back with agentpack_memory_update. |
| `agentpack_memory_versions_list` | read | read-only, idempotent | `id`, `page?`, `pageSize?` | **List memory versions.** List the previous versions of a memory, newest first, without their content: each save that changed title, content, category or tags archived the replaced state with who saved (actorType, actorId, source) and when. Read one with agentpack_memory_version_get. |
| `agentpack_project_delete` | write | destructive, idempotent | `projectId` | **Delete project.** Move a project to the trash: it disappears at once and can be restored for 30 days (POST /api/projects/:id/restore). After that the purge deletes it with everything under it (screens, revisions, map, project-scoped catalogs, files) and releases the RenderPort rows that block deleting a global design system. |

## `tasks-admin`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_task_delete` | write | destructive, idempotent | `id` | **Delete task.** Permanently delete a task together with its todos. Irreversible: to close a task prefer agentpack_task_update with status done or cancelled. Returns { deleted: true }, or an error when the ID does not exist. |
| `agentpack_task_dependency_add` | write | idempotent | `taskId`, `dependsOnId` | **Add task dependency.** Make a task wait for another task of the same project: it is not ready (task_next, task_claim) until dependsOnId is done. A self-dependency, another project or a cycle fails with VALIDATION_ERROR; repeating an existing dependency changes nothing. Returns the dependency with the other task's status. |
| `agentpack_task_dependency_list` | read | read-only, idempotent | `taskId` | **List task dependencies.** List what a task waits for (dependsOn) and who waits for it (dependents), each with its status and a satisfied flag. openDependencyIds and ready tell whether anything still holds the task. |
| `agentpack_task_dependency_remove` | write | destructive, idempotent | `taskId`, `dependsOnId` | **Remove task dependency.** Remove the dependency of a task on another task, so it no longer waits for it. Fails with NOT_FOUND when the dependency does not exist. Returns { removed: true }. |
| `agentpack_task_event_list` | read | read-only, idempotent | `taskId`, `cursor?`, `limit?`, `order?` | **List task history.** List the history of a task, newest first: creation, edits, status changes (from/to, including the automatic HITL moves), decisions, attachments and memory/skill/knowledge links, each with its actor and source. Returns { items, total, nextCursor }; pass nextCursor as cursor to read the next page. |
| `agentpack_task_prompt_unlink` | write | destructive, idempotent | `taskId`, `promptId`, `relationType?` | **Unlink agent prompt from task.** Remove one Task&lt;-&gt;Prompt link. The relationType is part of the key, so pass the same one used to link (default 'execution'); the other relations of the same prompt stay. Errors when the link does not exist. |
| `agentpack_task_skill_unlink` | write | destructive, idempotent | `taskId`, `skillId`, `relationType?` | **Unlink skill from task.** Remove one Task&lt;-&gt;Skill link. The relationType is part of the key, so pass the same one used to link (default 'execution'); the other relations of the same skill stay. Errors when the link does not exist. |
| `agentpack_todo_delete` | write | destructive, idempotent | `id` | **Delete todo.** Permanently delete a todo from its task. Irreversible. Returns { deleted: true }, or an error when the ID does not exist. |

## `knowledge-admin`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_knowledge_delete` | write | destructive, idempotent | `id` | **Delete knowledge page.** Permanently delete a knowledge page by ID. Irreversible: prefer agentpack_knowledge_update to rewrite an outdated page. Returns { deleted: true }, or an error when the ID does not exist. |
| `agentpack_knowledge_move` | write | destructive, idempotent | `projectId`, `knowledgeId`, `newParentId`, `position?` | **Move knowledge page.** Move a knowledge page (with its subpages) to a new parent in the hierarchy, optionally at a position among the new siblings. Pass newParentId=null to make it root-level. Fails with INVALID_PARENT when the move would create a cycle (new parent inside the page's own subtree), exceed 10 levels, or use a parent in the trash or in another project. Returns the moved page. |
| `agentpack_knowledge_restore_version` | write | destructive, idempotent | `id`, `version`, `expectedVersion?` | **Restore knowledge version.** Restore a previous version of a knowledge page: its title, summary, content and format become a NEW version, and the current state is archived in the history first, so nothing is lost. Pass `expectedVersion` (the page version you read) to fail with VERSION_CONFLICT if someone saved in between. Returns the updated page. |
| `agentpack_knowledge_unlink_task` | write | destructive, idempotent | `knowledgeId`, `taskId` | **Unlink knowledge from task.** Remove the link between a knowledge page and a Task (demand). Idempotent. |
| `agentpack_knowledge_version_get` | read | read-only, idempotent | `id`, `version` | **Get knowledge version.** Get one previous version of a knowledge page with its full title, summary, content and format. Compare it with agentpack_knowledge_get before calling agentpack_knowledge_restore_version. |
| `agentpack_knowledge_versions_list` | read | read-only, idempotent | `id`, `page?`, `pageSize?` | **List knowledge versions.** List the previous versions of a knowledge page, newest first, without their content. Every save that changes title, summary, content or format archives the replaced state here; the page itself is `currentVersion`. Read one with agentpack_knowledge_version_get and bring it back with agentpack_knowledge_restore_version. |

## `skills-admin`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_project_skill_remove` | write | destructive, idempotent | `projectId`, `skillId` | **Remove skill from project.** Remove a skill from a project by deleting the project↔skill link; the skill itself stays in the global catalog. Returns { removed: true }, or an error when the link does not exist. |
| `agentpack_skill_delete` | write | destructive, idempotent | `id` | **Delete skill.** Permanently delete a skill and its version history from the global catalog, which also removes it from every project and task that uses it. Irreversible. Built-in skills cannot be deleted (reason duplicate_to_customize). Returns { deleted: true }, or an error when the ID or slug does not exist. |
| `agentpack_skill_export` | read | read-only, idempotent | `id`, `offset?`, `limit?` | **Export skill.** Export a skill as an Agent Skills folder (&lt;slug&gt;/SKILL.md plus files) to install it in Claude Code, Codex or another client, e.g. under .claude/skills/. Returns the full SKILL.md with the frontmatter regenerated from the skill (in chunks: call again with offset = skillMd.nextOffset until it is null), files[] to read with agentpack_skill_file_get, the contentHash and the REST path of the .zip. |
| `agentpack_skill_import` | write | destructive, open-world | `source`, `repo?`, `skill?`, `ref?`, `url?`, `content?`, `slug?`, `force?`, `dryRun?` | **Import skill.** Import a skill from GitHub (owner/repo + skill folder, optional ref), a SKILL.md URL or pasted content, validating its frontmatter against the Agent Skills spec. dryRun=true only previews (parsed fields, validation, create/upgrade) without writing. A newer version upgrades the existing slug; force=true overwrites it anyway. Returns { action, skill, files: { imported, skipped, kept } }. |

## `skills-history`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_skill_version_get` | read | read-only, idempotent | `id`, `number` | **Get skill version.** Get one version of a skill by number (from agentpack_skill_version_list): its metadata, contentHash, the SKILL.md body as it was (over 12 KB comes truncated, contentTruncated) and files[] without content. Use it to compare with the current skill before agentpack_skill_version_restore. |
| `agentpack_skill_version_list` | read | read-only, idempotent | `id`, `page?`, `pageSize?` | **List skill versions.** List the append-only history of a skill, newest first: every write that changed its package (create, update, import, seed, file upload, restore, duplicate) is a numbered version. Returns { items: [{ number, origin, restoredFrom, contentHash, source, slug, name, version, createdAt }], total } without the content; read one with agentpack_skill_version_get. |
| `agentpack_skill_version_restore` | write | destructive, idempotent | `id`, `number` | **Restore skill version.** Bring a skill back to the package of an earlier version. The history is never rewritten: the restore is appended as a new version (origin restore). Built-in skills cannot be restored (duplicate them first). Returns the updated skill. |

## `prompts`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_prompt_create` | write | — | `projectId`, `name`, `content?`, `description?`, `tags?`, `isActive?` | **Create agent prompt.** Create an agent prompt in a project: an instruction text in markdown that agents read before working (briefings, checklists, handover templates). Search with agentpack_prompt_list first and update an existing prompt instead of duplicating it. Content is limited to 200 KB. Returns the created prompt. |
| `agentpack_prompt_duplicate` | write | — | `projectId`, `promptId`, `name?` | **Duplicate agent prompt.** Copy an agent prompt of your project into a new editable prompt (same project). This is how a prompt is reused with changes without touching the original. Default name keeps the original with a copy mark. Returns the created prompt. |
| `agentpack_prompt_update` | write | destructive, idempotent | `projectId`, `promptId`, `name?`, `description?`, `content?`, `tags?`, `isActive?`, `expectedVersion?` | **Update agent prompt.** Update an agent prompt's name, description, content, tags or isActive; omitted fields keep their value and tags replaces the whole list. Pass expectedVersion (the version you read) to fail with VERSION_CONFLICT instead of overwriting someone else's save; the replaced state is kept in the history. |
| `agentpack_task_prompt_link` | write | idempotent | `taskId`, `promptId`, `relationType?`, `note?` | **Link agent prompt to task.** Link an agent prompt of the SAME project to a Task. relationType: 'execution' (default — read this prompt BEFORE doing the work), 'reference' (optional support) or 'validation' (checklist to review the result). A prompt of another project is refused, like an unknown id. Idempotent per (taskId, promptId, relationType): re-linking the same trio only updates the note. |
| `agentpack_task_prompt_list` | read | read-only, idempotent | `taskId` | **List task agent prompts.** List the agent prompts linked to a Task with their relationType. Returns only the prompt summary (id, name, description, tags, isActive, version) — never the markdown body; call agentpack_prompt_get with the id to load the content of the ones you will follow. |

## `prompts-admin`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_prompt_delete` | write | destructive, idempotent | `projectId`, `promptId` | **Delete agent prompt.** Move an agent prompt to the project's prompt trash: it disappears from lists and reads but keeps its history, and comes back with agentpack_prompt_restore. Send the projectId explicitly. Returns { deleted: true }, or an error when the ID does not exist. |
| `agentpack_prompt_restore` | write | destructive, idempotent | `projectId`, `promptId` | **Restore agent prompt from trash.** Bring a prompt back from the project's prompt trash: it returns to the lists and to the agent context, with the name, content and version it had when it was deleted. Errors with NOT_IN_TRASH when the prompt is still active. |

## `prompts-history`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_prompt_version_get` | read | read-only, idempotent | `projectId`, `promptId`, `version` | **Get agent prompt version.** Get one replaced state of an agent prompt by version (from agentpack_prompt_version_list): its name, description, full content, tags, isActive and who saved it (actorType, actorId, source). Compare it with agentpack_prompt_get before bringing it back with agentpack_prompt_version_restore. |
| `agentpack_prompt_version_list` | read | read-only, idempotent | `projectId`, `promptId`, `page?`, `pageSize?` | **List agent prompt versions.** List the append-only history of an agent prompt, newest first: every write that changed it archived the replaced state with who saved (actorType, actorId, source) and when. Returns { currentVersion, items, total, page, pageSize, pages } without the content; read one with agentpack_prompt_version_get. |
| `agentpack_prompt_version_restore` | write | destructive, idempotent | `projectId`, `promptId`, `version`, `expectedVersion?` | **Restore agent prompt version.** Bring an agent prompt back to the name, description, content, tags and isActive of an earlier version. The history is never rewritten: the restore is appended as a new version. There is no last-write-wins: send the version you read as expectedVersion. Returns the updated prompt. |

## `render`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_render_component_apply` | render:write | destructive, idempotent | `target`, `operations`, `expectedVersion`, `dryRun?` | **Edit components.** Apply an atomic batch of component operations (create, patch, set_template, upsert_story, rename, remove...) to a materialized catalog or a design system (target), compare-and-swap on expectedVersion. Fields per op: render_help topic "operations". |
| `agentpack_render_component_get` | read | read-only, idempotent | `target`, `name`, `includeUsage?`, `projection?` | **Read component.** Read one component in full (props, template, presets, stories) from a materialized catalog or a design system (target), with the version for render_component_apply. projection "compact" drops labels, descriptions, stories and presets; summary.bytes is the size. |
| `agentpack_render_component_instantiate` | read | read-only, idempotent | `scope`, `projectId?`, `name`, `props?`, `key?` | **Instantiate component.** Build a ready-to-insert screen node for a component of the materialized catalog: props with defaults, styleKeys (exactly what goes in the screen styles list), classes (informative) and needs. Writes nothing. |
| `agentpack_render_component_list` | read | read-only, idempotent | `target`, `page?`, `pageSize?`, `search?`, `includeTemplates?`, `projection?` | **List components.** List components of a materialized catalog or a design system (target) as summaries: props, presets, stories, group, plus the version for the next write. Paginated; search matches name, title and description. projection "compact" drops the text fields; summary.bytes is the page size. |
| `agentpack_render_design_system_apply` | render:write | destructive, idempotent | `designSystemId`, `targetProjectId`, `conflictPolicy?`, `expectedSourceVersion?`, `sourceVersion?`, `expectedTargetVersions?`, `dryRun?`, `actor?` | **Apply design system to project.** Materialize a design system into a project: independent ui/tokens (and manifest) copies that screens read, plus RenderPort audit, atomically. Uses the latest publication (or sourceVersion); overwrite needs expectedTargetVersions. Overwriting a project that already received this system is an upgrade: APPROVAL_REQUIRED, use render_design_system_upgrade. |
| `agentpack_render_design_system_list` | read | read-only, idempotent | `scope`, `projectId?`, `page?`, `pageSize?`, `search?` | **List design systems.** List design systems (reusable source kits) in the global catalog or one project, with component/style/token counts. Screens only see a system after render_design_system_apply. Paginated. |
| `agentpack_render_design_system_screenshot` | read | read-only, idempotent | `id`, `component`, `story?`, `theme?`, `transparent?` | **Screenshot component.** Take a PNG of one design-system component and return it as an image to LOOK AT, plus the preview URL. When nothing was painted (e.g. css-failed) there is no image, only the reason. States: render_help topic "screens". |
| `agentpack_render_help` | read | read-only, idempotent | `topic?` | **Render help.** Start here: the Render workflow, toolsets and conflict rules (topic overview), or one topic: screens, catalog, systems, operations (fields of every op), formats, security, transfer. Loads no documents. |
| `agentpack_render_node_apply` | render:write | destructive, idempotent | `projectId`, `baseKey`, `theme`, `operations`, `expectedRev`, `dryRun?`, `actor?` | **Edit screen nodes.** Apply an atomic batch of node operations (insert, update_props, remove_props, text, replace, move, duplicate, remove) to one screen variant by stable keys, compare-and-swap on expectedRev. Fields per op: render_help topic "operations". |
| `agentpack_render_screen_compose` | render:write | — | `projectId`, `baseKey`, `title`, `family?`, `route?`, `width?`, `height?`, `components`, `layout?`, `columns?`, `dark?`, `page?`, `dryRun?`, `actor?` | **Compose screen.** Create a project screen from component names in one call: instantiates each with catalog defaults, fills styles with their styleKeys, stacks or grids them, places light (and dark) artboards on the map. Returns preview URLs and warnings. |
| `agentpack_render_screen_create` | render:write | — | `projectId`, `baseKey`, `title`, `family?`, `route?`, `width?`, `height?`, `light`, `dark?`, `dryRun?`, `actor?` | **Create screen.** Create a project screen with a light tree (and optional dark). styles lists library rule keys (styleKeys from render_component_instantiate), never Tailwind classes. Returns warnings for unknown components or styles. |
| `agentpack_render_screen_get` | read | read-only, idempotent | `projectId`, `baseKey`, `projection?`, `depth?`, `nodeKey?`, `theme?` | **Read screen.** Read one project screen: summary by default; outline or full return trees, optionally only the subtree at nodeKey, trimmed to depth. |
| `agentpack_render_screen_list` | read | read-only, idempotent | `projectId`, `page?`, `pageSize?`, `search?` | **List screens.** List the screens of a project with compact per-variant summaries (revs, node counts). Paginated; search matches key and title. |
| `agentpack_render_screen_screenshot` | read | read-only, idempotent | `projectId`, `baseKey`, `theme?` | **Screenshot screen.** Take a PNG of one project screen at its stored size and return it as an image to LOOK AT. No image when nothing was painted (reason and state say why). Compare theme with requestedTheme. States: render_help topic "screens". |
| `agentpack_render_screen_update` | render:write | destructive, idempotent | `projectId`, `baseKey`, `metadata?`, `theme?`, `tree?`, `styles?`, `expectedRev?`, `expectedDesignRev?`, `dryRun?`, `actor?` | **Update screen.** Update a project screen: a metadata patch (expectedDesignRev) and/or one variant tree/styles (expectedRev; 0 creates the variant). Rewriting light recomputes the dark delta. For small edits prefer render_node_apply. |
| `agentpack_render_style_apply` | render:write | destructive, idempotent | `target`, `operations`, `expectedVersion`, `dryRun?` | **Edit style rules.** Apply an atomic batch of style operations (create, update, upsert, remove, rename, copy) to a materialized catalog or a design system (target). Values may use $token refs. Prefer Tailwind cls on templates for plain layout. |
| `agentpack_render_style_list` | read | read-only, idempotent | `target`, `page?`, `pageSize?`, `search?`, `includeSx?` | **List style rules.** List the style rules (key, selector, dark flag, declaration names) of a materialized catalog or a design system (target), plus the version for the next write. Paginated; search matches the key. |
| `agentpack_render_token_apply` | render:write | destructive, idempotent | `target`, `operations`, `expectedVersion`, `dryRun?` | **Edit tokens.** Apply an atomic batch of token operations (create, update, set, remove, rename, copy) to a materialized catalog or a design system (target). Create a token before the style that references it. |
| `agentpack_render_token_list` | read | read-only, idempotent | `target`, `page?`, `pageSize?`, `search?` | **List tokens.** List token leaves (dotted path + value) of a materialized catalog or a design system (target), plus the version for the next write. Paginated; search matches the path. |
| `agentpack_render_validate` | read | read-only, idempotent | `scope`, `projectId?`, `kind?` | **Validate catalog.** Validate a materialized catalog and its screens without writing: schemas, refs, cycles, tokens, contract and security steps. Returns { valid, problems }; valid=false is a finished check, not an error. Run before wiring screens. |

## `render-admin`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_render_asset_delete` | render:write | destructive, idempotent | `scope`, `projectId?`, `id` | **Delete asset.** Delete an asset row and its stored file. Ownership follows the design scope. Reports fileCleanup (removed\|missing\|failed) so a surviving file is never hidden. |
| `agentpack_render_asset_get` | read | read-only, idempotent | `scope`, `projectId?`, `id?`, `storageKey?`, `includeData?`, `maxAssetBytes?` | **Read asset.** Get one asset by id or storageKey (exactly one). Returns metadata by default; set includeData to also load the base64 bytes (size-capped). Ownership follows the design scope — foreign assets read as NOT_FOUND. The returned REST bytes url retains scope/projectId; do not drop that query. |
| `agentpack_render_asset_list` | read | read-only, idempotent | `scope`, `projectId?`, `page?`, `pageSize?`, `search?`, `designBaseKey?` | **List assets.** List asset metadata in a scope (never bytes). Optionally filter by owning screen or filename. Paginated, newest first. Each url is the REST bytes endpoint with its scope/projectId query; retain the query when opening it. |
| `agentpack_render_asset_upload` | render:write | — | `scope`, `projectId?`, `designBaseKey`, `filename`, `mimeType`, `dataBase64`, `checksum?`, `actor?` | **Upload asset.** Upload one asset from base64 bytes to a screen in the target scope. MIME-typed (web rasters, passive SVG (no scripts, event handlers, foreignObject, animation, external references or DTDs), font binaries), size-capped, SHA256-checksummed; the storageKey is generated server-side. The owning design must exist in the scope — otherwise the staged file is removed and nothing is stored. |
| `agentpack_render_bundle_export` | read | read-only, idempotent | `scope`, `projectId?`, `includeAssetBytes?`, `maxAssetBytes?` | **Export bundle.** Export a scope (effective libraries, screens, asset metadata; bytes only with includeAssetBytes) as a render/2 artifact and return its id and counts, not the bundle. Download with render_bundle_read or import with fromExport; it expires in 24 h. |
| `agentpack_render_bundle_import` | render:write | destructive, idempotent | `scope`, `projectId?`, `bundle?`, `fromExport?`, `conflictPolicy?`, `expectedVersions?`, `dryRun?`, `actor?` | **Import bundle.** Import a bundle (screens, catalog libraries, asset bytes) into the global catalog or a project in one validated transaction. Pass fromExport (an export id) or an inline bundle. dryRun never fails on a conflict: it returns the plan, conflicts[] and requiredToOverwrite. |
| `agentpack_render_bundle_read` | read | read-only, idempotent | `exportId`, `scope`, `projectId?`, `offset?`, `length?` | **Read export artifact.** Download one page of an export artifact of render_bundle_export (its JSON text, by character offset). Repeat with nextOffset until done; the pages concatenated are the bundle, checked by sha256. |
| `agentpack_render_component_extract` | render:write | destructive, idempotent | `projectId`, `baseKey`, `theme?`, `key`, `name`, `description?`, `expectedRev`, `expectedVersion`, `replaceWithInstance?`, `dryRun?`, `actor?` | **Extract component from screen.** Turn a screen subtree into a component of the project catalog and, by default, replace it with an instance, in one transaction. Needs the screen expectedRev and the ui expectedVersion. Add props and stories afterwards with render_component_apply. |
| `agentpack_render_design_system_component_view` | read | read-only, idempotent | `id`, `component`, `story?`, `theme?`, `transparent?` | **Component preview URLs.** Return the URLs of one design-system component: the clean preview page and the Studio editor. Captures no image: use render_design_system_screenshot to look at it. |
| `agentpack_render_design_system_create` | render:write | — | `scope`, `projectId?`, `name`, `snapshot?`, `sourceDesignSystemId?`, `dryRun?` | **Create design system.** Create a design system in the global catalog or a project. Without snapshot it is seeded with the 64 starter-kit components and default tokens; sourceDesignSystemId clones another one. Rules: render_help topic "systems". |
| `agentpack_render_design_system_delete` | render:write | destructive, idempotent | `id`, `expectedVersion` | **Delete design system.** Delete a design system (expectedVersion required). Port audit rows survive. A global system with active ports is refused with PORT_LOCKED; details lists the projects holding them. |
| `agentpack_render_design_system_get` | read | read-only, idempotent | `id`, `includeSnapshot?` | **Read design system.** Read one design system: summary and version by default; includeSnapshot loads the full ui/tokens/manifest snapshot (large). |
| `agentpack_render_design_system_library_get` | read | read-only, idempotent | `id`, `kind` | **Read design-system library.** Read one whole library (ui or tokens) of a design-system snapshot as {kind, version, payload}. Large: prefer render_component_list/get with target { designSystemId }. |
| `agentpack_render_design_system_library_update` | render:write | destructive, idempotent | `id`, `kind`, `payload?`, `expectedVersion`, `dryRun?` | **Replace design-system library.** Replace one whole library (ui or tokens) of a design-system snapshot, keeping the rest; compare-and-swap on expectedVersion. dryRun runs every check and returns {wouldBeVersion, summary}. |
| `agentpack_render_design_system_publish` | render:write | — | `id`, `expectedVersion`, `notes?`, `dryRun?`, `actor?` | **Publish design system version.** Publish the draft of a design system as its next immutable version (compare-and-swap on expectedVersion). Projects that received it then see updateAvailable in render_design_system_status. An unchanged draft returns published:false. |
| `agentpack_render_design_system_starter_import` | render:write | destructive, idempotent | `id`, `names`, `conflictPolicy?`, `expectedVersion`, `dryRun?` | **Import starter-kit components.** Import starter-kit components into one design system, closing template dependencies (addedDependencies). A seeded system already has all 64: use conflictPolicy overwrite to refresh. Compare-and-swap on expectedVersion. |
| `agentpack_render_design_system_status` | read | read-only, idempotent | `projectId`, `designSystemId?` | **Design-system update status.** For each design system a project received: applied and latest published versions, updateAvailable and the diff (components, styles, token paths). Use before render_design_system_upgrade. |
| `agentpack_render_design_system_update` | render:write | destructive, idempotent | `id`, `expectedVersion`, `name?`, `snapshot?`, `dryRun?` | **Update design system.** Rename a design system and/or replace its whole draft snapshot, compare-and-swap on expectedVersion. Projects see edits only after render_design_system_publish. For one entry use render_component_apply with target { designSystemId }. |
| `agentpack_render_design_system_upgrade` | render:write | destructive, idempotent | `projectId`, `designSystemId`, `toVersion?`, `expectedTargetVersions?`, `decisionId?`, `dryRun?`, `actor?` | **Upgrade project design system.** Upgrade a project to a published version of a design system it received (overwrites its copies). dryRun returns diff, plan, pins and the human decision to open; the real run needs decisionId answered by a human. |
| `agentpack_render_history_diff` | read | read-only, idempotent | `projectId`, `baseKey`, `fromId`, `toId` | **Diff screen revisions.** Compare two screen revisions: tree changes (added, removed, updated, moved), metadata changes and styleChanges (stylesCompared false when a revision predates style recording). |
| `agentpack_render_history_get` | read | read-only, idempotent | `projectId`, `baseKey`, `revisionId`, `includeSnapshot?` | **Read screen revision.** Read one screen revision: marker, sizes and, with includeSnapshot, the previous tree. |
| `agentpack_render_history_list` | read | read-only, idempotent | `projectId`, `baseKey`, `page?`, `pageSize?`, `search?`, `theme?` | **List screen revisions.** List the revisions of a project screen, newest first, without snapshots. Paginated; optionally one variant. |
| `agentpack_render_history_pin` | render:write | idempotent | `projectId`, `baseKey`, `revisionId`, `pinned?` | **Pin screen revision.** Pin or unpin one screen revision. Pinned revisions survive the RENDER_REVISION_KEEP retention and do not count towards it; unpinning makes the revision prunable again from the next write of its variant. Idempotent. |
| `agentpack_render_history_restore` | render:write | destructive, idempotent | `projectId`, `baseKey`, `revisionId`, `expectedRev`, `expectedDesignRev?`, `dryRun?`, `actor?` | **Restore screen revision.** Restore a screen revision as a new write (new rev and revision): its tree plus the styles/metadata of its marker. expectedRev 0 restores a deleted variant; metadata needs expectedDesignRev. |
| `agentpack_render_library_get` | read | read-only, idempotent | `scope`, `projectId?`, `kind` | **Read catalog library.** Read one whole library (ui, tokens or manifest) of the materialized catalog with its version and scope resolution. Large: prefer the component/style/token reads. For a design system use render_design_system_library_get. |
| `agentpack_render_library_put` | render:write | destructive, idempotent | `scope`, `projectId?`, `kind`, `payload?`, `expectedVersion`, `dryRun?` | **Replace catalog library.** Replace a whole materialized library (ui, tokens or manifest), validated. expectedVersion 0 creates it (defaults when payload is omitted). To change one entry use the component/style/token apply tools instead. |
| `agentpack_render_map_apply` | render:write | destructive, idempotent | `projectId`, `expectedVersion`, `operations`, `dryRun?`, `actor?` | **Edit project map.** Apply map operations atomically (set_layout, set_pages, upsert/remove artboard or annotation), compare-and-swap on expectedVersion (0 creates the map). An artboard needs an existing page and screen variant. |
| `agentpack_render_map_get` | read | read-only, idempotent | `projectId` | **Read project map.** Read the project map (pages, artboards, annotations), never inherited from global. Version 0 means there is no map yet. |
| `agentpack_render_node_get` | read | read-only, idempotent | `projectId`, `baseKey`, `theme`, `key`, `depth?` | **Read node.** Read one node subtree of a screen variant by its stable key, trimmed to depth. |
| `agentpack_render_port` | render:write | destructive, idempotent | `targetProjectId`, `source`, `conflictPolicy?`, `expectedSourceVersion?`, `expectedTargetVersions?`, `expectedTargetVersion?`, `dryRun?`, `actor?`, `designSystemId?` | **Port into project.** Copy catalog content into a project, atomic and audited: a whole library, a selection with dependency closure, or a legacy global design. A global source is only read and becomes locked while ported. |
| `agentpack_render_port_list` | read | read-only, idempotent | `projectId`, `page?`, `pageSize?`, `sourceKind?` | **List ports.** List the port audit of a project, newest first. Paginated; optionally filter by source kind. |
| `agentpack_render_preview` | read | read-only, idempotent | `projectId`, `baseKey`, `theme?` | **Screen preview URLs.** Return the URLs of a project screen (editor url and clean preview page) plus size, revs and map position. Captures no image: use render_screen_screenshot to look at it. |
| `agentpack_render_screen_delete` | render:write | destructive, idempotent | `projectId`, `baseKey`, `expectedDesignRev` | **Delete screen.** Delete a project screen with its variants, history and map artboards (expectedDesignRev required). Refused while it still owns assets. Irreversible except from a bundle. |
| `agentpack_render_starter_kit_get` | read | read-only, idempotent | `name` | **Read starter-kit component.** Read one starter-kit component in full (template, props, stories). It is the built-in seed, with no version: import it with render_design_system_starter_import. |
| `agentpack_render_starter_kit_list` | read | read-only, idempotent | `page?`, `pageSize?`, `search?`, `includeTemplates?` | **List starter kit.** Browse the built-in starter kit (64 components) as summaries. Nothing here belongs to a design system until render_design_system_starter_import copies it. Paginated. |
| `agentpack_render_style_get` | read | read-only, idempotent | `target`, `key`, `includeUsage?` | **Read style rule.** Read one style rule (sel, sx, dark) by key ("sel" or "sel@dark") from a materialized catalog or a design system (target). |
| `agentpack_render_tailwind_compile` | read | read-only, idempotent | `scope`, `projectId?`, `classes` | **Compile Tailwind classes.** Compile Tailwind classes with the materialized tokens and return { css, hash, themeVersion, cssBytes }. Unknown classes compile to nothing: look for each class inside css. Writes nothing. |
| `agentpack_render_token_get` | read | read-only, idempotent | `target`, `path`, `includeUsage?` | **Read token.** Read one token by dotted path (e.g. color.primary.main) from a materialized catalog or a design system (target). |
| `agentpack_render_usage` | read | read-only, idempotent | `scope`, `projectId?`, `target` | **Trace usage.** Trace the consumers of one component, style or token of a materialized catalog: screens (with themes), templates and styles. Global scope covers inheriting projects. Check before remove or rename. |

## `github`

| Tool | Escopo | Dicas | Argumentos | Descrição |
| --- | --- | --- | --- | --- |
| `agentpack_github_add_discussion_comment` | github:write | open-world | `owner`, `repo`, `discussion_number`, `body` | **GitHub: Add discussion comment.** Add a comment to a discussion. |
| `agentpack_github_add_issue_comment` | github:write | open-world | `owner`, `repo`, `issue_number`, `body` | **GitHub: Add issue comment.** Add a comment to an issue or PR. |
| `agentpack_github_add_labels` | github:write | idempotent, open-world | `owner`, `repo`, `issue_number`, `labels` | **GitHub: Add labels.** Add labels to an issue without replacing the existing ones. |
| `agentpack_github_add_project_item` | github:write | open-world | `project_id`, `content_type`, `content_id` | **GitHub: Add project item.** Add an existing issue or PR to a Project V2. |
| `agentpack_github_assign_issue` | github:write | destructive, idempotent, open-world | `owner`, `repo`, `issue_number`, `assignees` | **GitHub: Assign issue.** Set the assignees on an issue, replacing the existing ones. |
| `agentpack_github_create_branch` | github:write | open-world | `owner`, `repo`, `branch`, `from_sha` | **GitHub: Create branch.** Create a new branch (a new git ref) pointing at an existing commit SHA. |
| `agentpack_github_create_discussion` | github:write | open-world | `owner`, `repo`, `category_id`, `title`, `body` | **GitHub: Create discussion.** Create a new discussion in a repository. |
| `agentpack_github_create_gist` | github:write | open-world | `description?`, `public?`, `files` | **GitHub: Create gist.** Create a new gist. The 'files' argument must be a JSON-encoded object {filename: {content: string}}. |
| `agentpack_github_create_issue` | github:write | open-world | `owner`, `repo`, `title`, `body?`, `labels?`, `assignees?` | **GitHub: Create issue.** Create a new issue on a repository. |
| `agentpack_github_create_pull_request` | github:write | open-world | `owner`, `repo`, `title`, `head`, `base`, `body?`, `draft?` | **GitHub: Create pull request.** Open a new pull request. |
| `agentpack_github_create_pull_request_review` | github:write | open-world | `owner`, `repo`, `pull_number`, `body?`, `event`, `comments?` | **GitHub: Create pull request review.** Submit a review on a pull request. |
| `agentpack_github_create_repository` | github:write | open-world | `name`, `description?`, `private?`, `auto_init?` | **GitHub: Create repository.** Create a new repository for the authenticated user. |
| `agentpack_github_delete_gist` | github:write | destructive, idempotent, open-world | `gist_id` | **GitHub: Delete gist.** Delete a gist. Irreversible. |
| `agentpack_github_download_workflow_logs` | read | read-only, idempotent, open-world | `owner`, `repo`, `run_id` | **GitHub: Download workflow logs.** Download the logs archive for a workflow run. Returns a redirect URL — caller must follow it. |
| `agentpack_github_get_branch` | read | read-only, idempotent, open-world | `owner`, `repo`, `branch` | **GitHub: Get branch.** Get a single branch by name. |
| `agentpack_github_get_code_scanning_alert` | read | read-only, idempotent, open-world | `owner`, `repo`, `alert_number` | **GitHub: Get code scanning alert.** Get a single Code Scanning alert by numeric alert number. |
| `agentpack_github_get_commit` | read | read-only, idempotent, open-world | `owner`, `repo`, `ref` | **GitHub: Get commit.** Get a single commit by SHA, with full diff and file stats. |
| `agentpack_github_get_discussion` | read | read-only, idempotent, open-world | `owner`, `repo`, `discussion_number` | **GitHub: Get discussion.** Get a single discussion by number. |
| `agentpack_github_get_discussion_comments` | read | read-only, idempotent, open-world | `owner`, `repo`, `discussion_number`, `per_page?`, `page?` | **GitHub: List discussion comments.** List comments on a discussion. |
| `agentpack_github_get_file_contents` | read | read-only, idempotent, open-world | `owner`, `repo`, `path`, `ref?` | **GitHub: Get file contents.** Get the contents of a file or directory at a path/ref. Returns base64-encoded content for files. |
| `agentpack_github_get_gist` | read | read-only, idempotent, open-world | `gist_id` | **GitHub: Get gist.** Get a single gist by ID. |
| `agentpack_github_get_issue` | read | read-only, idempotent, open-world | `owner`, `repo`, `issue_number` | **GitHub: Get issue.** Get a single issue by number. |
| `agentpack_github_get_latest_release` | read | read-only, idempotent, open-world | `owner`, `repo` | **GitHub: Get latest release.** Get the most recently published release (excluding drafts and prereleases). |
| `agentpack_github_get_me` | read | read-only, idempotent, open-world | — | **GitHub: Get authenticated user.** Get the authenticated user. |
| `agentpack_github_get_notification` | read | read-only, idempotent, open-world | `thread_id` | **GitHub: Get notification.** Get a single notification thread by ID. |
| `agentpack_github_get_org` | read | read-only, idempotent, open-world | `org` | **GitHub: Get org.** Get an organization by login. |
| `agentpack_github_get_project` | read | read-only, idempotent, open-world | `project_id` | **GitHub: Get project.** Get a single Project V2 by numeric ID. |
| `agentpack_github_get_pull_request` | read | read-only, idempotent, open-world | `owner`, `repo`, `pull_number` | **GitHub: Get pull request.** Get a single pull request by number. |
| `agentpack_github_get_pull_request_diff` | read | read-only, idempotent, open-world | `owner`, `repo`, `pull_number` | **GitHub: Get pull request diff.** Get the unified diff of a pull request. Returns the JSON PR object (the helper does not support custom Accept headers for the raw diff format). |
| `agentpack_github_get_release` | read | read-only, idempotent, open-world | `owner`, `repo`, `release_id` | **GitHub: Get release.** Get a single release by numeric ID. |
| `agentpack_github_get_repository` | read | read-only, idempotent, open-world | `owner`, `repo` | **GitHub: Get repository.** Get a repository by owner/name. |
| `agentpack_github_get_tag` | read | read-only, idempotent, open-world | `owner`, `repo`, `tag` | **GitHub: Get tag.** Get a tag by name (returns the ref object — not the annotated tag object). |
| `agentpack_github_get_teams` | read | read-only, idempotent, open-world | `org`, `per_page?`, `page?` | **GitHub: List organization teams.** List teams in an organization. |
| `agentpack_github_get_user` | read | read-only, idempotent, open-world | `username` | **GitHub: Get user.** Get a user by login. |
| `agentpack_github_get_user_orgs` | read | read-only, idempotent, open-world | `username`, `per_page?`, `page?` | **GitHub: List user organizations.** List public organizations a user belongs to. |
| `agentpack_github_get_workflow` | read | read-only, idempotent, open-world | `owner`, `repo`, `workflow_id` | **GitHub: Get workflow.** Get a single workflow by ID or filename. |
| `agentpack_github_get_workflow_run` | read | read-only, idempotent, open-world | `owner`, `repo`, `run_id` | **GitHub: Get workflow run.** Get a single workflow run by ID. |
| `agentpack_github_list_branches` | read | read-only, idempotent, open-world | `owner`, `repo`, `per_page?`, `page?` | **GitHub: List branches.** List all branches in a repository. |
| `agentpack_github_list_code_scanning_alerts` | read | read-only, idempotent, open-world | `owner`, `repo`, `state?`, `ref?`, `severity?`, `per_page?`, `page?` | **GitHub: List code scanning alerts.** List Code Scanning alerts on the default branch (or a specific ref). |
| `agentpack_github_list_commits` | read | read-only, idempotent, open-world | `owner`, `repo`, `sha?`, `path?`, `author?`, `since?`, `until?`, `per_page?`, `page?` | **GitHub: List commits.** List commits on a repository, optionally filtered by sha/path/author/date range. |
| `agentpack_github_list_discussion_categories` | read | read-only, idempotent, open-world | `owner`, `repo` | **GitHub: List discussion categories.** List discussion categories configured for a repository. |
| `agentpack_github_list_discussions` | read | read-only, idempotent, open-world | `owner`, `repo`, `per_page?`, `page?` | **GitHub: List discussions.** List discussions on a repository (requires the Discussions feature). |
| `agentpack_github_list_followers` | read | read-only, idempotent, open-world | `per_page?`, `page?` | **GitHub: List followers.** List followers of the authenticated user. |
| `agentpack_github_list_following` | read | read-only, idempotent, open-world | `per_page?`, `page?` | **GitHub: List following.** List users the authenticated user follows. |
| `agentpack_github_list_gists` | read | read-only, idempotent, open-world | `since?`, `per_page?`, `page?` | **GitHub: List gists.** List gists for the authenticated user. |
| `agentpack_github_list_issue_comments` | read | read-only, idempotent, open-world | `owner`, `repo`, `issue_number`, `per_page?`, `page?` | **GitHub: List issue comments.** List comments on an issue or PR. |
| `agentpack_github_list_issues` | read | read-only, idempotent, open-world | `owner`, `repo`, `state?`, `labels?`, `assignee?`, `creator?`, `since?`, `per_page?`, `page?` | **GitHub: List issues.** List issues in a repository. Excludes PRs unless state='all'. |
| `agentpack_github_list_labels` | read | read-only, idempotent, open-world | `owner`, `repo`, `per_page?`, `page?` | **GitHub: List labels.** List labels configured for a repository. |
| `agentpack_github_list_milestones` | read | read-only, idempotent, open-world | `owner`, `repo`, `state?`, `per_page?`, `page?` | **GitHub: List milestones.** List milestones on a repository. |
| `agentpack_github_list_notifications` | read | read-only, idempotent, open-world | `all?`, `participating?`, `since?`, `before?`, `per_page?`, `page?` | **GitHub: List notifications.** List notifications for the authenticated user. |
| `agentpack_github_list_org_members` | read | read-only, idempotent, open-world | `org`, `per_page?`, `page?` | **GitHub: List org members.** List members of an organization (requires org visibility). |
| `agentpack_github_list_project_items` | read | read-only, idempotent, open-world | `project_id`, `per_page?`, `page?` | **GitHub: List project items.** List items (issues/PRs/draft issues) in a Project V2. |
| `agentpack_github_list_projects` | read | read-only, idempotent, open-world | `per_page?`, `page?` | **GitHub: List projects.** List Projects V2 owned by the authenticated user. |
| `agentpack_github_list_pull_request_files` | read | read-only, idempotent, open-world | `owner`, `repo`, `pull_number`, `per_page?`, `page?` | **GitHub: List pull request files.** List files changed in a pull request. |
| `agentpack_github_list_pull_request_reviews` | read | read-only, idempotent, open-world | `owner`, `repo`, `pull_number`, `per_page?`, `page?` | **GitHub: List pull request reviews.** List reviews on a pull request. |
| `agentpack_github_list_pull_requests` | read | read-only, idempotent, open-world | `owner`, `repo`, `state?`, `head?`, `base?`, `per_page?`, `page?` | **GitHub: List pull requests.** List pull requests on a repository. |
| `agentpack_github_list_releases` | read | read-only, idempotent, open-world | `owner`, `repo`, `per_page?`, `page?` | **GitHub: List releases.** List releases on a repository (most recent first). |
| `agentpack_github_list_secret_scanning_alerts` | read | read-only, idempotent, open-world | `owner`, `repo`, `state?`, `per_page?`, `page?` | **GitHub: List secret scanning alerts.** List Secret Scanning alerts on a repository. |
| `agentpack_github_list_starred` | read | read-only, idempotent, open-world | `sort?`, `direction?`, `per_page?`, `page?` | **GitHub: List starred.** List repositories the authenticated user has starred. |
| `agentpack_github_list_tags` | read | read-only, idempotent, open-world | `owner`, `repo`, `per_page?`, `page?` | **GitHub: List tags.** List Git tags in a repository. |
| `agentpack_github_list_workflow_jobs` | read | read-only, idempotent, open-world | `owner`, `repo`, `run_id`, `per_page?`, `page?` | **GitHub: List workflow jobs.** List jobs (steps) belonging to a workflow run. |
| `agentpack_github_list_workflow_runs` | read | read-only, idempotent, open-world | `owner`, `repo`, `workflow_id`, `branch?`, `status?`, `per_page?`, `page?` | **GitHub: List workflow runs.** List runs of a workflow, optionally filtered by branch/status. |
| `agentpack_github_list_workflows` | read | read-only, idempotent, open-world | `owner`, `repo`, `per_page?`, `page?` | **GitHub: List workflows.** List GitHub Actions workflows defined in a repository. |
| `agentpack_github_lock_issue` | github:write | destructive, idempotent, open-world | `owner`, `repo`, `issue_number`, `lock_reason?` | **GitHub: Lock issue.** Lock an issue or PR conversation. |
| `agentpack_github_mark_all_notifications_read` | github:write | idempotent, open-world | `last_read_at?` | **GitHub: Mark all notifications as read.** Mark all notifications as read. |
| `agentpack_github_mark_notification_read` | github:write | idempotent, open-world | `thread_id` | **GitHub: Mark notification as read.** Mark a single notification thread as read. |
| `agentpack_github_merge_pull_request` | github:write | destructive, open-world | `owner`, `repo`, `pull_number`, `commit_message?`, `merge_method?` | **GitHub: Merge pull request.** Merge a pull request into its base branch. Irreversible. |
| `agentpack_github_remove_label` | github:write | destructive, idempotent, open-world | `owner`, `repo`, `issue_number`, `name` | **GitHub: Remove label.** Remove a label from an issue. |
| `agentpack_github_request_copilot_review` | github:write | open-world | `owner`, `repo`, `pull_number` | **GitHub: Request Copilot review.** Request a review from GitHub Copilot on a pull request. |
| `agentpack_github_search_code` | read | read-only, idempotent, open-world | `query` | **GitHub: Search code.** Search code across GitHub. Query uses GitHub code-search syntax (e.g. 'addClass+repo:jquery/jquery'). |
| `agentpack_github_search_issues` | read | read-only, idempotent, open-world | `query` | **GitHub: Search issues.** Search issues and PRs across GitHub. Query syntax: 'is:issue label:bug repo:owner/name'. |
| `agentpack_github_search_orgs` | read | read-only, idempotent, open-world | `query` | **GitHub: Search orgs.** Search for organizations on GitHub (uses /search/users with type:org). |
| `agentpack_github_search_repositories` | read | read-only, idempotent, open-world | `query`, `sort?`, `order?`, `per_page?`, `page?` | **GitHub: Search repositories.** Search for GitHub repositories by query (GitHub search syntax: e.g. 'language:typescript stars:&gt;100'). |
| `agentpack_github_search_users` | read | read-only, idempotent, open-world | `query` | **GitHub: Search users.** Search for users on GitHub. |
| `agentpack_github_star_repository` | github:write | idempotent, open-world | `owner`, `repo` | **GitHub: Star repository.** Star a repository for the authenticated user. |
| `agentpack_github_unstar_repository` | github:write | destructive, idempotent, open-world | `owner`, `repo` | **GitHub: Unstar repository.** Unstar a repository for the authenticated user. |
| `agentpack_github_update_gist` | github:write | destructive, idempotent, open-world | `gist_id`, `description?`, `files?` | **GitHub: Update gist.** Update an existing gist (description or files). |
| `agentpack_github_update_issue` | github:write | destructive, idempotent, open-world | `owner`, `repo`, `issue_number`, `title?`, `body?`, `state?`, `labels?`, `assignees?` | **GitHub: Update issue.** Update an existing issue (title/body/state/labels/assignees). |
| `agentpack_github_update_issue_comment` | github:write | destructive, idempotent, open-world | `owner`, `repo`, `comment_id`, `body` | **GitHub: Update issue comment.** Update an existing issue/PR comment by ID. |
| `agentpack_github_update_pull_request` | github:write | destructive, idempotent, open-world | `owner`, `repo`, `pull_number`, `title?`, `body?`, `state?`, `base?` | **GitHub: Update pull request.** Update an existing PR (title/body/state/base). |
