Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

get_customer

Retrieve a complete customer profile including contact details, tags, notes, conversation history, and order information to manage customer relationships.

Instructions

Get detailed customer information.

Returns full customer profile including contact details, tags, notes, conversation history, and order info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYesCustomer ID (from list_customers results)
org_idNoOrganization ID (uses YAPARAI_ORG_ID env var if not provided)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler for the 'get_customer' tool. Takes a customer_id and optional org_id, resolves the org ID, creates a client, and calls the CRM API to get customer details.
    async def get_customer(
        customer_id: str,
        org_id: str | None = None,
    ) -> dict:
        """
        Get detailed customer information.
    
        Returns full customer profile including contact details, tags,
        notes, conversation history, and order info.
    
        Args:
            customer_id: Customer ID (from list_customers results)
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            Dict with customer details: name, phone, email, address, tags,
            notes, platform, avatar_url, created_at, last_interaction.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        return await client.crm_get_customer(oid, customer_id)
  • Input schema for the tool: requires customer_id (str), accepts optional org_id (str | None), returns a dict.
    async def get_customer(
        customer_id: str,
        org_id: str | None = None,
    ) -> dict:
  • Registration of get_customer as an MCP tool on the FastMCP server instance. The function is imported from yaparai.tools.crm on line 86.
    mcp.tool(get_customer)
  • Import of get_customer from the CRM tools module into the server module for registration.
    # --- Enterprise: CRM ---
    from yaparai.tools.crm import (
        list_customers,
        get_customer,
  • HTTP client helper that performs a GET request to the CRM customer detail endpoint at /api/enterprise/orgs/{org_id}/crm/customers/{customer_id}.
    async def crm_get_customer(self, org_id: str, customer_id: str) -> dict:
        """Get customer details."""
        return await self._request(
            "GET", f"/api/enterprise/orgs/{org_id}/crm/customers/{customer_id}"
        )
Behavior3/5

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

No annotations provided, so the description alone must convey behavior. It states it 'returns' data, implying a read operation, but does not explicitly confirm read-only, required permissions, or lack of side effects. For a retrieval tool this is adequate but not fully transparent.

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?

Two concise sentences, front-loaded with purpose, and no redundant information. Every word earns its place.

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 the presence of an output schema, the description appropriately summarizes key return fields. Parameter documentation is complete via schema. No gaps for this straightforward retrieval tool.

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 coverage is 100%, so baseline is 3. The description does not add additional meaning beyond what's already in the schema descriptions for 'customer_id' and 'org_id'.

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 the verb 'Get', the resource 'detailed customer information', and lists specific return fields (contact details, tags, notes, conversation history, order info). It distinguishes from sibling 'list_customers' which returns a list, not a detailed profile.

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 implies usage for retrieving a single full customer profile but provides no explicit guidance on when to use vs alternatives like 'read_conversation' or 'list_customers', nor does it state when not to use.

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/ilhankilic/yaparai-mcp'

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