Skip to main content
Glama

Run Demand Analysis

run_demand_analysis

Run the demand analysis and persist a report. Inside the plan-derived reuse window (30 days for Free, 24h for paid tiers) with no new orders the fresh report is reused (the preview says which outcome the commit will take and reports quota status; force=true always recomputes, subject to the monthly audit quota for Free tenants). May spend the tenant's monthly AI allowance on the server-side narration — when AI is off or the allowance is exhausted the report persists stats-only with an explicit skip reason, never an error. Prefer get_demand_analysis_facts (free) when you only need data to narrate yourself. Operator (unpinned) credentials only.

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": "run_demand_analysis"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoBypass the cooldown/watermark reuse and recompute (default false).
previewNoStep 1 of the required two-step write: set true to receive a structured preview (reuse-vs-recompute) plus a single-use previewReceipt.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
resultNo
previewNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description goes far beyond by disclosing the tier-dependent reuse window (30 days Free, 24h paid), the exact reuse condition (no new orders), AI-allowance spend, and graceful degradation to stats-only with a skip reason rather than an error. It also names the credential requirement (operator/unpinned only), which annotations cannot express.

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-loaded with the core action and cost/reuse consequences in the first two sentences, with the alternative and credential note at the end where they belong. The nested parentheticals make it dense to parse, but every clause carries distinct operational information.

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?

For a persisting, quota-consuming, potentially billable mutation, the description covers cost, reuse semantics, failure-mode behavior, routing to the free sibling, and auth scope, while the output schema handles return values. Nothing an agent needs to decide whether and how to call it is missing.

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%, so the baseline is 3; the description adds real meaning by noting that force is bounded by the monthly audit quota for Free tenants and that the preview reports quota status. It does not restate the previewReceipt/idempotencyKey pairing, but the schema documents that chain fully, so the gap is minor.

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?

"Run the demand analysis and persist a report" gives a specific verb plus the two things produced (analysis + persisted report), and the final sentence differentiates it from the read-only sibling get_demand_analysis_facts. An agent can distinguish this mutation from the free facts lookup without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit alternative and the condition that selects it: "Prefer get_demand_analysis_facts (free) when you only need data to narrate yourself." It also defines when force=true is warranted (always recompute, subject to Free audit quota) and frames preview as the decision point for reuse vs. recompute.

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.

Resources