Skip to main content
Glama

directory_search_users

Read-onlyIdempotent

Find any user in the Entra ID directory by name, email, or UPN. Returns id, name, email, job title, department, and office for each match.

Instructions

Search every user account in the Entra ID tenant directory by display name, email or UPN. Returns id, name, email, job title, department and office. Use this to find anyone in the organisation; people_search only covers colleagues the signed-in user already interacts with, and ranks by relevance rather than matching the whole directory. Guest accounts cannot run this query. Requires User.Read.All.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesUser name, email, or UPN to search for
max_resultsNoMaximum results to return (1-50)
Behavior5/5

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

Beyond the annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint), the description adds critical behavioral context: 'Guest accounts cannot run this query. Requires User.Read.All.' It also lists return fields (id, name, email, job title, department, office), which is useful and not fully covered by annotations. This goes well beyond mere read-only disclosure.

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?

The description is 4 sentences, with the main action and scope in the first sentence, return fields in the second, usage guidance in the third, and access constraints in the fourth. Every sentence adds distinct information with no redundancy or filler. The structure is front-loaded and well-organized.

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

Completeness5/5

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

Given that there is no output schema, the description compensates by explicitly listing return fields. It covers search parameters via schema, usage context via the people_search comparison, and access prerequisites via permission requirements and guest restriction. This is sufficiently complete for a straightforward search tool.

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 the baseline is 3. The description adds minimal extra meaning beyond the schema—it repeats the query fields ('display name, email or UPN') which already appear in the query parameter description. The max_results parameter is not elaborated further, but the schema covers it. Thus the description provides marginal additional semantic value.

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 clearly states the action: 'Search every user account in the Entra ID tenant directory by display name, email or UPN.' It specifies the resource (user accounts) and scope (Entra ID tenant), and differentiates from the sibling tool people_search by explaining coverage and ranking differences.

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

Usage Guidelines5/5

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

The description explicitly provides when to use this tool: 'Use this to find anyone in the organisation; people_search only covers colleagues the signed-in user already interacts with, and ranks by relevance rather than matching the whole directory.' This directly contrasts with an alternative tool and clarifies the preferred scenario.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nitin27may/ms-graph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server