Skip to main content
Glama
Grouper MCP Server

Grouper MCP Server

by Unicon

grouper_trace_membership

Trace how a user belongs to a group by returning the complete membership path, including direct, intermediate, and composite group operations for debugging access and auditing.

Instructions

Trace how a subject (user) is a member of a group, showing the complete membership path. This tool identifies whether membership is direct (immediate), through intermediate groups (effective), or through composite group operations (union/intersection). Returns a detailed trace showing the chain of memberships from the subject to the target group, including intermediate groups, membership types, and composite operations. Useful for debugging access issues, understanding complex membership hierarchies, and auditing group membership paths. Maximum recursion depth is 10 levels to prevent timeout.

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": {
      "subjectId": "<subjectId>",
      "groupName": "<groupName>"
    },
    "name": "grouper_trace_membership"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxDepthNoMaximum recursion depth for tracing (1-20). Default: 10. Higher values may timeout for complex hierarchies.
groupNameYesThe full group name to trace membership to (e.g., "app:security:admin")
subjectIdYesThe subject ID of the user to trace membership for
subjectSourceIdNoOptional subject source ID (e.g., "ldap", "jdbc"). If not specified, Grouper will search across all sources.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the recursion cap and timeout risk and describes return contents (chain of memberships, intermediate groups, membership types, composite operations), which substitutes for the missing output schema. It never states that the operation is read-only or what privileges are required to trace another subject, leaving a real gap for a tool with no annotations.

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

Conciseness3/5

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

The purpose is front-loaded, but the description repeats itself: 'showing the complete membership path' and 'Returns a detailed trace showing the chain of memberships' say the same thing. The depth sentence also duplicates the schema's maxDepth field while stating a stricter limit than the schema allows, adding noise rather than clarity.

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

Completeness4/5

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

For a read-style trace tool with no output schema and no annotations, the description covers the important ground: what is traced, what the result contains, and the recursion/timeout caveat. Missing are the read-only guarantee and any permission prerequisites, which an agent may need before calling it against another user's membership.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, and the description adds context by tying depth to timeout behavior. However, the statement 'Maximum recursion depth is 10 levels' conflicts with the schema's documented 1-20 range and default of 10, which may mislead an agent into capping depth at 10.

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 opens with a specific verb and resource: 'Trace how a subject (user) is a member of a group, showing the complete membership path.' It also clarifies the outcome categories (direct, effective, composite), which distinguishes it in spirit from listing tools like grouper_get_members or grouper_get_subject_groups. It stops short of naming a sibling explicitly, so an agent must infer the boundary rather than being told it.

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

Usage Guidelines3/5

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

It offers use cases ('debugging access issues, understanding complex membership hierarchies, auditing'), which implies when to reach for it, but there is no explicit when-not clause or named alternative. An agent knows this is for path tracing but not, for example, whether to prefer it over grouper_get_subject_groups for a simple listing.

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