Skip to main content
Glama

search_contacts

Retrieve and filter contacts from Microsoft Outlook using a specific query and account ID, bypassing limitations of unified search. Ideal for targeted contact management.

Instructions

Search contacts. Uses traditional search since unified_search doesn't support contacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
limitNo
queryYes

Implementation Reference

  • The implementation of the search_contacts tool, decorated with @mcp.tool for automatic registration in FastMCP. It performs a search on contacts using the Microsoft Graph API's traditional search endpoint.
    @mcp.tool
    def search_contacts(
        query: str,
        account_id: str,
        limit: int = 50,
    ) -> list[dict[str, Any]]:
        """Search contacts. Uses traditional search since unified_search doesn't support contacts."""
        params = {
            "$search": f'"{query}"',
            "$top": min(limit, 100),
        }
    
        contacts = list(
            graph.request_paginated("/me/contacts", account_id, params=params, limit=limit)
        )
    
        return contacts
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'traditional search' but doesn't explain what that means operationally - whether it's a fuzzy search, exact match, what fields are searched, or any limitations. It also doesn't disclose important behavioral aspects like pagination, rate limits, authentication requirements, or error conditions.

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 extremely concise - just two short sentences that get straight to the point. Every word earns its place, with no redundant information or unnecessary elaboration. It's front-loaded with the core purpose and follows with the key contextual constraint.

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

Completeness2/5

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

For a search tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what constitutes a contact, what fields are searchable, what the search returns, or how results are structured. The mention of 'traditional search' is vague and doesn't provide enough operational context for effective use.

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

Parameters2/5

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

With 0% schema description coverage for 3 parameters, the description provides no information about what the parameters mean or how they should be used. It doesn't explain what 'account_id' refers to, what format the 'query' should take, or what the 'limit' parameter controls. The description fails to compensate for the complete lack of schema documentation.

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?

The description clearly states the action ('Search') and resource ('contacts'), making the purpose immediately understandable. It distinguishes this tool from 'unified_search' by noting that unified_search doesn't support contacts, but doesn't explicitly differentiate it from other sibling search tools like 'search_emails' or 'search_events'.

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

Usage Guidelines3/5

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

The description provides some usage context by explaining why this tool exists ('since unified_search doesn't support contacts'), which implies when to use this instead of unified_search. However, it doesn't offer explicit guidance on when to use this versus other sibling search tools (search_emails, search_events, search_files) or versus list_contacts.

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

Related 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/elyxlz/microsoft-mcp'

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