This skill should be used when the user asks to "design MCP tool", "create tool schema", "tool best practices", "input validation", "output schema", "error handling for tools", or discusses designing individual MCP tools with proper schemas and responses.
Design MCP tools with clear schemas, proper error handling, and token-efficient responses. Use when users request tool design, schema creation, or best practices for input/output validation.
/plugin marketplace add standardbeagle/standardbeagle-tools/plugin install mcp-architect@standardbeagle-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Design individual MCP tools with clear input/output schemas, proper error handling, and token-efficient responses following best practices.
{
"name": "search",
"input": {
"pattern": {
"type": "string",
"required": true,
"description": "Search pattern (regex supported)"
},
"filter": {
"type": "string",
"required": false,
"description": "File filter (*.ts, src/**)"
},
"max": {
"type": "integer",
"required": false,
"default": 50,
"description": "Maximum results"
}
}
}
Key principles:
// Pseudocode - Always permissive
function search(params) {
const {pattern, filter, max, ...extra} = params
const warnings = []
if (Object.keys(extra).length > 0) {
warnings.push(`Unknown params ignored: ${Object.keys(extra).join(', ')}`)
}
return {results: search(pattern, filter, max), warnings}
}
{
"data": {}, // Primary response data
"metadata": {}, // Automation flags (has_more, total, etc.)
"errors": [], // Error list (empty if none)
"warnings": [], // Warning list (unknown params, etc.)
"next_steps": "" // Guidance for user
}
Don't repeat inputs:
// Bad
{
"query": "authenticate", // User just sent this
"filter": "*.ts", // User just sent this
"results": [...]
}
// Good
{
"results": [...],
"total": 127
}
{
"results": [
{"id": "a1", "name": "...", "confidence": 0.95, "full_details": {...}}, // High confidence
{"id": "b2", "name": "...", "confidence": 0.70, "summary": "..."}, // Medium
{"id": "c3", "name": "...", "confidence": 0.40} // Low - just ID
]
}
{
"error": {
"code": "INVALID_PATTERN",
"message": "Regex pattern is malformed",
"details": {
"pattern": "([unclosed",
"position": 2,
"expected": "]"
},
"suggestion": "Check regex syntax. Example: \"function.*User\""
}
}
INVALID_INPUT - Bad input parameters
NOT_FOUND - Resource not found
PERMISSION_DENIED - Access denied
TIMEOUT - Operation timed out
INTERNAL_ERROR - Server error
RATE_LIMITED - Too many requests
{
"results": [...], // Partial results
"warnings": ["Timeout after 5s, showing partial results"],
"complete": false,
"partial": true
}
{
"name": "search",
"purpose": "Fast discovery",
"output": {
"results": [{"id": "...", "preview": "..."}],
"has_more": true,
"total": 127
},
"avg_tokens": 80
}
{
"name": "get_definition",
"purpose": "Detailed information",
"input": {"id": "from_search"},
"output": {
"id": "...",
"full_details": {...}
},
"avg_tokens": 200
}
{
"name": "trace_callers",
"purpose": "Deep analysis",
"input": {"symbol_id": "..."},
"output": {
"call_graph": {...},
"analysis": {...}
},
"avg_tokens": 500,
"warning": "Expensive operation"
}
// Pseudocode
function validateInput(params) {
if (!params.pattern) {
return error("INVALID_INPUT", "pattern is required")
}
if (params.max && (params.max < 1 || params.max > 1000)) {
return error("INVALID_INPUT", "max must be 1-1000")
}
// Validate but don't reject extra params
const known = ['pattern', 'filter', 'max']
const extra = Object.keys(params).filter(k => !known.includes(k))
return {valid: true, warnings: extra.length > 0 ? [`Unknown: ${extra}`] : []}
}
Tool design checklist:
Token budgets by tool type:
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.