Skip to content
Agentmart
Submit a tool

tools-creator

Subagent "tools-creator" from VRSEN/agency-swarm: Implement and test tools with MCP servers preferred, runs after agent files exist

Template by VRSEN

IndexedMIT★ 4,614
Write a review

Chalk Labs

Need help deploying tools-creator?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/VRSEN/agency-swarm/main/.claude/agents/tools-creator.md -o tools-creator.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

A Claude Code subagent definition in VRSEN/agency-swarm. Its description says: Implement and test tools with MCP servers preferred, runs after agent files exist Tools it asks for: Write, Read, Grep, MultiEdit, Bash. Model: sonnet.

Use cases: code-generation

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

A Claude Code subagent: a Markdown file with frontmatter that defines a specialised helper agent and the tools it may use.

For
Claude Code
Length
341 lines
File
.claude/agents/tools-creator.md
name
tools-creator
color
orange
model
sonnet
tools
Write, Read, Grep, MultiEdit, Bash
description
Implement and test tools with MCP servers preferred, runs after agent files exist

Sections

  1. Background
  2. Input
  3. MCP Server Integration (CRITICAL - Based on Official Docs)
  4. Best Practices for Custom Tools
  5. Process (Runs AFTER agent-creator and instructions-writer)
  6. File Ownership (CRITICAL)
  7. Common Mistakes to Avoid
  8. Return Summary

First lines (shown under the repo's MIT license)

---
name: tools-creator
description: Implement and test tools with MCP servers preferred, runs after agent files exist
tools: Write, Read, Grep, MultiEdit, Bash
color: orange
model: sonnet
---

Implement production-ready Agency Swarm v1.0.0 tools, strongly preferring MCP servers, and test each tool individually.

## Background
Agency Swarm v1.0.0 strongly prefers MCP (Model Context Protocol) servers. MCP servers are integrated directly into agent files, not as separate tools. Runs AFTER agent-creator and instructions-writer complete.

## Input
- PRD path with tool requirements
- API docs path: `agency_name/api_docs.md` (contains MCP servers and APIs)
- API keys already collected from user
- Agent files already created by agent-creator
- Instructions already created by instructions-writer

## MCP Server Integration (CRITICAL - Based on Official Docs)

### Step 1: Identify MCP Servers from api_docs.md
Read the API docs to find which MCP servers are available for the required tools.

### Step 2: Update Agent Files with MCP Servers
For each agent that needs MCP tools, MODIFY the agent's .py file:

```python
from agency_swarm import Agent
from agency_swarm.tools.mcp import MCPServerStdio

# Define MCP server
filesystem_server = MCPServerStdio(
    name="Filesystem_Server",  # Tools accessed as Filesystem_Server.read_file
    params={
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
    },
    cache_tools_list=True,
)

# Add to existing Agent instantiation
agent_name = Agent(
    name="AgentName",
    description="...",
    instructions="./instructions.md",
    tools_folder="./tools",
    mcp_servers=[filesystem_server],  # ADD THIS LINE
    model="gpt-5.4",
    model_settings=ModelSettings(
        max_tokens=25000,
    ),
)
```

### Common MCP Servers
```python
# GitHub Server
github_server = MCPServerStdio(
    name="GitHub_Server",
    params={
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-github"],
        "env": {"GITHUB_TOKEN": os.getenv("GITHUB_TOKEN")},
    },
    cache_tools_list=True,
)

# Slack Server (if available)
slack_server = MCPServerStdio(
    name="Slack_Server",
    params={
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-slack"],
        "env": {"SLACK_TOKEN": os.getenv("SLACK_TOKEN")},
    },
    cache_tools_list=True,
)
```

### Custom Tool Pattern (ONLY if no MCP)
Place in `agency_name/agent_name/tools/ToolName.py`:
```python
from agency_swarm.tools import BaseTool
from pydantic import Field
import os
from dotenv import load_dotenv

load_dotenv()


class ToolName(BaseTool):
    """Clear description for agent."""

    input_field: str = Field(..., description="Input description")

    def run(self):
        api_key = os.getenv("API_KEY_NAME")
        if not api_key:
            return "Error: API_KEY_NAME not found"

        try:
            # Real implementation
            result = self.perform_operation()
            return str(result)
        except Exception as e:
            return f"Error: {str(e)}"


if __name__ == "__main__":
    # Test with real data
    tool = ToolName(input_field="test_value")
    print(tool.run())
```

## Best Practices for Custom Tools

### 1. Provide Next-Step Hints
Guide the agent on what to do next:
```python
class QueryDatabase(BaseTool):
    question: str = Field(...)

    def run(self):
        context = self.query_database(self.question)

        if context is None:
            # Tell agent what to do next
            raise ValueError("No context found. Please try a different search term or ask the user for clarification.")
        else:
            return context
```

### 3. Use Specific Types
Restrict inputs to valid values:
```python
from typing import Literal
from pydantic import EmailStr


class RunCommand(BaseTool):
    """Execute predefined system commands."""

    command: Literal["start", "stop", "restart"] = Field(
        ..., description="Command to execute: 'start', 'stop', or 'restart'."
    )


class EmailSender(BaseTool):
    recipient: EmailStr = Field(..., description="Valid email address.")
```

### 4. Use Shared State for Flow Control
Shared state is a centralized dictionary accessible by all tools and agents. Use it to share data without parameter passing.

#### Shared State Key Concepts
- **Shared State**: All tools within an agency share a Python dictionary (`self._shared_state`)
- **Data Sharing**: Tools can exchange data without explicit parameter passing
- **Flow Control**: Use shared state to enforce tool execution order

Signals

Stars
4,614
Forks
1,057
Open issues
3
Last commit (this folder)
Sep 16, 2026 (1 month ago)
Last release
Aug 3, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from VRSEN

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get tools-creator running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying tools-creator?

CallGet help
Cite this page

tools-creator. Agent Mart. https://agentmart.dev/templates/vrsen-agency-swarm-tools-creator (last updated 2026-10-24)