Skip to main content
Glama
klauern

MCP YNAB Server

by klauern

_find_transaction_by_id

Locate specific YNAB transactions using their unique ID and type to retrieve detailed financial records for review or analysis.

Instructions

Find a transaction by its ID and ID type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionsYes
transaction_idYes
id_typeYes

Implementation Reference

  • Helper function that searches a list of transactions for one matching the given transaction_id based on the specified id_type (id, import_id, transfer_transaction_id, or matched_transaction_id). Returns the matching TransactionDetail or None.
    def _find_transaction_by_id(
        transactions: List[TransactionDetail], transaction_id: str, id_type: str
    ) -> Optional[TransactionDetail]:
        """Find a transaction by its ID and ID type."""
        for txn in transactions:
            if (
                (id_type == "id" and txn.id == transaction_id)
                or (id_type == "import_id" and txn.import_id == transaction_id)
                or (
                    id_type == "transfer_transaction_id"
                    and txn.transfer_transaction_id == transaction_id
                )
                or (
                    id_type == "matched_transaction_id" and txn.matched_transaction_id == transaction_id
                )
            ):
                return txn
        return None
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but provides none. It doesn't indicate whether this is a read-only operation, whether it requires authentication, what happens if the transaction isn't found, or any rate limits. The description doesn't mention that it requires an array of transactions as input (per the schema), which is a significant behavioral constraint that should be disclosed.

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 extremely concise - a single sentence with no wasted words. It's front-loaded with the core purpose. However, this conciseness comes at the cost of being under-specified for a tool with 3 undocumented parameters and no annotations. While structurally efficient, it lacks necessary detail.

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

Completeness1/5

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

Given the complexity (3 required parameters with 0% schema coverage, no annotations, no output schema), the description is completely inadequate. It doesn't explain the unusual requirement of providing a 'transactions' array to find a transaction by ID, doesn't describe the return format, and provides no behavioral context. For a lookup tool with multiple parameters, this minimal description leaves critical gaps.

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

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, meaning none of the 3 parameters have descriptions in the schema. The tool description adds no parameter information beyond what's in the parameter names themselves. It doesn't explain what 'transactions' should contain, what format 'transaction_id' expects, or what values 'id_type' accepts. The description fails to compensate for the complete lack of schema documentation.

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

Purpose2/5

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

The description 'Find a transaction by its ID and ID type' is a tautology that essentially restates the tool name '_find_transaction_by_id'. It doesn't specify what resource is being found (e.g., a financial transaction in a budgeting system) or provide any meaningful differentiation from sibling tools like 'get_transactions'. The description lacks specificity about what constitutes a 'transaction' in this context.

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

Usage Guidelines1/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. There are multiple sibling tools that deal with transactions (get_transactions, get_transactions_needing_attention, create_transaction), but the description doesn't explain when this specific lookup-by-ID tool is appropriate versus broader listing tools. No context, prerequisites, or exclusions are mentioned.

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

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