Skip to main content
Glama

Approve a flagged classification

approve_classification

Approves one event from the review queue (see get_unreviewed_events) by assigning its definitive account, then resumes the paused pipeline: the event is marked reviewed, its double-entry journal lines are written, an audit trail entry records who approved it and why, and a ledger sync job is queued — all atomically. This WRITES financial data: only call it with an account you are confident in, and pass a reason a future auditor will understand (it is stored verbatim in the audit trail). Fails if the event does not exist, belongs to a different org, or is not awaiting review (e.g. already approved). actor_id is optional — it defaults to the organisation entity, and if provided must belong to this org.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
org_idNoOptional. Defaults to the organisation the authenticated API key is bound to, so you normally omit it and never need to ask the user for their organisation UUID. If provided, it must match the key’s org or the request is rejected.0e91146d-511c-469f-bdee-5c867b26ae0d
reasonYesWhy this account is correct. Stored verbatim in the audit trail.
actor_idNoOptional. Defaults to the organisation entity (correct for an org-scoped key). If provided, it must be an entity belonging to this organisation — arbitrary UUIDs are rejected, so the audit trail cannot be attributed to someone else.
approved_categoryYesThe definitive account for this event: a numeric chart-of-accounts code (4000 SaaS Revenue, 4100 Usage Revenue, 4900 Other Income, 5000 API & Compute Costs, 5100 Payment Processing Fees, 5200 Platform Commission, 6100 Software Subscriptions, 6200 Contractor & Freelancer, 6300 Marketing & Ads, 6400 Banking & Finance Fees, 6500 Payroll, 6600 Taxes, 6700 Foreign Exchange Gain/Loss, 6750 Unrealized FX Gain/Loss, 6800 Office & Equipment, 6810 Travel, 6820 Meals & Entertainment, 6830 Professional Services, 6840 Insurance, 6900 Other Expenses, 2100 Accounts Payable, 3900 Owner Contributions & Transfers, 1100 Cash & Bank, 1150 Stripe Receivable, 1160 App Store / Play Receivable, 1200 Stripe Settlement) or a broad rollup category, which resolves to the category's default account (revenue → 4000, cost_of_goods → 5000, operating_expense → 6100).
classified_event_idYesThe classified_event_id of a queue item from get_unreviewed_events.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
approvedYes
new_categoryYes
new_account_codeYes
ledger_sync_queuedYes
classified_event_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only give hints (readOnlyHint=false, destructiveHint=false), but the description goes further: it explicitly states 'This WRITES financial data' and describes the atomic sequence of operations (mark reviewed, write journal lines, audit trail, queue sync). It also discloses that reason is stored verbatim and that actor_id must belong to the org. This adds behavioral context beyond annotations, with no contradiction.

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

Conciseness5/5

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

The description is dense but every sentence carries essential information: the main action, the atomic effects, the warning about financial writes, the failure conditions, and the parameter defaults. It is front-loaded with the action and consequences, and there is no fluff. Despite its length, it is highly efficient.

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

Completeness5/5

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

The tool has an output schema (not shown in the prompt), so the description does not need to explain return values. It covers prerequisites, atomicity, audit trail, ledger sync, failure scenarios, defaults, and constraints on actor_id. It also references the sibling get_unreviewed_events for context. Everything an agent needs to call it correctly is present.

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 the schema already documents each parameter thoroughly (including defaults and allowed account codes). The description adds some usage context (e.g., 'only call with an account you are confident in' and the default for org_id), but it mostly reinforces the schema's content rather than adding new semantics. Baseline 3 is appropriate given high schema coverage.

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?

The description states a specific verb ('approve'), a precise resource (one event from the review queue), and the action's effects (assigns account, writes journal lines, audit trail, queues ledger sync). It clearly distinguishes this from siblings like get_unreviewed_events and list_chart_accounts by focusing on the approval action and its side effects.

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?

It explicitly tells the agent when to call it (only with a confident account) and mentions the prerequisite of pulling items from get_unreviewed_events. It also states failure conditions (event not existing, wrong org, already approved) that guide when not to use it. It even warns that it writes financial data, implying caution. This is clear usage guidance beyond mere purpose.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources