Skip to main content
Glama

create_cart_link

Read-onlyIdempotent

Create a pre-filled shopping cart URL for Rakentaja Outlet.

Given a list of product IDs and quantities, returns a URL that the user can open in their browser. When they open the link, the items are added to their browser cart session, and they are redirected either to the cart page (default) or directly to checkout.

This tool is FULLY SIDE-EFFECT-FREE: it does not create the cart on the server, does not touch any database, and does not modify any state. The cart materializes only when the user chooses to open the URL. This is a deliberate security design — the user always approves cart contents visibly before the state change happens.

Args: items: List of {"product_id": int, "quantity": int} dicts. Maximum 20 items, maximum quantity 50 per line. Use search_catalog + get_product_details to find IDs first. checkout: If True, the link takes the user directly to checkout (skipping the cart review page). Default False — user sees the cart first, which is safer and more transparent.

Returns: JSON with: - url: the browser URL to give the user. Contains all cart items as query parameters. Opening it will populate their cart. - items: deduplicated items list that will be added (same product_id appearing multiple times is merged with combined quantity) - total_lines: number of unique products in the link - total_quantity: sum of quantities across all products - checkout: echoed checkout flag - disclaimer: legal notice about approval flow

On error, raises MCP ToolError → response has isError:true with
structured JSON: {"error": {"code": "empty_items" | "too_many_items"
| "invalid_item" | "quantity_too_large" | "products_not_found"
| "backend_unavailable", "message": "...", "field": null,
"retryable": true|false}}. The StructuredErrorMiddleware ensures
consistent format across all tools.

Example: create_cart_link(items=[ {"product_id": 9437, "quantity": 2}, {"product_id": 4927, "quantity": 1}, ]) → {"url": "https://rakentajaoutlet.fi/mcp-backend/lisaa-kori?items=9437:2,4927:1", ...}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesCart items (1-20 lines)
checkoutNoIf True, link goes directly to checkout; otherwise to cart review page

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesBrowser URL to give the user — opening it populates their cart
itemsYesDeduplicated cart items
checkoutYesIf true, link takes user directly to checkout
disclaimerYes
total_linesYesNumber of unique products in link
total_quantityYesSum of quantities across all products

TDQS

A4.7/5.0
Behavior5/5

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

The description explicitly states it is side-effect-free, does not create a server-side cart, and that the state change occurs only when the user opens the URL. This aligns with annotations (readOnlyHint, idempotentHint) and adds valuable security context.

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 well-structured with sections (Args, Returns, Example) and front-loaded with the purpose. It is slightly verbose but every section is informative and 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 annotations, full schema coverage, and presence of an output schema in the description, the tool definition is complete. It explains return fields, error handling, and gives a concrete example, leaving no gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds meaning beyond the schema: explains max items (20), max quantity (50), duplicate merging, and default behavior for checkout. Also includes an example and error code details.

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 tool's purpose: 'Create a pre-filled shopping cart URL for Rakentaja Outlet.' It uses a specific verb ('create') and resource ('cart link'), and distinguishes itself from sibling tools like search_catalog and get_product_details.

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 explains when to use the tool (given product IDs and quantities), provides prerequisites (using search_catalog + get_product_details), and mentions the user approval flow. It lacks an explicit when-not to use, but the context is clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: cart link generation, product details, catalog search, and policy/FAQ search. No overlap or ambiguity.

Naming Consistency5/5

All tools use a consistent verb_noun pattern in snake_case: create_cart_link, get_product_details, search_catalog, search_shop_policies_and_faqs.

Tool Count4/5

With 4 tools, the set is well-scoped for a store assistant. It covers core shopping flows without being bloated. A category listing tool could be a minor addition.

Completeness4/5

Covers product search, details, cart creation, and policies. Missing user account or order management, but these are reasonable omissions for the assistant role.

Resources