list_contacts
Retrieve and manage Outlook contacts by fetching a specified number of entries linked to an account ID using Microsoft MCP server integration.
Instructions
List contacts
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": {
"account_id": "<account_id>"
},
"name": "list_contacts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | ||
| limit | No |
Implementation Reference
- src/microsoft_mcp/tools.py:640-649 (handler)The handler function for the 'list_contacts' tool, decorated with @mcp.tool for registration. It fetches a list of contacts from Microsoft Graph API for the specified account_id, with optional limit.
@mcp.tool def list_contacts(account_id: str, limit: int = 50) -> list[dict[str, Any]]: """List contacts""" params = {"$top": min(limit, 100)} contacts = list( graph.request_paginated("/me/contacts", account_id, params=params, limit=limit) ) return contacts