Skip to main content
Glama
jaredalonzo

storelink-mcp

by jaredalonzo

MCP tools decision

Public Tools

server.py

  • list_store() > read only -- agent tool to determine which stores are available to access

  • raise_replenishment_order() > write -- provide the agent the capability to place orders on behalf of Korral

  • replenishment_order_status() > read only -- agent tool to determine the status of a placed order

  • sku_report() > read only -- agent tool to assess sku information, including supplier and lead time

Related MCP server: korral-mcp

Utility private functions (not agent tools)

server.py

  • sku_lead_time() > read only (private) -- utility tool for the sku_report public tool to determine how fast an order can be fulfilled.

  • stock_report(sku) > read only (private) -- compare what is in stock/on-hand vs recent post transactions for the sku

Observability

Package in observability/

1. Technical trace — for support / engineers

Structured JSON on the storelink_mcp.trace.technical logger, meant for diagnosing issues as they happen:

  • Explicit MCP server version (mcp_server.name + version) on every record.

  • Correlation trace_id (shared with the audit stream) and the MCP request_id.

  • Tool name and business arguments (the audit-only reason is stripped out).

  • Per-leg downstream spans — every StoreLink HTTP call with method, path, status, latency, and retry attempts, tagged leg: "mcp<->storelink".

  • On failure: the failing connection leg (duvo<->mcp vs mcp<->storelink), the unwrapped root-cause error type/message (FastMCP wraps tool errors in a ToolError; the original StoreLinkAPIError is surfaced with wrapped_by), and the full chained stack trace.

2. Audit trace — for buyers (non-technical stakeholders)

A readable line on the storelink_mcp.trace.audit logger:

  • A plain-English description of each step the agent took.

  • The agent's reasoning, captured via an optional reason argument added to every public tool (the model is instructed to always provide it).

  • A buyer-friendly outcome — a summary of the result on success, or a calm "this step could not be completed" note on failure (never a stack trace).

  • A running step_number so the actions read in order.

Keys transactions

Each StoreLink API key (X-Korral-Store-Key) is scoped to one store id.

There are two scenarios to consider per the assessment brief: a) key rotates mid-flight and b) unknown store id is referenced.

-- For a, when a key is rotated while a request is in flight e.g. storelink api returns 40x errors, invalidate the currently stored key, reload with the newly rotated key, and retry (max 3).

-- For b, when a new or unknown store is provided, before making any request to the storelink API, inform the end user (buyer) that the store number referenced is not included in the available stores, provide them explicit written instructions to ask the Korral IT team to provision a key for the store provided.

Shipping

-- Where this runs: The MCP server will run in Korall's GCP instance via GCP Cloud Run where all the data is already internal/private. Assuming that StoreLink API also exists in the same GCP instance, all the data that comes into the MCP server is also internal/private.

-- How it gets there: The MCP server will be built as a docker image that Duvo maintains and ships out to Korral for verification before they deploy new builds/changes done by Duvo.

-- How secrets are handled: see Keys transactions section

Available Tools

4 tools
list_storeA

List the stores this account can access (id, name, address, timezone).

ParametersJSON Schema
NameRequiredDescriptionDefault
reasonNoShort plain-English explanation of why you are calling this tool. Recorded on the buyer audit trail; does not affect the result.

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description alone must disclose behavior. It only mentions output fields, not side effects, auth needs, or limits. A score of 2 reflects minimal behavioral info.

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, front-loaded sentence with no wasted words. It could add more context like sorting/filtering, but is efficient.

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 no output schema, the description lists returned fields. The single optional parameter is clear. Sibling tools are distinct. Mostly complete for a basic list tool.

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 reason parameter is well-documented in the schema. The description adds no parameter info, so baseline 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 clearly states the tool lists stores with specific fields (id, name, address, timezone). It distinguishes from sibling tools like raise_replenishment_order which are inventory-related.

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 listing stores but does not explicitly state when to use this vs alternatives, nor any 'when not to use' guidance.

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

raise_replenishment_orderA

Place a replenishment order for a SKU at a store, on behalf of Korral.

Returns the created order, including its order_id and status. This is a write action — confirm the quantity is intended before calling.

ParametersJSON Schema
NameRequiredDescriptionDefault
skuYesStock-keeping unit identifier, e.g. 'sku_oat_milk'.
noteNoOptional free-text note for the order.
reasonNoShort plain-English explanation of why you are calling this tool. Recorded on the buyer audit trail; does not affect the result.
quantityYesUnits to order; must be positive.
store_idYesStoreLink store identifier, e.g. 'store_123'.

TDQS

A3.7/5.0
Behavior3/5

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

Without annotations, the description correctly labels the tool as write action and warns about confirming quantity. However, it does not disclose potential side effects, required permissions, or error conditions. It states return value partially (order_id, status) but no details on format. This is minimal 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?

