Skip to main content
Glama

Log Expense

log_expense

Records one cost the signed-in person paid on a job, such as parking, materials or a client lunch, against a project they work on (by projectId, or by its code or name, e.g. "RISE"), in the workspace currency, exactly as the project Expenses tab records it: the accounting books' closed months and a likely duplicate are refused with the reason. The receipt file is added later on the project's Expenses tab. Handles "log $42 parking on RISE, billable". The result carries the call that undoes it.

Input Schema

NameRequiredDescriptionDefault
taxNoTax paid on top of the amount, if any.
dateNoThe day of the cost, YYYY-MM-DD. Defaults to today in the person's time zone; never in the future.
amountYesThe amount before tax, in the workspace currency, like 42.5.
userIdNoNot needed when signed in: these tools act for the signed-in person, and any other ID is refused. Applies only to a workspace connection with no signed-in user, naming whose expenses these are.
vendorYesWho was paid, e.g. "City Parking".
projectNoThe project as the person said it: its code (e.g. "RISE") or its name, matched exactly on code first. When several projects match, nothing is recorded and the candidates come back.
billableNoWhether the client pays for it (default false).
categoryNoThe kind of cost. Defaults to other.
projectIdNoThe project the cost is on, by id. Give projectId or project.
descriptionNoWhat it was for. A billable cost shows this on the client's invoice.
reimbursableNoWhether the person paid it themselves and is owed it back (default false).
allowDuplicateNoRecord it even though a matching expense exists: a second, separate charge.

Output Schema

NameRequiredDescriptionDefault
undoNoThe call that reverses this one, with its arguments.
expenseNo
receiptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (which only declare this is a non-idempotent write), the description discloses substantial behavior: closed accounting months and likely duplicates are refused with a reason, receipts are added later rather than here, and the result carries the undo call. These are exactly the traits an agent needs before invoking a mutation tool.

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?

Core purpose is front-loaded and the single dense paragraph has little wasted text; the receipt-deferral, example phrasing, and undo-call notes each carry information. It is slightly packed for a single block, which keeps it just shy of a 5.

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?

With an output schema present, return-value explanation is unnecessary, and the description covers the remaining gaps: side effects (refused closed months/duplicates), receipt workflow, undo capability, and project resolution. An agent has everything needed to call this correctly.

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 all 12 parameters thoroughly (project resolution, currency, defaults, allowDuplicate). The description reinforces project-by-id/code/name and workspace-currency behavior but adds little that the schema does not already state, so the baseline 3 applies.

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 names a specific verb and resource ('Records one cost the signed-in person paid on a job') with concrete examples (parking, materials, client lunch). It implicitly distinguishes this from siblings like log_mileage and log_time_entry by framing it as a single job cost. It even captures the exact project-resolution mechanism and a natural-language invocation example.

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?

Usage context is clear ('against a project they work on', handles 'log $42 parking on RISE, billable') and it states that this behaves like the project Expenses tab. However, it never explicitly names alternatives (e.g., log_mileage for mileage) or states when not to use it, so the routing guidance is contextual rather than explicit.

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