Skip to main content
Glama

modx_get_context

Retrieves a MODX context by its key so you can inspect context-specific configuration before managing resources or settings. Pass the context key to fetch its details.

Instructions

Get a context by key.

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": {
      "key": "<key>"
    },
    "name": "modx_get_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.4

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, but it only implies a read via 'Get'. It says nothing about permissions required, what happens when the key is not found, or what a context object represents. For a simple read this is a notable gap, though less severe than for a mutation tool.

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

Conciseness5/5

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

A single front-loaded sentence with zero wasted words. Its brevity is efficient, even if the content is thin for other dimensions.

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?

There is no output schema and no annotations, so the description should explain what a context is and what the returned record contains. Instead it provides only the bare operation, leaving an agent unable to interpret the result or the key format.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for the undocumented 'key' parameter. It only restates that lookup is 'by key' without indicating the expected format (e.g., a short context key like 'web') or any constraints, adding almost no meaning beyond the schema.

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 clear verb and resource ('Get a context') plus the identifying parameter ('by key'), so an agent knows exactly what operation this performs. It does not differentiate this tool from siblings such as modx_list_contexts or modx_get_context_setting, which keeps it from a 5.

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 tool versus modx_list_contexts (to enumerate contexts) or the context-setting tools. No prerequisites, no exclusions, and no mention of when a context lookup is appropriate.

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