Skip to main content
Glama

modx_grant_context_access

Grant a MODX user group access to a context by setting an access policy and minimum role authority, enabling you to control which groups can enter contexts like web or mgr.

Instructions

Grant a user group access to a context with a policy and minimum role authority.

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": {
      "principal": "<principal>",
      "target": "<target>",
      "policy": "<policy>"
    },
    "name": "modx_grant_context_access"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyYesAccess policy id.
targetYesContext key (e.g. 'web', 'mgr').
authorityNoMinimum role authority (0 = all).
principalYesUser group id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.4

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden, and it is thin. It does not say whether an existing access entry is overwritten, whether the operation is idempotent, what permissions the caller needs, or what a success response contains for this 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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity contributes to the missing behavioral and routing detail scored elsewhere.

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?

This is a four-parameter mutation with no annotations and no output schema, so the description should cover overwrite semantics, required privileges, and result shape. None of that is present, leaving an agent with only the one-line purpose.

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 four parameters are already documented in the schema, including the '0 = all' semantics for authority. The description only restates that a policy and minimum role authority are involved, adding no syntax or edge-case detail beyond the schema, so the baseline 3 applies.

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

Purpose4/5

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

The description gives a specific verb and resource ('Grant ... access to a context') and clarifies that the principal is a user group and the grant is scoped by a policy plus minimum role authority. It does not distinguish this from sibling tools like modx_update_context_access, modx_revoke_context_access, or modx_grant_resourcegroup_access, which an agent must disambiguate on its own.

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 when-to-use guidance, no mention of the alternative tools for modifying or revoking an existing grant, and no prerequisites such as the policy or user group needing to exist. The only signal is the verb 'Grant', which is implied rather than stated as a selection rule.

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

Deploy Server

Other Tools