mcp-refactoring
Skill188 starsChanged 8 months agoMITView on GitHub
Refactoring MCP Tools for Better LLM Integration and Usability
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .github/instructions/copilot-instructions.mdCopilot instructions
- dxt-packagingSkill
- mcp-developmentSkill
- mcp-inspectorSkill
- mcp-testingSkill
- publishingSkill
- raindrop-mcp-publishingSkill
- SKILL.mdSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Ensure each resource supports GET (read), and where appropriate, CREATE, UPDATE, DELETE (write) actions.
- Distinctive: line 29
Add tool parameters for limit, offset, and sample to all list/search tools.
- Distinctive: line 30
Use MCP's sampling capability to advertise this in the server manifest.
- Distinctive: line 38
Use the MCP elicitation capability to allow the server to ask clarifying questions or confirmations.
- Very specific: line 44
Use a consistent {resource}_{action} pattern (e.g., collection_list, bookmark_create, tag_manage)
- Distinctive: line 52
Do the same for bookmarks, tags, highlights
- Distinctive: line 57
Ensure every tool and parameter has a clear, concise description
- Distinctive: line 58
Use Zod schemas for validation and documentation
- Distinctive: line 79
Sampling: Add sample and limit parameters to all list/search tools
- Distinctive: line 80
Elicitation: Use MCP's elicitation to prompt for missing/ambiguous info and confirmations
- Distinctive: line 81
Consistent Error Handling: Always return structured, descriptive errors
≈ “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 Refactoring Skill
Guidelines for refactoring Raindrop MCP tools for better LLM integration, usability, and following MCP best practices.
Capabilities: Resources, Sampling, Elicitation
Resources
Expose all major Raindrop entities as MCP resources:
collections://all,collections://{id}bookmarks://{id},tags://allhighlights://all,user://info
Implement resource discovery and navigation (list, get, search, children, etc.) using standard MCP resource URIs and methods. Ensure each resource supports GET (read), and where appropriate, CREATE, UPDATE, DELETE (write) actions.
Sampling
For large collections/bookmarks/tags/highlights, implement sampling endpoints:
- e.g.,
bookmarks://collection/{id}?sample=10returns a random or recent sample. - Add tool parameters for limit, offset, and sample to all list/search tools.
- Use MCP's sampling capability to advertise this in the server manifest.
Elicitation
Implement elicitation tools for:
- Confirming destructive actions (delete, merge, etc.)
- Requesting missing parameters (e.g., if a required field is omitted, prompt the LLM/user)
- Use the MCP elicitation capability to allow the server to ask clarifying questions or confirmations.
Streamlining Tools for LLMs
Hierarchical, Predictable Naming
- Use a consistent
{resource}_{action}pattern (e.g.,collection_list,bookmark_create,tag_manage) - Group related actions under a single tool with an operation parameter where possible (e.g.,
collection_managefor create, update, delete)
Reduce Redundancy
Collapse similar tools:
- Merge
collection_create,collection_update,collection_deleteintocollection_managewith an operation parameter - Do the same for bookmarks, tags, highlights
- For read-only actions, keep list, get, and search as separate, simple tools
LLM-Friendly Descriptions
- Ensure every tool and parameter has a clear, concise description
- Use Zod schemas for validation and documentation
Example: Refactored Tool Set
| Tool Name | Description | Operations/Params |
| collection_manage | Create, update, or delete a collection | operation: create/update/delete |
| collection_list | List all or child collections | parentId |
| bookmark_manage | Create, update, delete, move, tag bookmarks | operation, ids, data |
| bookmark_search | Search bookmarks with filters | query, tags, collection, etc. |
| tag_manage | Rename, merge, delete tags | operation, tagNames, newName |
| highlight_manage | Create, update, delete highlights | operation, id, data |
| user_profile | Get user info | |
| user_statistics | Get user or collection stats | collectionId |
| import_export | Import/export bookmarks, check status | operation, format, etc. |
| diagnostics | Server diagnostics | includeEnvironment |
LLM/AI-Optimized Features
- Resource URIs: Support direct resource access via URIs (e.g.,
collections://all) - Streaming: For large lists, support streaming or pagination
- Sampling: Add sample and limit parameters to all list/search tools
- Elicitation: Use MCP's elicitation to prompt for missing/ambiguous info and confirmations
- Consistent Error Handling: Always return structured, descriptive errors
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.

