Skip to content
Back to skills

MCP Server & Tool Design Skill

ASecurity

Design guidance for Model Context Protocol servers and agent tool schemas — tool minimization, least-privilege scoping, and schema clarity for reliable agent tool-use.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 5, 2026
ai-agentsgitapi

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned October 1, 2026

npx -y skills add sharmapuneet1510/awesome-prompts --skill skills --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of MCP Server & Tool Design Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for MCP Server & Tool Design Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sharmapuneet1510-mcp-server-tool-design-skill/badge)](https://www.skillsdirectory.com/skills/sharmapuneet1510-mcp-server-tool-design-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: MCP Server & Tool Design Skill
version: 1.1
description: >
  Design guidance for Model Context Protocol servers and agent tool schemas —
  tool minimization, least-privilege scoping, and schema clarity for reliable
  agent tool-use.
applies_to: [mcp, agent-tools, api-design]
tags: [mcp, tool-design, agents, schema]
---

# MCP Server & Tool Design Skill — v1.1

## Quick Card

> Read this card first. Load a section below only when the task needs it.

| | |
|---|---|
| **Use when** | Designing which tools an MCP server or agent exposes, and their schemas |
| **Skip when** | Building and wiring the server — `mcp_server_builder_skill` |
| **Inputs** | The workflows the agent must perform |
| **Produces** | Tool list with names, descriptions, parameter schemas, error shapes |
| **Steps** | 1. Minimise the tool set → 2. Scope each to least privilege → 3. Write schema + description (does / does not) → 4. Design structured, retryable-aware errors |
| **Done when** | §5 checklist passes |
| **Load on demand** | §1 minimisation · §2 least privilege · §3 schema clarity · §4 errors |
| **Run report** | `html_report_skill` — adds: Tool inventory (read-only / mutating / destructive) |
| **Pairs with** | `mcp_server_builder_skill` |

---

## 1. Tool Minimization

Every tool exposed to an agent is a decision surface — more tools means more chances for the agent to pick the wrong one. Before adding a tool, ask: can an existing tool's parameters cover this, or does it genuinely need a new capability?

- Prefer a few well-scoped tools over many overlapping ones (one `search` tool with filters beats `search_by_name` + `search_by_date` + `search_by_tag`).
- Don't expose raw CRUD if the workflow only ever needs 2 of the 4 operations — narrower tools reduce misuse.

## 2. Least-Privilege Scoping

- Scope each tool's effective permissions to exactly what its stated purpose needs. A "read customer record" tool should not also be able to write.
- Separate read-only tools from mutating tools clearly in naming (`get_*`/`list_*` vs `create_*`/`update_*`/`delete_*`) so an agent's own reasoning about risk lines up with the tool name.
- For destructive or hard-to-reverse operations, require an explicit confirmation parameter or a preceding read/preview call — don't let a single tool call both compute and commit an irreversible change.

## 3. Schema Clarity

The tool's JSON schema is the only contract the agent sees — treat it like a public API:
- **Name**: verb + object, unambiguous (`create_invoice`, not `process`).
- **Description**: state what it does, when to use it, and what it explicitly does NOT do (e.g., "does not send the invoice — call `send_invoice` separately").
- **Parameters**: required vs optional clearly marked; use enums instead of free-text where the valid values are known; avoid overloaded parameters that change meaning based on another parameter's value.
- **Return shape**: consistent, predictable — same shape on success and on the documented error cases, so the agent doesn't need to branch on undocumented structure.

## 4. Error Design

- Return structured errors the agent can reason about (`{"error": "NOT_FOUND", "message": "..."}`), not raw stack traces or generic 500s.
- Distinguish retryable errors (rate limit, transient network) from non-retryable ones (invalid input, not found) — an agent that retries a non-retryable error wastes turns and can loop.

## 5. Checklist

✅ Each tool has one clear purpose; no overlapping near-duplicates
✅ Read-only vs mutating tools are distinguishable by name
✅ Destructive operations require explicit confirmation or a preview step
✅ Descriptions state both what the tool does and what it doesn't
✅ Parameters use enums/types over free-text where possible
✅ Errors are structured and distinguish retryable from non-retryable

---
> Inspired by ideas from [ai-boost/awesome-prompts](https://github.com/ai-boost/awesome-prompts) (GPL-3.0) — content rewritten, not copied. See `docs/reference/credits.md`.

Files in this skill

  • README.md10.2 KB
  • adr_skill.md8.4 KB
  • agent_skill_design_skill.md3.1 KB
  • apache_camel_skill.md15.5 KB
  • apache_pulsar_skill.md17.1 KB
  • ba_create_skill.md18.9 KB
  • backend_skill.md22.1 KB
  • code_documentation_skill.md13.4 KB
  • code_formatting_skill.md11.7 KB
  • code_health_skill.md9.8 KB
  • code_review_skill.md36.7 KB
  • context_builder_skill.md11.7 KB
  • current_tech_spec_skill.md6.3 KB
  • database_skill.md18.4 KB
  • debugging_skill.md3.4 KB
  • error_handling_skill.md18.4 KB
  • frontend_skill.md23.6 KB
  • java_advanced_skill.md15 KB
  • jira_html_report_skill.md15.5 KB
  • jira_incremental_spec_generator_skill.md19.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.