mcp-tool-generator
Skill3 starsChanged 4 months agoMITView on GitHub
Design MCP tools: input/output schemas, handler logic outline, idempotency rules, and agent-facing descriptions for reliable tool invocation. Use when working on MCP servers, MCP tools, MCP clients, or Model Context Protocol integrations.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- 477174/interface-mcp-agent-creatortheir own version, first seen Mar 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- 477174/interface-mcp-agent-creator★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- agent-memory-designerSkill
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- container-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-best-practicesSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-server-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- embedding-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- rag-architecture-designerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Prefer read-only tools first.
- Distinctive: line 62
Use enums for fixed option sets
- Distinctive: line 76
Keep responses token-efficient.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MCP Tool Generator
Purpose
Design MCP tools: input/output schemas, handler logic outline, idempotency rules, and agent-facing descriptions for reliable tool invocation.
Input: Server scope, tool use cases, underlying API capabilities, safety constraints
Output: MCP Tool Design Document per tool with JSON Schema, description, examples, and edge case handling
Examples: See examples.md for worked input/output.
Workflow
Step 1: Identify tool candidates
Map agent tasks to tool operations:
| Agent task | Tool candidate | API operation | Risk level |
| Search documents | search_docs | GET /search | Low |
| Delete record | delete_record | DELETE /items/{id} | High |
Prefer read-only tools first; defer destructive operations until security review.
Step 2: Define tool contract
Per tool document:
| Field | Requirement |
name | snake_case, verb_noun pattern (create_issue, list_users) |
description | What it does, when to use, when NOT to use |
inputSchema | JSON Schema with required fields and enums |
annotations | readOnly, destructive, idempotent hints (if supported) |
Step 3: Design input schema
{
"type": "object",
"properties": {
"query": { "type": "string", "description": "Search query, max 500 chars" },
"limit": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
},
"required": ["query"]
}Rules:
- Constrain string lengths and array sizes
- Use enums for fixed option sets
- Mark destructive tools explicitly in description
Step 4: Design output format
Return structured JSON text content:
| Field | Purpose |
success | Boolean outcome |
data | Result payload |
error | Structured error when success=false |
metadata | Pagination cursor, request ID |
Keep responses token-efficient; paginate large results.
Step 5: Handle edge cases
| Case | Behavior |
| Empty result | Return success=true, data=[], message |
| Rate limited | Return retryable error with backoff hint |
| Invalid args | Return validation error before API call |
| Partial failure (batch) | Return per-item status array |
| Ambiguous match | Return candidates; do not auto-select destructive target |
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| Destructive operation (delete, overwrite) | Require explicit confirm boolean arg; flag for security review |
| Tool duplicates existing tool | Merge or differentiate with clear description |
| API returns unstructured text | Parse and return structured JSON wrapper |
| Operation is slow (>10s) | Return job ID; add separate get_status tool |
| PII in response | Add redaction layer; document fields excluded |
| LLM may hallucinate IDs | Require human-readable label + ID; validate ID format |
Validation
- Each tool has snake_case name following verb_noun pattern
- Description states when to use and when not to use
- Input JSON Schema with required fields and constraints
- Output structure documented with success/error paths
- Edge cases: empty, rate limit, invalid args covered
- Destructive tools have confirmation mechanism
- ≥2 example invocations per tool (happy path + edge case)
- Token-efficient response design (pagination for lists)
Anti-patterns
- Vague description — "helps with data" without specifying inputs/outputs.
- God tool — single tool with 15 optional parameters covering unrelated actions.
- Raw API passthrough — exposing entire REST API without agent-friendly shaping.
- Unbounded results — returning thousands of records without pagination.
- Silent destructive ops — delete without confirmation arg or annotation.
Best Practices
- One tool = one clear action; compose complex flows in agent workflow.
- Description written for LLM tool selection (include negative cases).
- Validate inputs in handler before external API call.
- Return consistent error schema across all tools.
- Pair with mcp-security-review before enabling write tools.
Output Structure
# MCP Tool Design: [Server Name]
## Tool: `tool_name`
### Description
[Agent-facing description with use/when-not-use]
### Input Schema
```json
{ ... }Output Schema
{ ... }Examples
Happy path
Input: ... Output: ...
Edge case
Input: ... Output: ...
Edge Case Handling
| Case | Behavior |
Risk Level
[Low / Medium / High]
---
# Next Skills
| Outcome | Recommended Skill |
|---------|-------------------|
| Implement server scaffold | `mcp/mcp-server-generator` |
| Security review for write tools | `mcp/mcp-security-review` |
| Client invocation patterns | `mcp/mcp-client-generator` |
| Production hardening | `mcp/mcp-best-practices` |
| Workflow orchestration | `ai/ai-workflow-builder` |Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

