원클릭으로
mcp-builderadd-tool
Add a new tool to your MCP server using "true task" design principles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add a new tool to your MCP server using "true task" design principles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Scaffold a new MCP server with your chosen pattern (basic, tool-heavy, widget-enabled, or database-backed)
Test your MCP server with MCP Inspector and verify tool functionality
Scaffold a complete MCP App with visual UI tools (TypeScript + React + Tailwind)
Add OAuth authentication to your MCP server using Auth0 or custom providers
Add a resource to your MCP server for agent context (schemas, templates, reference data)
Generate deployment configuration for Cloud Run, Render, or Fly.io
| name | mcp-builder:add-tool |
| description | Add a new tool to your MCP server using "true task" design principles |
You are helping the user add a new tool to their MCP server using best practices.
"MCP servers should NOT be pure API wrappers. Design tools that satisfy user intent in a single call."
Ask the user:
Apply the "True Task" framework:
User Intent → Outcome → Tool Name
Good Examples:
| User Intent | Outcome | Tool |
|---|---|---|
| "What's AAPL trading at?" | Complete stock summary | get_stock_summary(ticker) |
| "Find tasks about the homepage" | Full task details | search_tasks(query, include_details=true) |
| "Compare MSFT and GOOGL" | Side-by-side analysis | compare_stocks(tickers[]) |
Bad Examples (API Wrapper Anti-pattern):
| Bad Design | Problem |
|---|---|
get_task_ids(query) then get_task(id) | Agent must make 2 calls |
list_all_records() then filter | Too much data, agent must process |
search() returns IDs only | Incomplete result |
Create a schema with:
Python (Pydantic):
class SearchTasksInput(BaseModel):
query: str = Field(..., description="Search term for task subject or content")
include_details: bool = Field(True, description="Include full task content")
status: Optional[str] = Field(None, description="Filter by status: pending, in_progress, done")
limit: int = Field(10, description="Max results (1-50)")
model_config = ConfigDict(extra="forbid")
TypeScript (Zod):
const SearchTasksSchema = z.object({
query: z.string().describe("Search term for task subject or content"),
include_details: z.boolean().default(true).describe("Include full task content"),
status: z.enum(["pending", "in_progress", "done"]).optional(),
limit: z.number().min(1).max(50).default(10),
});
The description tells the agent WHEN to use this tool:
Good: "Search for tasks by keyword. Returns full task details including content, assignee, and due date. Use when the user wants to find specific tasks or see what's assigned to them."
Bad: "Searches tasks" (too vague, doesn't explain when to use)
Python (FastMCP):
@mcp.tool()
async def search_tasks(
query: str,
include_details: bool = True,
status: Optional[str] = None,
limit: int = 10
) -> str:
"""Search for tasks by keyword. Returns full task details including
content, assignee, and due date. Use when the user wants to find
specific tasks or see what's assigned to them."""
# Validate input
payload = SearchTasksInput(
query=query,
include_details=include_details,
status=status,
limit=limit
)
# Business logic
results = await task_service.search(payload)
# Return complete result
return json.dumps(results, indent=2)
Return actionable error messages:
try:
results = await task_service.search(payload)
return json.dumps(results)
except ValidationError as e:
return f"Invalid input: {e.errors()}"
except PermissionError:
return "Access denied. User does not have permission to search tasks."
except Exception as e:
return f"Search failed: {str(e)}. Please try again or refine your query."
Before finalizing, verify:
Set appropriate hints:
| Scenario | readOnlyHint | destructiveHint | openWorldHint |
|---|---|---|---|
| List/Get/Search | true | false | false |
| Create/Update | false | false | false |
| Delete | false | true | false |
| External API call | varies | varies | true |
After adding the tool, update .mcp-builder/state.json:
{
"tools": [
{ "name": "search-tasks", "status": "implemented", "type": "query" }
]
}
/mcp-builder:validate - Check tool follows best practices/mcp-builder:test - Test with MCP Inspector