Skip to main content
Glama
nickweedon

Skeleton MCP Server

by nickweedon

delete_item

Remove an item from the Skeleton MCP Server by specifying its unique identifier. This tool deletes items and returns confirmation when successful.

Instructions

Delete an item.

Args: item_id: The unique identifier of the item to delete

Returns: A confirmation message

Raises: ValueError: If the item is not found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'delete_item' tool. It takes an item_id parameter, checks if the item exists in the mock store, deletes it if found, and returns a confirmation dictionary. Includes comprehensive docstring defining input/output and error handling.
    async def delete_item(item_id: str) -> dict[str, Any]:
        """
        Delete an item.
    
        Args:
            item_id: The unique identifier of the item to delete
    
        Returns:
            A confirmation message
    
        Raises:
            ValueError: If the item is not found
        """
        # In a real implementation:
        # client = get_client()
        # return client.delete(f"items/{item_id}")
    
        if item_id not in MOCK_ITEMS:
            raise ValueError(f"Item not found: {item_id}")
    
        del MOCK_ITEMS[item_id]
        return {"status": "deleted", "id": item_id}
  • Registers the delete_item function from the example module as an MCP tool using the FastMCP tool decorator.
    mcp.tool()(example.delete_item)
  • The block of registrations for all example API tools, including delete_item.
    # Example: Import and register tools from your custom modules
    mcp.tool()(example.list_items)
    mcp.tool()(example.get_item)
    mcp.tool()(example.create_item)
    mcp.tool()(example.update_item)
    mcp.tool()(example.delete_item)

Tool Definition Quality

Score is being calculated. Check back soon.

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/nickweedon/playwritght-proxy-mcp'

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