Skip to main content
Glama

get_permission_context

Get Microsoft Graph permission context by object or permission name: see applicable permissions, what they unlock, grant options, recent changes, and overlapping alternatives for privilege tradeoffs.

Instructions

Two modes. (1) Pass object_name: which permissions touch a Graph object, what each unlocks, who can grant them, and its recent changes. (2) Pass permission_name alone (e.g. when comparing "is there a less-privileged alternative to Synchronization.ReadWrite.All"): that permission's detail plus other permissions with overlapping resource scope, annotated with resource_count and is_ownership_scoped (OwnedBy-suffixed permissions restrict to owned objects only) so you can reason about the tradeoff yourself — this does NOT rank or claim to compute "least privilege" automatically, since resource-type count and instance-level ownership scoping are different privilege axes. Role<->permission cross-referencing is a heuristic correlation (no official Microsoft crosswalk exists) — treat "grantable_by" as a strong signal to verify, not ground truth.

Input Schema

NameRequiredDescriptionDefault
limitNoMax permissions to return when using object_name (sorted narrowest-first by resource count); broad objects like "user" can match 100+
endpointNo
object_nameNoe.g. administrativeUnit, user, group, accessPackage, synchronizationJob
permission_nameNoA specific permission scope, e.g. AdministrativeUnit.Read.All or Synchronization.ReadWrite.All. If object_name is omitted, returns this permission's detail plus resource-overlapping alternatives to compare.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.10.23
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so unusually well: it discloses that it does not rank or compute least privilege, that role<->permission cross-referencing is a heuristic with no official Microsoft crosswalk, and that grantable_by must be verified rather than trusted. It also explains the semantics of is_ownership_scoped as a distinct privilege axis.

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?

Front-loaded with 'Two modes' and enumerated (1)/(2), so an agent can parse the branching quickly. Mode 2 is dense and clause-heavy with parenthetical asides, but every sentence carries substantive constraints rather than boilerplate.

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?

With no output schema, the description compensates by describing what each mode returns, including named output fields. Remaining gaps are the interaction between object_name and permission_name when both or neither are passed (all four params are optional), and how limit/endpoint apply across modes.

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 75%, so the schema already documents most parameters; the description still adds real meaning by explaining what each parameter yields (object_name → unlock/grant/change data; permission_name → overlapping-scope alternatives with resource_count and is_ownership_scoped). It does not clarify what happens if both parameters are supplied or omitted, leaving a small gap.

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

Purpose5/5

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

The description names a specific verb+resource per mode: mode 1 answers 'which permissions touch a Graph object, what each unlocks, who can grant them, and its recent changes'; mode 2 returns 'that permission's detail plus other permissions with overlapping resource scope'. This is clearly distinct from siblings like search_changes or get_object_history, which operate on change/history rather than permission scope.

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

Usage Guidelines4/5

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

It gives explicit mode-selection criteria keyed on the input parameter and supplies a concrete triggering scenario (comparing a less-privileged alternative to Synchronization.ReadWrite.All). It also states what the tool will NOT do (compute least privilege). It stops short of naming sibling alternatives or a when-not-to-use case, so it lands just below the top.

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