Skip to main content
Glama

Search Microsoft 365 Directory

search_m365_directory
Read-only

Search your organization's Microsoft 365 directory for users by name or email. Returns matching users with their title, department, and contact info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 10, max 25)
queryYesName or email to search for, e.g. 'Sarah' or 'sarah@contoso.com'
accountNoWhich connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
queryNo
usersNo
accountNoThe email (UPN) of the Microsoft 365 account this call used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / account
      Added value: +{
      +  "description": "The email (UPN) of the Microsoft 365 account this call used.",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered without the description. The description adds that results include title, department, and contact info, which is mildly useful, but with an output schema present this is largely redundant rather than additive behavioral context.

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?

Two tight sentences with the core action front-loaded and zero filler. The second sentence largely duplicates what the output schema already conveys, which keeps it from being maximally efficient.

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?

With annotations covering safety and an output schema covering return shape, the description only needs to establish scope and routing. It covers scope but omits any disambiguation from the several sibling search/person tools, which is the main remaining gap for correct tool selection.

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 three parameters (query, limit, account) are already documented in the schema, including the account UPN/id/display-name semantics. The description's 'by name or email' merely restates the query parameter, adding no syntax or format detail 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?

States a specific verb and resource: search the org's Microsoft 365 directory for users by name or email. Clear enough to act on, but it does not differentiate from nearby siblings such as get_m365_person, m365_search_contacts, or search_contacts, which an agent could plausibly confuse it with.

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?

No when-to-use guidance at all: no mention of when to prefer this over get_m365_person or m365_search_contacts, no prerequisites, no note on which account context applies. The agent must infer the routing decision entirely from the tool name.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources