Skip to main content
Glama
NyokolodiK

ecommerce-mcp

by NyokolodiK

E-commerce MCP Server

Enterprise-ready Model Context Protocol server exposing catalog, cart, and checkout tools over FastMCP, backed by the public Fake Store API.

Features

  • 8 MCP tools — catalog search, cart lifecycle, and checkout with order confirmation

  • Strict Pydantic contracts — validated inputs (range/length constraints) and structured outputs, never raw strings

  • Async everywherehttpx.AsyncClient with retry + exponential backoff for connection errors and 5xx

  • Typed error taxonomy — upstream failures surface as structured, human-readable tool errors

  • Fake Store adapter — transparently maps Fake Store's native payloads (plain arrays, title/category/image, no pagination, no order endpoint) onto the project's schemas

  • Session-persistent carts — lock-protected in-memory store, safe under concurrent tool calls

  • Layered architecture — thin FastMCP entrypoint over isolated models, services, and tools layers

Related MCP server: Online Boutique AI Assistant MCP Server

Architecture

src/
├── server.py            # Thin entrypoint: DI wiring + FastMCP registration (stdio + HTTP)
├── models/              # Strict Pydantic data contracts
│   ├── product.py       #   Product, ProductSummary, ProductListResponse
│   ├── cart.py          #   Cart, CartItem
│   └── checkout.py      #   CheckoutRequest, OrderConfirmation, pricing helpers
├── services/            # External I/O and mutable state
│   ├── store_api.py     #   Typed async client w/ retry, error taxonomy, Fake Store adapter
│   └── cart_store.py    #   Lock-protected, session-persistent cart store
└── tools/               # Class-based FastMCP tool handlers
    ├── catalog.py       #   list_products, get_product
    ├── cart.py          #   create_cart, get_cart, add_to_cart, update_cart_item, remove_cart_item
    └── checkout.py      #   checkout
tests/
├── test_models.py       # Model + pricing unit tests
├── test_server.py       # Tool-surface integration tests (respx-mocked upstream)
└── test_fakestore_adapter.py  # Fake Store payload adaptation tests

Requirements

  • Python >= 3.11

  • uv (package manager)

Setup

uv sync                          # install deps (incl. dev group)
# .env is tracked; edit STORE_API_* values if you target a different upstream
uv run pytest                    # 57 tests
uv run ruff check .              # lint
uv run mypy src tests            # typecheck

Configuration

.env is loaded by pydantic-settings at server start:

Variable

Default

Description

STORE_API_BASE_URL

https://fakestoreapi.com

Upstream store API base URL

STORE_API_TIMEOUT_SECONDS

10

Per-request read/connect timeout

STORE_API_MAX_RETRIES

2

Retries for connection errors and 5xx

When the base URL points at fakestoreapi.com, the client auto-adapts: title → name, float price → decimal string, category → categories, image → image URL, rating.count → stock approximation; catalog pages are paginated locally; checkout submits to POST /carts (Fake Store has no order endpoint) and returns a locally-computed OrderConfirmation. Any other base URL is consumed as-is (paginated {items, total, limit, offset} listing and POST /orders).

Running the server

stdio (default MCP transport)

uv run python -c "import sys; sys.path.insert(0, 'src'); from server import main; main()"

HTTP (Streamable HTTP, for Postman / remote clients)

uv run python -c "import sys; sys.path.insert(0, 'src'); from server import main_http; main_http()"

Serves POST http://127.0.0.1:8765/mcp.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ecommerce-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/ecommerce-mcp",
        "run",
        "python",
        "-c",
        "import sys; sys.path.insert(0, 'src'); from server import main; main()"
      ]
    }
  }
}

Restart Claude Desktop, then try: "List products", "Add 2 of product 1 to a cart", "Checkout with Ada Lovelace, ada@example.com, London GB, card".

Testing with Postman

The HTTP transport is session-based MCP. Send every request to POST http://127.0.0.1:8765/mcp with headers:

Content-Type: application/json
Accept: application/json, text/event-stream

1. Initialize (capture the mcp-session-id response header, then send it on all later requests):

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"postman","version":"1.0"}}}

2. List tools:

{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}

3. Call a tool:

{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_products","arguments":{"limit":5,"offset":0}}}

Suggested demo flow: list_productscreate_cartadd_to_cartget_cartcheckout.

Tools

Tool

Description

list_products

Paginated catalog search (limit 1–100, offset ≥ 0)

get_product

Single product by id (≥ 1)

create_cart

New empty cart

get_cart

Snapshot of a cart

add_to_cart

Add/merge a product line (max 999 units/line)

update_cart_item

Overwrite a line quantity

remove_cart_item

Remove a line entirely

checkout

Place an order; returns OrderConfirmation with computed shipping/tax/total

Available Tools

8 tools
add_to_cartA

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

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

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.

TDQS

A4.2/5.0
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.

checkoutA

Place an order from a cart and confirm it with the store.

ParametersJSON Schema
NameRequiredDescriptionDefault
requestYesInput contract for the ``checkout`` tool.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsYesThe purchased line items.
statusYesOrder lifecycle status.
totalsYesAggregated monetary totals.
cart_idYesCart this order was placed from.
order_idYesUpstream order identifier.
created_atYesUTC timestamp of order creation.
estimated_deliveryYesExpected delivery date.

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It says 'confirm it with the store' but does not explain side effects like order creation, payment processing, cart clearing, or potential failures. Minimal behavioral detail beyond the obvious.

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 sentence with no redundant wording, making it exceptionally concise and front-loaded with the core action.

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 the complex nested schema and presence of an output schema, the description is minimal but adequate for a straightforward action. However, it lacks context on preconditions (e.g., cart must exist, items in stock) and post-conditions beyond 'confirm.' With no annotations, a bit more context would help.

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% with detailed descriptions for all properties (cart_id, customer, shipping_address, payment_method). The description adds no parameter-specific semantics, but the schema fully documents them, so a baseline of 3 applies.

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 'Place an order from a cart and confirm it with the store,' using a specific verb and resource. It distinguishes from sibling tools like add_to_cart and get_cart by focusing on finalizing the purchase.

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

Usage Guidelines4/5

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

The description implies usage when the cart is ready to be finalized, but it does not explicitly mention when to use this tool versus alternatives or any exclusions. Sibling tools like add_to_cart suggest it is the final step, but no explicit guidance is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_cartA

Start a new shopping session and return an empty cart.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It clearly states that a new session is started and an empty cart is returned, but it does not mention side effects, such as whether an existing cart is overwritten or if authentication is required. This is minimal but not misleading.

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 sentence that is front-loaded with the action and resource. It contains no unnecessary words or repetition, making it extremely concise and well-structured.

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?

With no parameters and an output schema present, the description is sufficient for a simple creation tool. It fully communicates the tool's function and return value. However, it could slightly benefit from mentioning potential side effects, but this is not critical given the simplicity.

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 tool has zero parameters, so the description need not explain parameter semantics. Per the baseline for zero-parameter tools, a score of 4 is appropriate, as the description adds no irrelevant information.

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 the specific verb 'Start' and clearly identifies the resource as 'a new shopping session', while also stating the return value ('empty cart'). This distinguishes it from sibling tools like get_cart or add_to_cart, making the purpose unambiguous.

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 this is the initial step in a shopping session, but it does not explicitly state when to use it versus alternatives like get_cart or add_to_cart. No exclusions or alternative recommendations are provided, leaving the usage context somewhat implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_cartA

Read the current contents of a cart.

ParametersJSON Schema
NameRequiredDescriptionDefault
cart_idYesUnique cart identifier.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It only states 'Read,' which is essentially the tool's name, without mentioning error behavior, side effects, or any prerequisites. It does not clarify what happens if the cart does not exist or whether this operation is read-only.

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, concise sentence with no redundant wording. It is appropriately sized for the tool's simplicity.

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?

The tool is simple, has an output schema, and the description states its core purpose. However, the lack of behavioral details (e.g., error handling, side effects) and no annotation support leaves some contextual gaps, making it minimally adequate rather than fully complete.

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%, and the schema already describes cart_id as 'Unique cart identifier.' The description adds no additional meaning about the parameter or how to use it, so the baseline of 3 is appropriate.

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 'Read the current contents of a cart' uses a specific verb (read) and specifies the resource (cart contents), clearly differentiating it from siblings like add_to_cart or update_cart_item that modify the cart.

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 when needing to view cart contents, but provides no explicit guidance on when to use this tool versus alternatives or any exclusions. It does not mention, for example, that this is only for reading and not for modifying items.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_productA

Fetch a single product by its numeric identifier.

ParametersJSON Schema
NameRequiredDescriptionDefault
product_idYesNumeric product identifier.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYesStable numeric product identifier.
skuYesMerchant stock-keeping unit.
nameYesDisplay name.
priceYesUnit price.
stockYesQuantity currently available for sale.
currencyYesISO 4217 currency code for `price`.
image_urlNoPrimary product image URL.
is_activeNoWhether the product is listed for sale.
categoriesNoCategory tags.
descriptionNoLong-form description.

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. The verb 'Fetch' clearly indicates a read-only operation, but the description does not disclose error behavior (e.g., product-not-found) or any constraints beyond the parameter, leaving edge cases unspecified.

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, focused sentence that immediately states the operation and the key parameter. There are no wasted words or redundant details, making it highly concise and front-loaded.

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 simple getter with one well-documented parameter and an output schema, the description sufficiently conveys the tool's purpose. However, it lacks explicit usage guidance and error-handling details, which slightly reduces completeness for a fully self-contained definition.

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 already documents product_id as 'Numeric product identifier' with a minimum of 1. Since schema description coverage is 100%, the description's reference to 'numeric identifier' adds no additional semantic value, meriting the baseline score of 3.

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 the specific verb 'Fetch' and identifies the resource as a single product, clearly distinguishing it from sibling tools like list_products. It also mentions the key identifier, making the purpose unambiguous.

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?

No explicit guidance is given about when to use this tool versus alternatives such as list_products. The word 'single' implies a contrast with list tools, but no when-not-to-use or alternative tool is named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_productsB

Search the product catalog with pagination.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum page size.
offsetNoNumber of products to skip.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsYesProducts on the current page.
limitYesMaximum page size requested.
totalYesTotal number of matching products.
offsetYesNumber of matching products skipped.

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits itself. It only mentions pagination, which is somewhat helpful, but omits whether the operation is read-only, the default result ordering, or any constraints on the catalog search (e.g., whether it returns all products or only in-stock items).

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, efficient sentence that says exactly what the tool does without redundancy. It is appropriately sized for a simple list endpoint.

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?

The tool has only two well-documented parameters and an output schema, so invocation is clear. However, the description omits any guidance on how this tool fits with siblings (e.g., using get_product for details), and the lack of annotations leaves safety/read-only status uncommunicated. Overall, it is minimally viable but with gaps.

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 descriptions cover 100% of parameters, so the baseline is 3. The description's mention of 'pagination' adds minimal extra meaning beyond the schema's limit/offset descriptions, so it does not elevate the score.

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 the action ('Search') and resource ('product catalog'), and adds pagination as a key behavior. It is clear enough to distinguish from siblings like get_product (singular) and cart operations, though 'search' is slightly vague since the only parameters are pagination controls, not query terms.

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 is provided on when to use this tool versus alternatives. It does not mention that get_product is for individual product details or that cart tools are for cart operations, leaving the agent to infer the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

remove_cart_itemA

Remove a product line from a cart entirely.

ParametersJSON Schema
NameRequiredDescriptionDefault
cart_idYesUnique cart identifier.
product_idYesNumeric product identifier.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It discloses that the tool removes a product line, but does not mention side effects on cart totals, idempotency, error handling, or required permissions. The word 'entirely' adds minimal behavioral context but is insufficient for a mutation tool.

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, direct sentence that is front-loaded with the verb and resource. It contains no extraneous words and is appropriately sized for the tool's simplicity.

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?

For a simple two-parameter removal operation, the description states the essential action. However, it lacks context about whether the cart or product must exist, what happens on failure, or how the response appears. The existence of an output schema mitigates the need to explain return values, but the description is still minimal.

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 already provides clear descriptions for both cart_id and product_id (100% coverage). The description adds no additional parameter-specific meaning beyond what the schema gives, so it meets the baseline.

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 (remove) and the resource (a product line from a cart). The word 'entirely' distinguishes it from tools like update_cart_item, making the purpose unambiguous.

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?

No explicit guidance is provided about when to use this tool versus alternatives like update_cart_item. The intended use is implied by the action, but there are no exclusions, prerequisites, or mention of sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_cart_itemA

Overwrite the quantity of a product line in a cart.

ParametersJSON Schema
NameRequiredDescriptionDefault
cart_idYesUnique cart identifier.
requestYesInput contract for the ``update_cart_item`` tool.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It clearly communicates the mutation ('overwrite') and the scope (quantity of a line item), which is transparent for this simple operation. It does not discuss side effects or errors, but the existence of an output schema covers return values, and the description is not misleading or incomplete for the core behavior.

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 sentence with no filler. It is front-loaded and directly states the action and target, making it easy to scan and 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?

For a simple mutation tool with two parameters (including a nested object) and an output schema, the description covers the core purpose and is sufficient. It does not mention preconditions (e.g., item must already exist in the cart) or how to obtain product_id, but the sibling context and schema partially compensate. Overall, it is adequate given the tool's simplicity.

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 description coverage is 100%, so the schema already documents both parameters (cart_id and request) with descriptions and constraints. The description adds no parameter-specific meaning beyond the word 'quantity', which does not exceed what the schema already states. This meets the baseline for full schema 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 uses the specific verb 'overwrite' and names the exact resource ('quantity of a product line in a cart'), clearly distinguishing it from sibling tools like add_to_cart or remove_cart_item. It is immediately clear what action is performed.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The name and wording imply usage for updating an existing cart line's quantity, but there is no mention of prerequisites, scenarios where this is preferred, or when another tool (e.g., add_to_cart) would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a distinct action-resource pair: products (list/get), cart operations (create/get/add/update/remove), and checkout. No two tools overlap in purpose, making selection unambiguous.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (list_products, get_product, create_cart, update_cart_item, remove_cart_item). 'checkout' is a clear, standard verb for the action, and the overall naming is predictable and readable.

Tool Count5/5

With 8 tools, the server is well-scoped for ecommerce cart and catalog management. Each tool covers a necessary operation without redundancy or bloat, fitting the typical ideal range.

Completeness4/5

The tool set covers the full lifecycle of a cart (create, read, add/update/remove items, checkout) and product browsing (list, get). Minor gaps include no explicit delete-cart or order-history tool, but these are not critical for the core shopping flow.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with a complete e-commerce application, providing authentication, product browsing, and shopping cart management through standardized MCP tools.
  • A
    license
    A
    quality
    C
    maintenance
    A UCP-compliant MCP storefront server that exposes product catalog operations (search, cart, checkout) as MCP tools, following UCP schema version 2026-04-08.
    5
    MIT

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