Skip to main content
Glama

delete_inventory_item

DestructiveIdempotent

Permanently delete an inventory row.

Authenticated. Required OAuth scope: `inventory:write`. Caller must
own the item (404 otherwise). Hard delete — no soft-delete.

Args:
    item_id: ID of the row to delete.
    api_key: Optional API key (`pk_*`, generate at /account).
        Used when there is no OAuth token, and also when the OAuth
        token lacks the required scope — an explicitly passed key
        overrides an ambient token that is scoped too narrowly.
        An invalid or revoked token still fails regardless.

Returns:
    ``{"deleted": true, "id": item_id}`` on success, or
    ``{"error": ...}`` on auth / not-found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
item_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

The description goes well beyond annotations by disclosing that this is a hard delete (no soft-delete), requiring ownership, and detailing the api_key fallback behavior including how it overrides an ambient token and that invalid tokens still fail. This is rich behavioral context that complements the destructiveHint and idempotentHint annotations without contradiction.

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 concise yet dense: the core action is front-loaded, and the argument and return sections are clearly structured. Every sentence adds value, covering auth, ownership, parameters, and response format without redundancy.

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?

There is no output schema, so the description appropriately includes a returns section. It covers the action, auth requirements, ownership condition, parameter semantics, and error responses, making it fully self-contained for an agent to understand the tool's complete behavior.

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 0%, so the description alone explains both parameters. It defines item_id as 'ID of the row to delete' and gives a thorough explanation of api_key, including when it is used, its format (`pk_*`), how it overrides OAuth tokens, and edge cases. This fully compensates for the lack of schema descriptions.

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 opens with 'Permanently delete an inventory row', a precise verb-resource pairing that clearly identifies the action and target. It distinguishes itself from sibling tools like delete_product and delete_product_image by specifying 'inventory row', which is a distinct resource type.

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 clearly states prerequisites: required OAuth scope `inventory:write`, caller must own the item, and 404 otherwise. It also explains the api_key override behavior, giving context on when an API key is used. However, it does not explicitly name alternative tools or say when not to use this tool, so it misses the 'explicit exclusions/alternatives' bar for a 5.

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.