Skip to main content
Glama

get_contacts

Retrieve your contacts to enable task sharing and collaboration within Remember The Milk.

Instructions

Get contacts for task sharing.

Returns: List of contacts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler function for the 'get_contacts' tool. Calls rtm.contacts.getList API, processes the contact data (normalizing single dict to list), and returns a structured response with contacts and count.
    @mcp.tool()
    async def get_contacts(ctx: Context) -> dict[str, Any]:
        """Get contacts for task sharing.
    
        Returns:
            List of contacts
        """
        from ..client import RTMClient
    
        client: RTMClient = await get_client()
    
        result = await client.call("rtm.contacts.getList")
    
        contacts_data = result.get("contacts", {}).get("contact", [])
        if isinstance(contacts_data, dict):
            contacts_data = [contacts_data]
    
        contacts = []
        for contact in contacts_data:
            contacts.append(
                {
                    "id": contact.get("id"),
                    "fullname": contact.get("fullname"),
                    "username": contact.get("username"),
                }
            )
    
        return build_response(
            data={
                "contacts": contacts,
                "count": len(contacts),
            },
        )
  • The registration function 'register_utility_tools' that wraps all utility tools including get_contacts (using @mcp.tool() decorator on line 266).
    def register_utility_tools(mcp: Any, get_client: Any) -> None:
  • Tool registration call in server.py that invokes register_utility_tools(mcp, get_client) to register get_contacts and other utility tools.
    register_utility_tools(mcp, get_client)
  • Import of register_utility_tools from tools package in server.py.
        register_utility_tools,
    )
  • The build_response helper used by get_contacts to format the structured response with data and metadata.
    def build_response(
        data: dict[str, Any] | list[Any],
        analysis: dict[str, Any] | None = None,
        transaction_id: str | None = None,
    ) -> dict[str, Any]:
        """Build a consistent response structure.
    
        Args:
            data: The main response data
            analysis: Optional analysis/insights
            transaction_id: Optional transaction ID for undo support
    
        Returns:
            Structured response dict
        """
        response = {
            "data": data,
            "metadata": {
                "fetched_at": datetime.now().isoformat(),
            },
        }
    
        if analysis:
            response["analysis"] = analysis
    
        if transaction_id:
            response["metadata"]["transaction_id"] = transaction_id
    
        return response
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 but only states 'Returns: List of contacts'. It does not disclose authentication needs, rate limits, or what constitutes a contact (e.g., user vs group).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at two sentences. It wastes no words, but the second sentence is redundant with the title. Could include more behavioral context without losing conciseness.

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

Completeness3/5

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

Given no parameters and an output schema exists, the description minimally explains the purpose. However, it lacks context about what contacts are and how they relate to task sharing, especially compared to siblings like get_groups.

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?

The input schema has zero parameters with 100% coverage, so the description adds no parameter details. Baseline for zero parameters is 4; however, it could hint at implicit filters (e.g., 'for task sharing' implies a specific subset).

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 states 'Get contacts for task sharing', which clearly indicates the verb and resource. It distinguishes this tool from siblings, as no other contact-related tool exists on the server.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. There is no mention of context or exclusions, leaving the agent without decision support.

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/ljadach/rtm-mcp'

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