Skip to main content
Glama
dgalarza

YNAB MCP Server

by dgalarza

delete_scheduled_transaction

Remove scheduled transactions from your YNAB budget to cancel recurring payments or prevent future automated transactions from occurring.

Instructions

Delete a scheduled transaction.

Args:
    budget_id: The ID of the budget (use 'last-used' for default budget)
    scheduled_transaction_id: The ID of the scheduled transaction to delete

Returns:
    JSON string with confirmation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYes
scheduled_transaction_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function decorated with @mcp.tool(). Delegates to YNABClient.delete_scheduled_transaction and returns JSON response.
    @mcp.tool()
    async def delete_scheduled_transaction(budget_id: str, scheduled_transaction_id: str) -> str:
        """Delete a scheduled transaction.
    
        Args:
            budget_id: The ID of the budget (use 'last-used' for default budget)
            scheduled_transaction_id: The ID of the scheduled transaction to delete
    
        Returns:
            JSON string with confirmation
        """
        client = get_ynab_client()
        result = await client.delete_scheduled_transaction(budget_id, scheduled_transaction_id)
        return json.dumps(result, indent=2)
  • YNABClient helper method that performs the actual DELETE HTTP request to the YNAB API endpoint for deleting a scheduled transaction.
    async def delete_scheduled_transaction(
        self,
        budget_id: str,
        scheduled_transaction_id: str,
    ) -> dict[str, Any]:
        """Delete a scheduled transaction.
    
        Args:
            budget_id: The budget ID or 'last-used'
            scheduled_transaction_id: The scheduled transaction ID to delete
    
        Returns:
            Confirmation dictionary
        """
        try:
            url = f"{self.api_base_url}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}"
    
            result = await self._make_request_with_retry("delete", url)
    
            return {
                "scheduled_transaction": result["data"]["scheduled_transaction"],
                "deleted": True,
            }
        except Exception as e:
            raise Exception(f"Failed to delete scheduled transaction: {e}") from e
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action is 'Delete' which implies a destructive mutation, but doesn't mention whether this is reversible, what permissions are required, or what happens to associated data. The 'Returns' note is minimal and doesn't describe error conditions or confirmation details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by organized Args and Returns sections. Every sentence serves a purpose: the first states the action, the next two explain parameters, and the last indicates return type. It could be slightly more concise by integrating the parameter explanations into a single paragraph, but overall it's well-organized.

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?

For a destructive operation with no annotations, the description is moderately complete. It covers the basic action and parameters adequately, and the presence of an output schema means it doesn't need to detail return values. However, it lacks important context about the mutation's consequences, error handling, and relationship to sibling tools, which is significant for a delete operation.

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?

The description adds meaningful context for both parameters beyond the schema's 0% coverage. It explains that 'budget_id' can use 'last-used' for the default budget, which is crucial operational guidance not in the schema. For 'scheduled_transaction_id', it clarifies this identifies 'the scheduled transaction to delete', making the parameter's role clear despite the schema lacking descriptions.

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 verb 'Delete' and the resource 'a scheduled transaction', making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'delete_transaction' (if it existed) or explain what distinguishes scheduled transactions from regular ones, which would be helpful given the sibling tool list includes both transaction types.

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. With sibling tools like 'create_scheduled_transaction', 'get_scheduled_transactions', and 'update_transaction', there's no indication of prerequisites, consequences, or when deletion is appropriate versus modification. The minimal 'Args' section doesn't substitute for usage guidance.

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/dgalarza/ynab-mcp-dgalarza'

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