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'.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
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'.
user_invocable
true
Add Tool
Add one or more new tools to an existing MCP collection. This skill handles creating the tool file, updating the collection index, and optionally adding integration tests and eval tests.
Use this skill when:
A new API endpoint has been added and needs a tool
You want to expose an additional operation from an existing collection
/build-tools skipped the collection because it already has an index.ts
Prerequisites
Before running, ensure:
The collection already exists (src/umbraco-api/tools/{collection}/index.ts)
The API client has been generated (src/umbraco-api/api/generated/ exists — if not, run npm run generate)
The project compiles: npm run compile
Arguments
Collection name (required): the collection to add the tool to (e.g. /add-tool form)
Operation hint (optional): a description of the endpoint to add (e.g. /add-tool form "copy form endpoint")
If no arguments are provided, ask the user which collection and what endpoint to add.
Agents
This skill orchestrates the following agents:
Agent
When to use
mcp-tool-creator
Creating the tool file (Step 3)
mcp-tool-description-writer
Writing the tool description (Step 3)
mcp-tool-reviewer
Reviewing the new tool for LLM-readiness (Step 5)
integration-test-creator
Creating an integration test for the new tool (Step 6)
eval-test-creator
Updating eval tests to cover the new tool (Step 7)
Critical Rules
ONE TOOL AT A TIME. Create one tool file, compile, verify, then move to the next if adding multiple.
RUN COMMANDS SEPARATELY. Always run compile and test as separate Bash calls. Never chain with &&.
DO NOT RECREATE EXISTING INFRASTRUCTURE. The collection index, test setup, builders, and helpers already exist. This skill only adds new files and updates existing ones.
Workflow
Step 0: Understand the Request
Read the arguments to determine:
Which collection to add to
What endpoint(s) to add
If no operation hint was given, read .discover.json and the Swagger spec to identify operations that don't have tool files yet. Present the options to the user and ask which to add.
Step 1: Read Existing Collection
Read the existing collection to understand current patterns:
src/umbraco-api/tools/{collection}/index.ts — current tool exports and collection metadata
A few existing tool files in the collection — to match patterns (import style, API client usage, naming conventions)
src/umbraco-api/api/generated/ — to find the client method and Zod schemas for the new endpoint
If the collection doesn't exist, tell the user to run /build-tools {collection} first.
Step 2: Read Swagger Spec
Fetch the swagger spec from the swaggerUrl in .discover.json:
curl -sk {swaggerUrl}
Find the operation matching the requested endpoint. Collect:
HTTP method
Path
operationId
Summary
Parameters and request body schema
Response schema
Step 3: Create Tool File
Use the mcp-tool-creator agent, then the mcp-tool-description-writer agent.
Create the tool file following the existing patterns in the collection. Use the same conventions for: