Skip to main content
Glama
EntraID MCP Server

EntraID MCP Server

by baoduy

Get User Audit Logs

get_user_audit_logs
Read-only

Get all relevant directory audit logs for a user by user_id within the last N days (default 30).

Instructions

Get all relevant directory audit logs for a user by user_id within the last N days (default 30).

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": {
      "user_id": "<user_id>"
    },
    "name": "get_user_audit_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
user_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3/5.0
Behavior3/5

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

The readOnlyHint annotation already tells the agent this is a safe read. The description does add useful scope detail beyond annotations, namely the default 30-day window, but it leaves 'all relevant' undefined — no indication whether logs are filtered, truncated, paginated, or capped by volume.

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?

One front-loaded sentence with no filler; the time-window qualifier is attached directly to the resource. It is efficient, though slightly under-specified rather than over-long.

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

Completeness3/5

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

An output schema exists and the readOnlyHint covers safety, so the description needn't explain return shape. Still, for an audit-log tool whose result volume matters, the undefined 'relevant' filtering and missing user_id format leave real gaps for correct invocation.

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 carry the load. It explains the days parameter's default (30 days) but not user_id's expected format (object ID vs UPN/email), leaving a required parameter's semantics to guesswork.

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?

States a specific verb and resource (get directory audit logs) scoped to a user via user_id and a time window. It is clear what it fetches, but unlike a top-tier definition it does not distinguish itself from close siblings such as get_user_sign_ins, and 'all relevant' leaves the resource meaning slightly fuzzy.

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 choose this over get_user_sign_ins, get_user_mfa_status, or other user-activity siblings, and no exclusions or prerequisites are stated. Usage is only implicitly inferable from the one-sentence purpose.

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