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

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

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / limit / maximum
      Added value: +25
  2. 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"
      +}
  3. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds that results come from the organization's directory and include title, department, and contact info, but omits pagination/limit behavior and what happens when nothing matches; an output schema exists, so return-shape disclosure is not required.

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?

Two sentences: the first states the action and matching keys, the second states the return content. Front-loaded with no filler or repetition.

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 simple read-only search with full schema documentation, annotations, and an output schema, the description is nearly sufficient. The only real gap is routing among the several contact/person lookup siblings, which the description never resolves.

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 coverage is 100%, with the query, limit, and account parameters each fully documented in the schema. The description only echoes that name or email matching is supported and says nothing about the default 10 / max 25 limit or account selection, so it adds marginal value over structured data. Baseline 3 applies.

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?

Names a specific verb (search) and resource (Microsoft 365 directory users) and states the matching keys (name or email). It does not distinguish itself from nearby siblings such as m365_search_contacts, get_m365_person, or search_contacts, leaving the agent to infer that this is the org directory rather than the personal contacts store.

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 when-to-use guidance and no mention of alternatives. With get_m365_person (single-person lookup) and m365_search_contacts (contact search) in the sibling list, the description should say which one to pick, but it says nothing.

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