Skip to main content
Glama

Replace Purchase Template Items

replace_purchase_template_items
Destructive

Use this when working with RetailHardHat purchase_lists records in the connected organization. Replace ALL items in a purchase template; an empty array clears them. No change occurs until a human approves the exact request in Settings > MCP and execute_approved_action is called. MCP approval requirements are configurable by the organization administrator; business workflow approvals always apply.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "templateId": "<templateId>",
      "data": "<data>"
    },
    "name": "replace_purchase_template_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes
templateIdYes

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

This adds real information beyond the destructiveHint=true annotation: the operation is approval-gated, requires a separate execute_approved_action call, and an empty array clears all items. It doesn't address idempotency or what happens to item-level references when items are removed, which the false idempotentHint leaves open.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical replacement semantics and approval gating are conveyed in compact sentences. The lead sentence about 'purchase_lists records in the connected organization' adds little and risks confusion about the resource, earning it a middling score rather than a high one.

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 destructive, approval-gated mutation with an output schema present, the definition covers the essential safety and workflow context an agent needs. Remaining gaps (item field meanings, max items, idempotency) are secondary but keep it short of 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 description coverage is 0%, so the description must carry the load; it clarifies full-replacement and empty-array semantics for data, which is genuinely useful. But templateId is never explained beyond the uuid format, and the nested item fields (itemName required, qty, cost, etc.) and the 100-item cap are left entirely to the schema.

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 uses a specific verb and scope: replace ALL items in a purchase template, with empty-array-clears semantics, which separates it from add_purchase_template_item and update_purchase_template. However, the opening framing of 'purchase_lists records' introduces an unrelated resource name that can make an agent wonder whether the tool operates on lists rather than templates.

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?

It gives an explicit prerequisite chain: nothing happens until a human approves in Settings > MCP and execute_approved_action is called. But it never says when to choose this over add_purchase_template_item or update_purchase_template, and the 'use this when working with RetailHardHat purchase_lists records' clause is too generic to route the agent.

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