Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

create_org_product

Create a new product in your organization's catalog by specifying name, and optionally SKU, price, category, image, stock status, and description.

Instructions

Create a new product in your organization's catalog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesProduct name (required)
skuNoOptional SKU / part number
priceNoOptional price (numeric)
currencyNoISO currency code (default TRY)TRY
categoryNoOptional category slug
image_urlNoOptional product image URL (hosted image)
stock_statusNoin_stock | out_of_stock | preorderin_stock
descriptionNoOptional long description
org_idNoOptional — override the org bound to the API key

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'create_org_product' tool. Accepts product fields (name, sku, price, currency, category, image_url, stock_status, description, org_id), validates name, builds a payload dict, and delegates to the YaparAIClient.
    async def create_org_product(
        name: str,
        sku: str | None = None,
        price: float | None = None,
        currency: str = "TRY",
        category: str | None = None,
        image_url: str | None = None,
        stock_status: Literal["in_stock", "out_of_stock", "preorder"] = "in_stock",
        description: str | None = None,
        org_id: str | None = None,
    ) -> dict:
        """
        Create a new product in your organization's catalog.
    
        Args:
            name: Product name (required)
            sku: Optional SKU / part number
            price: Optional price (numeric)
            currency: ISO currency code (default TRY)
            category: Optional category slug
            image_url: Optional product image URL (hosted image)
            stock_status: in_stock | out_of_stock | preorder
            description: Optional long description
            org_id: Optional — override the org bound to the API key
    
        Returns:
            Created product record (with generated id + created_at).
        """
        if not name or not name.strip():
            raise ValueError("name is required")
        payload: dict = {"name": name.strip(), "currency": currency, "stock_status": stock_status}
        if sku:
            payload["sku"] = sku
        if price is not None:
            payload["price"] = price
        if category:
            payload["category"] = category
        if image_url:
            payload["image_url"] = image_url
        if description:
            payload["description"] = description
    
        client = YaparAIClient()
        return await client.enterprise_create_org_product(payload, org_id=org_id)
  • The function signature defines the input schema: name (required), sku, price, currency (default TRY), category, image_url, stock_status (literal enum with 'in_stock', 'out_of_stock', 'preorder'), description, and org_id.
    async def create_org_product(
        name: str,
        sku: str | None = None,
        price: float | None = None,
        currency: str = "TRY",
        category: str | None = None,
        image_url: str | None = None,
        stock_status: Literal["in_stock", "out_of_stock", "preorder"] = "in_stock",
        description: str | None = None,
        org_id: str | None = None,
    ) -> dict:
  • Registration of create_org_product as an MCP tool via mcp.tool(create_org_product) on line 181. Also imported on line 99 from yaparai.tools.enterprise.
    mcp.tool(create_org_product)
  • Client helper method that sends the actual HTTP POST request to /v1/public/enterprise/products with the payload and optional X-Organization-Id header.
    async def enterprise_create_org_product(
        self, payload: dict, org_id: str | None = None
    ) -> dict:
        headers = {"X-Organization-Id": org_id} if org_id else {}
        return await self._request(
            "POST",
            "/v1/public/enterprise/products",
            json=payload,
            headers=headers,
        )
Behavior2/5

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

With no annotations, the description must disclose behavioral traits but fails to mention idempotency, permissions, duplicate handling, or side effects. The single sentence is insufficient.

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 a single concise sentence with no redundancy. While it could be expanded with guidelines, it is appropriately short for a straightforward creation tool.

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?

Although an output schema exists (reducing need for return value docs), the description lacks behavioral context, error hints, and prerequisites, leaving it incomplete for a tool with 9 parameters and many siblings.

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?

All 9 parameters are fully described in the schema (100% coverage), so the description adds no new meaning. Baseline is 3; no extra value provided.

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 ('Create') and the resource ('new product in your organization's catalog'), distinguishing it from sibling tools like 'list_org_products' or 'update_product_stock'.

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?

The description provides no guidance on when to use this tool vs alternatives, such as checking if the product already exists or updating stock. Usage context is entirely absent.

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