with one click
add-test
// Add an integration test for a specific tool in an existing collection. Creates a test file following the collection's established patterns. Use when adding tests for new or modified tools, or re-creating deleted tests.
// Add an integration test for a specific tool in an existing collection. Creates a test file following the collection's established patterns. Use when adding tests for new or modified tools, or re-creating deleted tests.
Load MCP development patterns and best practices for building tools with the @umbraco-cms/mcp-server-sdk. Use when starting tool development or needing pattern reference.
Guide for configuring and running Umbraco MCP servers via the CLI. Use when the user wants to set up an MCP server for Claude Code, configure auth, filtering, dry-run, readonly mode, or use introspection commands to understand available tools.
Add or update an LLM eval test for a specific tool or collection. Creates a new eval scenario or updates an existing one to cover new tools. Use when adding eval coverage for new or modified tools.
Add a new tool to an existing MCP collection. Creates the tool file, updates the collection index, optionally adds integration tests and eval tests. Use when adding new API endpoints to collections already created by '/build-tools'.
Build LLM eval tests for MCP tool collections. Reads .discover.json and creates eval setup and scenario test files per collection. Use after running '/build-tools'.
Build MCP tool collections from discovered API groups. Reads .discover.json and generates tools and collection registrations. Use after running 'npx @umbraco-cms/create-umbraco-mcp-server discover'.
| name | add-test |
| description | Add an integration test for a specific tool in an existing collection. Creates a test file following the collection's established patterns. Use when adding tests for new or modified tools, or re-creating deleted tests. |
| user_invocable | true |
Add an integration test for a specific tool in an existing collection. This skill creates a single test file following the collection's established test patterns.
Use this skill when:
/add-tool and want to test it separately/build-tools-tests skipped the collection because tests already existBefore running, ensure:
src/umbraco-api/tools/{collection}/index.ts)src/umbraco-api/tools/{collection}/__tests__/setup.ts) — if not, tell the user to run /build-tools-tests {collection} firstnpm run compileumbraco-back-office-mcp and Client Secret 1234567890"/add-test form)/add-test form copy-form)If no tool name is provided, compare the tools in the collection index against existing test files and present the untested tools to the user.
| Agent | When to use |
|---|---|
integration-test-creator | Creating the test file (Step 3) |
integration-test-validator | Validating the test (Step 4) |
TEST INFRASTRUCTURE MUST EXIST. This skill does not create setup.ts, builders, or helpers. If they don't exist, tell the user to run /build-tools-tests {collection} first.
ONE FILE AT A TIME. Create one test file, compile, run, fix. Then move to the next if testing multiple tools.
RUN COMMANDS SEPARATELY. Always run compile and test as separate Bash calls. Never chain with &&.
REAL API — NO MOCKING. These are integration tests against a real Umbraco instance. Do NOT create mock infrastructure.
ONLY CREATE FILES IN __tests__/. Do NOT modify tool files, collection indexes, API client files, or mock handlers.
If a tool name was provided, verify it exists in the collection index.
If no tool name was provided:
src/umbraco-api/tools/{collection}/index.ts to get the list of toolssrc/umbraco-api/tools/{collection}/__tests__/Read the existing test infrastructure to match patterns:
src/umbraco-api/tools/{collection}/__tests__/setup.ts — imports, re-exports, builder/helper namesIf setup.ts doesn't exist, stop and tell the user to run /build-tools-tests {collection} first.
Read the existing builder (__tests__/helpers/{entity}-builder.ts) to check if it supports creating the data needed for this tool's test.
If the builder needs a new method (e.g. withCopiedFrom() for a copy tool):
If the helper needs a new query method, add it to the existing helper file.
Use the integration-test-creator agent.
Create src/umbraco-api/tools/{collection}/__tests__/{action}-{entity}.test.ts:
./setup.js (matching the existing test import style)createSnapshotResult + toMatchSnapshot)expect(result.isError).toBe(true))afterEachwithCursorPagination() from @umbraco-cms/mcp-server-sdk. Pass {} for first page, use cursor from response for next pages. Use validateToolResponse(cursorTool, result) with the wrapped tool. See /build-tools-tests SKILL.md for full cursor pagination examples.After creating:
npm run compile
npm test -- __tests__/{collection}/{action}-{entity}.test.ts
Fix any failures before proceeding.
Use the integration-test-validator agent to check the new test follows collection patterns:
setupTestEnvironment() in describe blockcreateMockRequestHandlerExtra() for handler callsTEST_ prefixReport what was done: