# How to set tool-level authorization for AI agents

DevFeed: [How to set tool-level authorization for AI agents](<https://devfeed.tech/articles/how-to-set-tool-level-authorization-for-ai-agents-129767.md>)

Original publisher: [Read original article](<https://nirmata.com/2026/11/12/tool-level-authorization-for-ai-agents/>)

Author: Ritesh Patel

Published: 2026-11-12T04:23:18.277431Z

Content type: article

Language: en

Sources: [Nirmata](<https://devfeed.tech/sources/nirmata.md>)

Topics: [Authorization](<https://devfeed.tech/topics/authorization.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Access Control](<https://devfeed.tech/topics/access-control.md>), [human in the loop agent](<https://devfeed.tech/topics/human-in-the-loop-agent.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [access-controls](<https://devfeed.tech/tags/access-controls.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-governance](<https://devfeed.tech/tags/ai-governance.md>), [annotations](<https://devfeed.tech/tags/annotations.md>), [audit](<https://devfeed.tech/tags/audit.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [bash](<https://devfeed.tech/tags/bash.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [claude-md](<https://devfeed.tech/tags/claude-md.md>), [client](<https://devfeed.tech/tags/client.md>), [clients](<https://devfeed.tech/tags/clients.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [rules](<https://devfeed.tech/tags/rules.md>), [security](<https://devfeed.tech/tags/security.md>), [spec](<https://devfeed.tech/tags/spec.md>), [tool](<https://devfeed.tech/tags/tool.md>), [tools](<https://devfeed.tech/tags/tools.md>)

## AI overview

Tool authorization works across three checks: the server enforces access controls, the client decides whether to run a call or prompt, and a person can deny prompted calls. The MCP specification requires servers to validate inputs, control access, rate limit calls, and sanitize outputs; it recommends client confirmation for sensitive operations and treats tool annotations as untrusted unless the server is trusted. In Claude Code, rules are evaluated deny, then ask, then allow; the first match wins, regardless of specificity. A bare tool-name denial removes the tool from context, while a scoped rule blocks matching calls. The excerpt recommends inventorying tools, denying unapproved MCP servers, allowing narrow tool names, checking server-side controls, and versioning and retesting settings. Settings-file MCP parameter matching is unsupported, Bash rules are not a security boundary, and OS sandboxing may be needed for file access restrictions.

## Source excerpt

Tool-level authorization decides which tools an agent may call. Learn how the MCP spec splits that job and how Claude Code evaluates deny, ask and allow rules.