Skip to main content
Glama
BiteFoundry Teams MCP Server

BiteFoundry Teams MCP Server

search_users

Read-onlyIdempotent

Find Microsoft Entra directory users by case-insensitive display name, email, or UPN prefix, returning user IDs and profile details; use list_members to list chat or channel participants.

Instructions

Search Microsoft Entra directory users by case-insensitive display name, email, or UPN prefix (use list_members to list participants of a specific chat/channel). Costs 1 Graph request (2 if the tenant rejects $filter and falls back to $search). Requires delegated User.ReadBasic.All or User.Read.All. Returns { users: [{ user_id, display_name, email, user_principal_name }], returned }.

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": {
      "query": "<query>"
    },
    "name": "search_users"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of matching directory users to return (1..1000, default 10).
queryYesCase-insensitive prefix matched against displayName, mail, and userPrincipalName.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of matching directory users to return (1..1000, default 10)."
    • changedInput schema / properties / query / description
      Previous value: -"Display name or email prefix to search for."New value: +"Case-insensitive prefix matched against displayName, mail, and userPrincipalName."
  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?

Beyond the annotations (readOnly, idempotent, non-destructive, open-world), the description discloses request cost including the $filter-to-$search fallback doubling the count. It also states the required delegated scopes (User.ReadBasic.All or User.Read.All) and the exact return shape, which is unusually rich operational context.

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?

Three sentences, each carrying distinct load: purpose plus routing, cost and auth, then return shape. The purpose is front-loaded and there is no filler wording.

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?

For a two-parameter read-only search with no output schema, the description covers purpose, alternative tool, permission requirements, request cost, fallback behavior, and the returned fields. An agent has everything needed to decide to call it and to interpret the response.

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 both query and limit are already documented with types, bounds, and defaults. The description restates the case-insensitive prefix behavior across displayName, mail, and userPrincipalName without adding syntax or format detail beyond the schema, so the baseline 3 applies.

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 opening clause gives a specific verb and resource ('Search Microsoft Entra directory users') plus the exact match fields (display name, email, UPN prefix). It also names the sibling list_members and clarifies that chat/channel participant listing is a different tool, so an agent can distinguish it without opening either schema.

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 routes the agent away from a plausible misuse by pointing to list_members for chat/channel participants. It lacks an explicit when-not for the search_messages sibling, but the resource distinction is clear enough that this is a minor gap rather than a missing guideline.

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