Skip to main content
Glama
LamPyrid
by RadCod3

execute_rule

Apply a Firefly III rule to matching transactions within a required date range, with confirmation required; preview by testing first to avoid unintended changes.

Instructions

Execute a rule to apply changes to matching transactions.

WARNING: This is a destructive operation that modifies your transactions.

  • Always use test_rule first to preview what will be changed

  • Requires confirm=True to prevent accidental execution

  • Execution happens asynchronously - changes may take a moment

  • Date ranges are REQUIRED - no defaults are applied

Rule execution in Firefly III is asynchronous. The rule will be queued for processing and applied in the background. Check your transactions later to confirm the changes have been applied.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "req": "<req>"
    },
    "name": "execute_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
reqYesRequest model for executing a rule (apply changes).

Output Schema

NameRequiredDescriptionDefault
messageYesStatus message. NOTE: Firefly III processes rule execution asynchronously. The rule is queued but may still be processing. Check the rule later to confirm changes.
rule_idYesID of the rule that was executed
successYesWhether the rule execution was accepted by the server
rule_titleYesTitle of the rule that was executed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses destructiveness, the confirm safety gate, asynchronous queued execution, required date bounds, and that the agent must verify results later. The only minor gap is rollback/reversibility, which is a small omission against an otherwise thorough disclosure.

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 warning block is front-loaded and bulleted, making the safety-critical constraint impossible to miss. However, the closing paragraph repeats the asynchronous behavior already stated in the bullets, which is wasted space in an otherwise tight definition.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and the destructive/async/safety behavior is well covered for a mutation tool. It does not mention the optional account_ids filtering or what happens if execution fails, leaving a couple of minor gaps relative to the nested request model.

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 100%, so confirm, rule_id, start_date, end_date, and account_ids are already fully documented in the nested request object. The description restates the confirm gate and date-range requirement but adds no new semantics, and never mentions the optional account_ids scoping parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Execute a rule to apply changes to matching transactions') and implicitly differentiates from the preview sibling by warning to use test_rule first. An agent can distinguish this from test_rule, get_rule, and update_rule without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative workflow ('Always use test_rule first to preview what will be changed') and states the gating conditions (confirm=True, date ranges REQUIRED with no defaults). Both when-to-use and when-not-to-proceed are covered.

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