Skip to main content
Glama

ynab_export_transactions

Read-onlyIdempotent

Generate a local JSON export of YNAB budget transactions, filtered by account, category, date, or transaction type, for backup or analysis.

Instructions

Export transactions for a budget to a local JSON file.

Args:

  • budget_id (string, optional): Budget UUID. Omit to use the default budget.

  • account_id (string, optional): Filter by account.

  • category_id (string, optional): Filter by category.

  • since_date (string, optional): ISO date (YYYY-MM-DD) to filter transactions on or after.

  • type (string, optional): "uncategorized" or "unapproved" to export only those transactions.

  • filename (string, optional): File name (not a path); ".json" is appended if missing. Default: generated from the filters, count and timestamp.

  • minimal (boolean, optional): Export only id, date, amount, amount_milliunits, payee_name and cleared. Default: true; false exports full fields.

Returns: message, filename, full_path, export_directory, export_mode ("minimal" or "full"), minimal_fields, filename_explanation, total_count, preview_count, preview_transactions (a short preview, not the whole file)

Examples:

  • Export all transactions: call with no args

  • Export account: set account_id

Errors:

  • "No default budget set" → run ynab_set_default_budget first

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ynab_export_transactions"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo
minimalNo
filenameNo
budget_idNo
account_idNo
since_dateNo
category_idNo

Output Schema

NameRequiredDescriptionDefault
messageYes
filenameYes
full_pathYes
export_modeYes
total_countYes
preview_countYes
minimal_fieldsYes
export_directoryYes
filename_explanationYes
preview_transactionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed26 schema fields changedv0.31.0
    • addedOutput schema / properties / preview_transactions / items / properties / account_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / account_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / amount / description
      Added value: +"Amount in decimal currency units"
    • addedOutput schema / properties / preview_transactions / items / properties / amount_currency
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / amount_formatted
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / amount_milliunits
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / approved
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / category_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / cleared
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / debt_transaction_type
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / deleted
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / flag_color
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / flag_name
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / import_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / import_payee_name
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / import_payee_name_original
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / matched_transaction_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / parent_transaction_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / payee_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / scheduled_transaction_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / subtransactions
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount": {
      +        "description": "Amount in decimal currency units",
      +        "type": "number"
      +      },
      +      "amount_currency": {
      +        "type": "number"
      +      },
      +      "amount_formatted": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "amount_milliunits": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "category_id": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "category_name": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "deleted": {
      +        "type": "boolean"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "memo": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "payee_id": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "payee_name": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "scheduled_transaction_id": {
      +        "type": "string"
      +      },
      +      "transaction_id": {
      +        "type": "string"
      +      },
      +      "transfer_account_id": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "transfer_transaction_id": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / transaction_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / transfer_account_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / transfer_transaction_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / preview_transactions / items / properties / type
      Added value: +{
      +  "enum": [
      +    "transaction",
      +    "subtransaction"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / preview_transactions / items / required
      Previous value: -[
      -  "id",
      -  "date",
      -  "amount"
      -]New value: +[
      +  "id",
      +  "amount",
      +  "date"
      +]
  2. Changed8 schema fields changedv0.29.1
    • removedOutput schema / properties / minimal_fields / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / minimal_fields / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / preview_transactions / items / properties / category_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / preview_transactions / items / properties / category_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / preview_transactions / items / properties / memo / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / preview_transactions / items / properties / memo / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / preview_transactions / items / properties / payee_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / preview_transactions / items / properties / payee_name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Addedv0.26.9

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered; the description adds genuinely new behavior: it writes a file to disk, appends ".json" to the filename, generates a default name from filters/count/timestamp, defaults to minimal fields, and returns only a short preview rather than the whole file. The one real gap is that it never says whether an existing file with the same name is overwritten, which matters for a repeated idempotent call.

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 lead sentence front-loads the purpose, followed by clearly delimited Args, Returns, Examples and Errors blocks, so an agent can skip sections it does not need. It is longer than most, but the structure earns the length; the Returns recap is slightly redundant given the output schema exists.

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?

For a seven-parameter tool with zero schema descriptions, the definition covers parameters, defaults, error recovery and a preview of the return shape, so an agent can invoke it without guessing. Remaining gaps are modest: where the export directory lives and what happens on filename collision, though the output schema and returned export_directory partially fill the former.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 carry the full burden, and it does: all seven parameters are documented with optionality, the enum values for type, the ISO date format for since_date, an explicit default for minimal and what true/false actually export, and the constraint that filename is a name rather than a path. This fully compensates for the empty schema 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 opens with a specific verb and resource, "Export transactions for a budget to a local JSON file," which tells an agent both the operation and the destination artifact. It implicitly separates itself from the read-only listing siblings by naming a file output, but it never names an alternative tool, so it falls short of full sibling differentiation.

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

Usage Guidelines4/5

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

The Examples section gives concrete invocations ("call with no args" for all transactions, set account_id to scope to an account), and the Errors section routes the agent to ynab_set_default_budget when no default budget exists. It lacks any explicit statement of when to choose this over ynab_list_transactions, but the file-export framing provides enough context to select correctly.

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