Skip to main content
Glama

Supplier Performance Analysis

ps_supplier_performance
Read-onlyIdempotent

Analyze supplier performance across products, stock, and orders to calculate product counts, stock levels, revenue, and average margins for a chosen lookback period.

Instructions

Analyse supplier performance by crossing suppliers, products, stock, and orders.

Calculates per supplier: number of products, total stock, revenue generated, average margin.

Args:

  • days: Lookback period in days (default: 90)

  • lang_id: Language ID for supplier names (default: "1")

Returns: Array of suppliers with performance metrics.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ps_supplier_performance"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLookback period in days
lang_idNoLanguage ID for supplier names1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered. The description adds genuinely useful context that this is a multi-entity cross/aggregation query over suppliers, products, stock and orders, and states the return shape as an array of suppliers, but it says nothing about cost, pagination or limits for what is likely an expensive join.

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?

Front-loads the purpose, then a compact metric list, then an Args block and a Returns line, which is easy to scan. Minor waste: the default values restated in Args duplicate what the schema already declares.

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?

No output schema exists, yet the description compensates by naming the return type (array of suppliers) and the per-supplier metrics, which is the key information an agent needs to judge fit. Guidance on alternative tools and on result size/pagination would make it 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 both parameters are already documented, so the baseline is 3. The description merely repeats the schema defaults ('default: 90', 'default: "1"') rather than adding format or semantic detail such as the valid language ID range or how a wider lookback affects results.

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?

Names a specific verb (analyse/crosses) and resource (supplier performance) and enumerates the exact metrics computed: product count, total stock, revenue, average margin. That is far more than a restated title, though it never distinguishes itself from analogous analysis siblings such as ps_category_performance in the surrounding context.

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 says what it computes but never says when to choose it, when not to, or what to use instead (e.g. supplier lookup via ps_get_supplier or category-level performance). Only the default 90-day window hints at scope; no prerequisites or exclusions are given.

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

Deploy Server

Other Tools