Skip to main content
Glama

Search Contacts

search_contacts
Read-onlyIdempotent

Search contacts by name, email, or phone number using prefix matching. Get results from your Microsoft account.

Instructions

📖 Search contacts (read-only, safe for unsupervised use)

Searches contact names, email addresses, and phone numbers. Uses $filter with prefix matching (startswith) for all account types due to Graph API limitations.

Note: Contact search is limited to prefix matching and may not find matches in the middle of names.

Args: query: Search query string (1-512 characters, used as prefix) account_id: Microsoft account ID limit: Maximum results to return (1-500, default: 50) use_cache: Whether to use cache (default: True) force_refresh: Bypass cache and fetch fresh data (default: False)

Returns: List of matching contacts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
account_idYes
limitNo
use_cacheNo
force_refreshNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond annotations (readOnlyHint, etc.), the description explains the Graph API prefix matching limitation, caching behavior, and that it is safe for unsupervised use. No contradiction with annotations.

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 concise, well-structured with an emoji header, clear sections, and a bullet list of arguments. Every sentence adds value, and the structure aids quick understanding.

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 output schema exists, the description adequately covers search behavior, caching, parameter constraints, and limitations. It is complete for a read-only search tool without needing to detail return format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description explains all parameters: query as a prefix string (1-512 chars), account_id, limit with range and default, and cache flags. Missing details like account_id format, but overall adds sufficient meaning.

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 it searches contacts by names, emails, and phone numbers, and distinguishes from sibling tools by specifying contact-specific search. It also mentions it's read-only and safe, using a specific verb 'search' and a clear resource 'contacts'.

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?

The description indicates when to use the tool (for searching contacts) and notes limitations like prefix matching, but it does not explicitly contrast with sibling tools like contact_list or search_unified. However, the context makes it clear that this is for search with filtering.

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/robin-collins/m365-mcp'

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