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.

ComponentPurposeQuestion before enabling
ToolsPerform actionsWhich tool is indispensable?
Scoped skillDefine workflow and checklistWhich method fits this role?
MCPObtain external dataAre local files sufficient? Is write needed?
MemoryStore durable factsIs 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.

Short tester memory example
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

  1. Define one clear role.
  2. Grant the minimum tools.
  3. Add only the relevant skill.
  4. Check whether MCP is needed and leave it disabled if local sources suffice.
  5. Decide whether memory is needed.
  6. Ask whether the agent can perform the role without each component.

Canonical lesson source · JavaRush

Open JavaRush material