Skip to main content
Glama

delete_meal_item

Remove a specific meal entry from your nutrition log by providing its item ID. This action helps maintain accurate food tracking records in your personal fitness database.

Instructions

Delete a meal item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes

Implementation Reference

  • Implementation of the delete_meal_item MCP tool, which removes a record from the meal_items table in the database.
    @app.tool()
    def delete_meal_item(item_id: int) -> dict[str, bool]:
        """Delete a meal item."""
        conn = get_connection()
        cursor = conn.cursor()
        cursor.execute("DELETE FROM meal_items WHERE id = ?", (item_id,))
        conn.commit()
        conn.close()
        return {"deleted": cursor.rowcount > 0}

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/JohnZolton/MCP-logger'

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