Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

extract_customer_info

Extract customer name, phone, email, and address from conversation history to auto-fill CRM records.

Instructions

Extract contact information from conversation history using AI.

The AI reads through all messages with this customer and extracts their name, phone number, email address, and physical address. Great for auto-filling CRM records from chat conversations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYesCustomer ID to extract info for
org_idNoOrganization ID (uses YAPARAI_ORG_ID env var if not provided)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the extract_customer_info tool. It resolves the org ID, creates an API client, and delegates to client.crm_extract_info().
    async def extract_customer_info(
        customer_id: str,
        org_id: str | None = None,
    ) -> dict:
        """
        Extract contact information from conversation history using AI.
    
        The AI reads through all messages with this customer and extracts
        their name, phone number, email address, and physical address.
        Great for auto-filling CRM records from chat conversations.
    
        Args:
            customer_id: Customer ID to extract info for
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            Dict with extracted info: name, phone, email, address.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        return await client.crm_extract_info(oid, customer_id)
  • The function signature and docstring define the input schema (customer_id required, org_id optional) and output schema (dict with name, phone, email, address).
    async def extract_customer_info(
        customer_id: str,
        org_id: str | None = None,
    ) -> dict:
        """
        Extract contact information from conversation history using AI.
    
        The AI reads through all messages with this customer and extracts
        their name, phone number, email address, and physical address.
        Great for auto-filling CRM records from chat conversations.
    
        Args:
            customer_id: Customer ID to extract info for
            org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided)
    
        Returns:
            Dict with extracted info: name, phone, email, address.
        """
        oid = resolve_org_id(org_id)
        client = YaparAIClient()
        return await client.crm_extract_info(oid, customer_id)
  • Import of extract_customer_info from the crm module into the server registration file.
    from yaparai.tools.crm import (
        list_customers,
        get_customer,
        extract_customer_info,
        send_shipping_info,
        bulk_message,
        sync_customers_from_inbox,
    )
  • Explicit registration of extract_customer_info as an MCP tool via mcp.tool() call.
    # Enterprise: CRM (6)
    mcp.tool(list_customers)
    mcp.tool(get_customer)
    mcp.tool(extract_customer_info)
    mcp.tool(send_shipping_info)
    mcp.tool(bulk_message)
    mcp.tool(sync_customers_from_inbox)
  • HTTP client method crm_extract_info that sends a POST request to the Enterprise API endpoint to extract customer info from conversations using AI.
    async def crm_extract_info(self, org_id: str, customer_id: str) -> dict:
        """Extract customer info from conversations via AI."""
        return await self._request(
            "POST", f"/api/enterprise/orgs/{org_id}/crm/customers/{customer_id}/extract-info"
        )
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions that the AI reads all messages to extract info, implying a read operation, but does not disclose potential costs, permissions, or side effects. Some transparency but incomplete.

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 concise and front-loaded with the main purpose. It could be slightly tighter, but it is well-structured and easy to understand.

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

Completeness4/5

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

Given that an output schema exists (so return values are covered), and the description lists the extracted fields (name, phone, email, address), the description is complete enough for a tool that reads conversation history. It lacks mention of edge cases or behavior for missing info, but overall adequate.

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?

The input schema covers both parameters with descriptions. The tool description adds no extra meaning beyond the schema. Baseline score of 3 is appropriate given 100% schema description coverage.

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 action (extract) and the resource (contact information from conversation history). It distinguishes itself from sibling tools like list_customers or get_customer by focusing on extraction from conversation history.

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 a use case ('auto-filling CRM records from chat conversations') but does not explicitly state when not to use or mention alternatives among siblings. The usage is implied but not fully guided.

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