least-privilege-tool-grants
Skill0 starsChanged 15 days agoMITView on GitHub
Grant the agent only the tools it needs for the current task, not the whole server surface. Use when a client can restrict which tools an agent may call
In this repository49 other files it gives its agents.
- argument-construction-from-artifactsSkill
- audit-log-of-tool-callsSkill
- bounded-output-designSkill
- capability-negotiation-checkSkill
- changelog-and-versioningSkill
- concurrency-and-ordering-checkSkill
- context-window-managementSkill
- credential-isolationSkill
- data-retention-policySkill
- description-as-contractSkill
- destructive-action-confirmationSkill
- destructive-tool-gatingSkill
- deterministic-command-choicesSkill
- done-when-criteriaSkill
- error-shape-for-agentsSkill
- fixture-driven-transcript-testsSkill
- human-in-the-loop-escalationSkill
- idempotency-annotationSkill
- input-schema-strictnessSkill
- lifecycle-test-initialize-then-toolsSkill
- local-vs-remote-boundarySkill
- one-procedure-per-skillSkill
- pagination-and-limit-disciplineSkill
- parallel-tool-call-safetySkill
- protocol-conformance-testSkill
- protocol-version-handshakeSkill
- publishing-a-pack-locallySkill
- rate-limit-respectSkill
- reference-canonicalisationSkill
- replay-transcript-for-regressionSkill
- restart-and-reload-semanticsSkill
- scope-guard-before-executionSkill
- search-then-fetch-patternSkill
- secrets-via-environmentSkill
- server-discovery-and-trustSkill
- signal-and-pitfall-sectionsSkill
- skill-frontmatter-contractSkill
- stdio-client-configSkill
- stdout-purity-checkSkill
- third-party-server-sandboxingSkill
- tool-call-budgetingSkill
- tool-call-error-pathsSkill
- tool-error-without-retry-stormSkill
- tools-list-schema-validationSkill
- tool-surface-minimisationSkill
- tool-verb-namingSkill
- transport-choiceSkill
- verify-tool-output-before-reportingSkill
- when-to-use-and-avoidSkill
The file
Files
Least Privilege Tool Grants
Grant the agent only the tools it needs for the current task, not the whole server surface
Use when: a client can restrict which tools an agent may call
Avoid when: the client offers no per-tool restriction and the server must self-limit
Procedure
- List the tools needed for the current task and justify each
- Disable the rest in the client configuration where supported
- Where the client cannot restrict, split servers by capability
- Re-check the grant list at the start of each phase
- Record the granted set with the session notes
- Revoke grants that no longer serve the task
Signals
- the enabled set is smaller than the full tool list
- each enabled tool maps to a task step
- server splitting keeps write tools on a separate connection
- grants are reviewed per phase, not once per project
Patterns
1. Task set
search_skills, get_skill only2. Split servers
read server and write server as separate processes3. Phase review
authz phase enables cross-role tools onlyPitfalls
- Enabling everything because disabling is tedious
- Granting write tools for a read-only analysis task
- Reviewing grants once and never again after scope narrows
Done when
- the enabled tool set is justified tool by tool
- grants are reviewed at each phase boundary
References
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.

