Capabilities
In Dmint, a capability is the unique identifier for a sensitive operation that an AI agent might request. Every capability consists of three elements:The 3 Elements
1. Tool
The namespace of the tool provider or server:- In direct Python code: set in
@dmint.protected("tool.action")ordmint.authorize("tool", "action", ...) - In MCP: the
integration_iddeclared inmcp_protection.json(e.g.postgres,filesystem,github)
query, Dmint namespaces them as production_db.query and analytics_db.query.
2. Action
The specific function or verb being invoked:select,update,delete,dropread_file,write_file,delete_filerun_command,git_push
3. Resource
The target object or scope of the action:- A specific table:
"users","orders" - A filesystem path or prefix:
"/var/log/*","/tmp" - A wildcard:
"*"(applies to any resource)
Resource Matching Rules
When Dmint evaluates an incoming tool call againstpolicy.json, it resolves resources using strict matching:
- Exact Match:
A rule with
resource: "public.users"matches only when the tool call targets"public.users". - Wildcard Match:
A rule with
resource: "*"matches any target resource for that(tool, action). - No Resource Required (
NO_RESOURCE): For commands that have no natural target (e.g.get_system_time), Dmint treats the resource as*or empty.
Capability Examples
Here is how common tool actions map to Dmint capabilities:Defining Capabilities in Code
- Direct Python Decorator
- MCP Gateway Binding