Skip to main content
Glama
benpeke

Turbify Store MCP Server

by benpeke

delete_items

Remove multiple catalog items simultaneously by specifying their IDs. This tool streamlines inventory management by allowing batch deletion operations.

Instructions

    Delete multiple items in a single operation.
    
    Args:
        item_ids: List of item IDs to delete
    
    Returns:
        JSON string with operation result
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for 'delete_items', decorated with @mcp.tool(). Calls the TurbifyStoreAPIClient to perform the deletion and returns a JSON-formatted response.
    @mcp.tool()
    def delete_items(item_ids: List[str]) -> str:
        """
        Delete multiple items in a single operation.
        
        Args:
            item_ids: List of item IDs to delete
        
        Returns:
            JSON string with operation result
        """
        try:
            response = client.delete_items(item_ids)
            
            return json.dumps({
                "status": response.status,
                "success": response.is_success,
                "messages": response.success_messages,
                "errors": response.error_messages,
                "items_processed": len(item_ids)
            }, indent=2)
            
        except APIError as e:
            return json.dumps({
                "status": "error",
                "success": False,
                "errors": [str(e)],
                "items_processed": 0
            }, indent=2)
  • Registration of catalog tools (including delete_items) by calling register_catalog_tools(mcp) in the main server setup.
    # Register all tools
    register_catalog_tools(mcp)
  • Helper method in TurbifyStoreAPIClient that constructs the XML delete request for the Catalog API and handles the response.
    def delete_items(self, item_ids: List[str]) -> APIResponse:
        """
        Delete multiple items in a single API call.
        """
        self.logger.debug(f"Batch delete: {len(item_ids)} items")
        if len(item_ids) > self.config.max_items_per_call:
            raise ValueError(f"Cannot delete more than {self.config.max_items_per_call} items at once")
    
        # Create ItemIDList
        item_idlist = ItemIdlistType(id=item_ids)
        catalog = CatalogType(item_idlist=item_idlist)
        resource_list = RequestResourceListType(catalog=catalog)
        
        # Create request
        request = self._create_base_request("delete")
        request.resource_list = resource_list
    
        response_dict = self._make_api_call("Catalog", request)
    
        # Return APIResponse with item IDs
        return APIResponse(
            status="success" if response_dict.get('success') else "error",
            item_ids=item_ids,
            errors=response_dict.get('errors', []),
            warnings=response_dict.get('warnings', []),
            messages=response_dict.get('info', [])
        )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool deletes items but lacks critical behavioral details: whether deletions are permanent or reversible, if there are rate limits, what permissions are required, or how errors are handled. The mention of 'single operation' hints at batch behavior but is vague. This is inadequate for a destructive operation.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by structured Args and Returns sections. Every sentence adds value without redundancy, making it efficient and easy to parse.

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?

Given the tool's complexity (destructive batch operation), lack of annotations, and an output schema (which covers return values), the description is minimally complete. It explains what the tool does and the parameter, but misses critical context like safety warnings, error handling, or usage scenarios. The output schema reduces the burden, but gaps remain for a mutation tool.

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 description coverage is 0%, so the description must compensate. It adds meaning by explaining 'item_ids' as 'List of item IDs to delete', clarifying the parameter's purpose beyond the schema's type definition. However, it doesn't specify ID format, constraints, or examples. With 0% coverage and one parameter, this earns a 4 for adding basic semantics.

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 clearly states the tool's purpose: 'Delete multiple items in a single operation.' This specifies the verb ('Delete') and resource ('items'), and distinguishes it from siblings like 'create_items' or 'update_items'. However, it doesn't explicitly differentiate from potential deletion alternatives (none listed in siblings), keeping it at 4 rather than 5.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., permissions), exclusions, or comparisons to other tools like 'update_items' for modifying instead of deleting. The agent must infer usage from the name and context alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benpeke/turbify_store_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server