Skip to main content
Glama

smart_set_permissions

Set DocType permissions with role validation and error handling, while optionally preserving existing permissions and reloading the DocType after changes.

Instructions

Set permissions for a DocType with enhanced validation and error handling

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doctype": "<doctype>",
      "perms": "<perms>"
    },
    "name": "smart_set_permissions"
  }
}

Input Schema

NameRequiredDescriptionDefault
permsYesPermissions array
doctypeYesDocType name
reload_doctypeNoReload DocType after setting permissions
validate_rolesNoValidate that roles exist before setting permissions
preserve_existingNoPreserve existing permissions not in the provided array

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full disclosure burden, and it offers only vague phrases like "enhanced validation and error handling" without saying what is validated, what errors are surfaced, or what happens on failure. It does not state whether existing permissions are overwritten, whether the operation is reversible, or what permission level is required for a security-sensitive mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short, front-loaded sentence with no padding. The trailing "with enhanced validation and error handling" is marketing filler rather than actionable information, which keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter, security-sensitive mutation with no annotations and no output schema, the description should clarify the perms array format (the schema only says "Permissions array" of untyped objects) and the difference from set_permissions. Neither is present, leaving meaningful gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters including preserve_existing, validate_roles, and reload_doctype are already documented structurally. The description adds no additional meaning about the shape of the perms array or the interaction between flags, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Set permissions for a DocType"), which is clear on its own. However, a sibling tool literally named "set_permissions" exists, and the definition never explains what distinguishes the "smart" variant from it, so an agent cannot confidently choose between them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this versus set_permissions, no prerequisites (e.g. admin rights), and no conditions under which it should be avoided. The agent must infer usage entirely from the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.