Skip to main content
Glama
NyokolodiK

ecommerce-mcp

by NyokolodiK

add_to_cart

Add a product to a cart, automatically merging quantities if the product already exists in the cart.

Instructions

Add a product to a cart, merging with an existing line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYesUnique cart identifier.
requestYesInput contract for the ``add_to_cart`` tool.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.
Behavior4/5

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

No annotations are provided, so the description carries the burden. It explicitly discloses the merging behavior with existing lines, which is a key behavioral trait beyond the action itself. However, it does not mention error handling or prerequisites, slightly reducing transparency.

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?

The description is a single, front-loaded sentence that communicates the core purpose and key behavior with no wasted words.

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?

For a relatively simple tool with a nested object parameter and output schema available, the description covers the essential purpose and the notable merging behavior. Missing details about cart existence or error conditions are minor given the schema and sibling context.

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?

Schema coverage is 100% with parameter descriptions already provided. The tool-level description adds meaning by explaining that the quantity is merged with an existing line, clarifying how the quantity parameter behaves.

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 uses a specific verb ('Add') with a clear resource ('product to a cart') and distinguishes from sibling tools by specifying the merging behavior. It clearly conveys the tool's function.

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 adding items to a cart but does not explicitly state when to prefer this tool over update_cart_item or remove_cart_item. It lacks explicit exclusions or alternative guidance.

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/NyokolodiK/ecommerce-mcp'

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