Skip to main content
Glama

delete_meal

Remove a logged meal from your fitness tracker, with an option to delete associated food items to maintain accurate nutrition records.

Instructions

Delete a meal and optionally its items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meal_idYes
delete_itemsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'delete_meal' tool handler implementation. It optionally deletes associated meal items before deleting the meal itself.
    def delete_meal(meal_id: int, delete_items: bool = True) -> dict[str, bool]:
        """Delete a meal and optionally its items."""
        conn = get_connection()
        cursor = conn.cursor()
        if delete_items:
            cursor.execute("DELETE FROM meal_items WHERE meal_id = ?", (meal_id,))
        cursor.execute("DELETE FROM meals WHERE id = ?", (meal_id,))
        conn.commit()
        conn.close()
        return {"deleted": cursor.rowcount > 0}
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It hints at destructive action ('Delete') and an optional cascade effect ('optionally its items'), but lacks details on permissions, irreversibility, error conditions, or response format. The output schema exists but isn't described, leaving behavior opaque.

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 a single, efficient sentence with zero wasted words. It front-loads the core action ('Delete a meal') and appends the optional feature concisely. Every element earns its place, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations, 0% schema coverage, and an output schema (unexplained), the description is inadequate. It misses critical context: safety warnings, authentication needs, error handling, and what the output contains. Sibling tools suggest a nutrition/health context, but no domain-specific guidance is provided.

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 compensate but only partially does. It clarifies that 'meal_id' identifies the meal to delete and 'delete_items' controls cascading deletion, adding meaning beyond schema types. However, it doesn't explain parameter constraints (e.g., valid meal_id ranges) or default behavior (delete_items defaults to true), leaving gaps.

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 action ('Delete') and resource ('a meal'), and specifies an optional behavior ('and optionally its items'). It distinguishes from sibling 'delete_meal_item' by targeting the meal itself rather than individual items. However, it doesn't explicitly contrast with other meal-related tools like 'upsert_meal' or 'delete_nutrition_day'.

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., meal must exist), exclusions (e.g., cannot delete if referenced elsewhere), or comparisons to siblings like 'delete_meal_item' for partial deletions or 'upsert_meal' for updates. Usage is implied only by the tool name.

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

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