Description is concise (3 sentences), front-loaded with the core action, and includes a necessary caution. Every sentence adds value.

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 description identifies the action, return value, and caution. However, it does not mention preconditions like store or SKU existence, or what 'on behalf of Korral' means. Given 5 parameters and no output schema, more context about the order creation process would be helpful.

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 already describes all 5 parameters with 100% coverage. The tool description adds no additional parameter semantics beyond restating 'SKU' and 'store'. Baseline 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 uses specific verb 'Place' and resource 'replenishment order', and defines scope (SKU, store). It clearly differentiates from siblings which are read-only or status-checking tools.

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 create an order, but does not provide explicit guidance on when not to use or how it compares to siblings like replenishment_order_status or sku_report.

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

replenishment_order_statusA

Get the current status of a previously raised replenishment order.

ParametersJSON Schema
NameRequiredDescriptionDefault
reasonNoShort plain-English explanation of why you are calling this tool. Recorded on the buyer audit trail; does not affect the result.
order_idYesReplenishment order identifier.
store_idYesStoreLink store identifier, e.g. 'store_123'.

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It only says 'get the current status' without clarifying read-only nature, possible status values, or side effects. The lack of such detail reduces 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 sentence of 12 words, front-loaded with the core purpose. Every word earns its place with no superfluous content.

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 read operation with no output schema, the description is minimally adequate. However, it lacks details on the return format (what 'status' includes) and prerequisites (e.g., order must exist), which could be helpful for agent invocation.

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 each parameter. The description adds no additional meaning beyond what the schema provides, meeting the baseline but not exceeding it.

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 verb 'Get' and the resource 'current status of a previously raised replenishment order'. It effectively distinguishes from siblings like raise_replenishment_order (creates) and list_store (lists stores).

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 after raising an order but does not explicitly state when to use or when not to use. No alternatives or exclusions are mentioned, leaving the agent to infer context.

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

sku_reportA

Consolidated reorder report for a SKU at a store.

Combines SKU details, current on-hand stock, recent POS demand, and the supplier's lead time so you can judge whether — and how urgently — to replenish. Use this before raising a replenishment order.

ParametersJSON Schema
NameRequiredDescriptionDefault
skuYesStock-keeping unit identifier, e.g. 'sku_oat_milk'.
reasonNoShort plain-English explanation of why you are calling this tool. Recorded on the buyer audit trail; does not affect the result.
store_idYesStoreLink store identifier, e.g. 'store_123'.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It indicates a read-only report (no modification implied). However, it lacks details on permissions, data freshness, or any edge cases. The description is honest but not comprehensive.

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?

Three sentences, front-loaded with the core purpose, no redundant or vague wording. Every sentence adds value, making it highly efficient.

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 output schema exists (not shown but present), the description sufficiently explains the tool's purpose and when to use it. It covers the report's contents and context without needing to detail return values, which is covered by output schema.

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 well-described parameters. The description adds no extra parameter meaning beyond what the schema provides. According to the guidelines, baseline 3 is appropriate when schema fully covers parameters.

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 it produces a consolidated reorder report combining SKU details, stock, demand, and lead time. It differentiates from siblings like list_store, raise_replenishment_order, and replenishment_order_status by focusing on a specific pre-order analysis.

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?

Explicitly says 'Use this before raising a replenishment order,' providing a clear context for invocation. While it doesn't detail when not to use or list all alternatives, the sibling context implies its role, making the guidance adequate.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedlist_store
    • First observedraise_replenishment_order
    • First observedreplenishment_order_status
    • First observedsku_report

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct operation: listing stores, generating a replenishment report, raising an order, and checking order status. No functional overlap, and descriptions clearly separate their purposes.

Naming Consistency4/5

All tools use clear, descriptive names, but the pattern is not uniform: 'list_store' and 'raise_replenishment_order' follow verb_noun, while 'replenishment_order_status' and 'sku_report' are noun phrases. This minor inconsistency does not hinder understanding.

Tool Count5/5

With 4 tools, the server is well-scoped for the domain of store replenishment. Each tool serves a necessary step in the workflow without redundancy or bloat.

Completeness4/5

The tools cover the core replenishment workflow: viewing store info, assessing stock via the SKU report, placing an order, and checking its status. A tool to list past orders or cancel/update orders would improve coverage, but the current set is functional for basic tasks.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP server that lets a Duvo agent talk to Korral's StoreLink API, enabling category buyers to offload daily stock checking, replenishment ordering, and order tracking tasks.
    -
  • F
    license
    A
    quality
    C
    maintenance
    MCP server exposing the StoreLink grocery stocking API as tools for category buyer workflows, including inventory checks and replenishment orders.
    5
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that enables operations teams to diagnose and recover stalled fulfillment orders via tools like retry_fulfillment and escalate_order, with safety boundaries limiting writes to retry and audit operations.
    -