ledger_payees
Retrieve and filter payees from financial data using a regex pattern to streamline accounting and reporting tasks with the Ledger CLI MCP Server.
Instructions
List all payees
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- main.py:198-205 (handler)The handler function for the 'ledger_payees' tool, registered via the @mcp.tool decorator. Executes the ledger 'payees' command with an optional query filter using the run_ledger helper.@mcp.tool(description="List all payees") def ledger_payees(params: LedgerPayees) -> str: cmd = ["payees"] if params.query: cmd.append(params.query) return run_ledger(cmd)
- main.py:62-64 (schema)Pydantic BaseModel schema defining the input parameters for the ledger_payees tool: an optional query string to filter payees.class LedgerPayees(BaseModel): query: Optional[str] = Field(None, description="Filter payees by regex pattern")