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: Capability=(Tool,Action,Resource)\text{Capability} = (\text{Tool}, \text{Action}, \text{Resource})

The 3 Elements

1. Tool

The namespace of the tool provider or server:
  • In direct Python code: set in @dmint.protected("tool.action") or dmint.authorize("tool", "action", ...)
  • In MCP: the integration_id declared in mcp_protection.json (e.g. postgres, filesystem, github)
Tool names prevent naming collisions. If two MCP servers both offer a tool named query, Dmint namespaces them as production_db.query and analytics_db.query.

2. Action

The specific function or verb being invoked:
  • select, update, delete, drop
  • read_file, write_file, delete_file
  • run_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 against policy.json, it resolves resources using strict matching:
  1. Exact Match: A rule with resource: "public.users" matches only when the tool call targets "public.users".
  2. Wildcard Match: A rule with resource: "*" matches any target resource for that (tool, action).
  3. 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