Tools, skills, MCP, and memory are different layers
Tools describe actions, skills describe method, MCP provides external sources, and memory stores facts or agreements that may persist between runs. Do not enable every layer for every agent by default.
Least privilege applies to all four: a narrow boundary reduces excess context, false assumptions, and unwanted actions.
| Component | Purpose | Question before enabling |
|---|---|---|
| Tools | Perform actions | Which tool is indispensable? |
| Scoped skill | Define workflow and checklist | Which method fits this role? |
| MCP | Obtain external data | Are local files sufficient? Is write needed? |
| Memory | Store durable facts | Is this a lasting rule rather than a hypothesis? |
Scoped skills and MCP
- A reviewer may use a diff-risk analysis skill.
- A tester may use a test strategy and regression skill.
- A migration assistant may use read-only documentation lookup.
- Do not connect a database or issue tracker “just in case”.
- Allow write access through MCP only for a separately justified operation.
Memory must be durable
Store stable naming conventions, test locations, and verified team rules. Do not store one-off hypotheses, temporary stack traces, flaky-test assumptions, secrets, or tokens.
A fresh reviewer may be more useful without memory so outdated rules cannot distort its conclusion.
unit tests: backend/src/test/java
refund regressions: use the Refund prefix
Do not store:
- one-off hypotheses;
- temporary stack traces;
- credentials or tokens.Enable components in order
- Define one clear role.
- Grant the minimum tools.
- Add only the relevant skill.
- Check whether MCP is needed and leave it disabled if local sources suffice.
- Decide whether memory is needed.
- Ask whether the agent can perform the role without each component.
Canonical lesson source · JavaRush
Open JavaRush material