Skip to main content
Glama
expenselm

expenselm-mcp-server

Official
by expenselm

get_expense_count_by_period

Count expense records within a date range to size the dataset before fetching records for period-based analytics.

Instructions

Get expense count for the provided period.

Example usage: When user want to perform analytics for a period, first use this method to get the count of total expenses first. Then can use the get_latest_expenses tool to fetch the expenses by page to get all records.

Args: from_date (required): The start date for filtering. Format is YYYY-MM-DD. to_date (required): The end date for filtering. Format is YYYY-MM-DD.

Returns: int: The count of expense reocrds for the period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_dateYes
from_dateYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the disclosure burden. It discloses the return type (int) and the required date format, but it does not explicitly state read-only behavior, date-boundary inclusivity, timezone handling, or error behavior. This is adequate for a simple count query but not fully transparent.

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 well organized with a purpose statement, example usage, args, and returns. It is front-loaded with the main purpose and the example workflow earns its place, though there is a minor typo and slight redundancy in 'count of total expenses first.'

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?

Given only two required parameters and a simple integer return, the description is reasonably complete: it covers what the tool returns, the arguments, and a practical workflow with a sibling tool. It does not mention edge cases or explicitly address subscription-specific alternatives, but these are not critical for this tool's simple scope.

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

Parameters4/5

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

The schema provides only type and titles for from_date and to_date with 0% description coverage. The tool description adds meaningful semantics by calling them 'start date for filtering' and 'end date for filtering' and specifying the exact format YYYY-MM-DD. This goes well beyond the schema, though it leaves date inclusivity or timezone unspecified.

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 clearly states a specific verb and resource: 'Get expense count for the provided period.' It also explains that the result is the count of total expense records, which distinguishes it from tools that return summaries, receipts, or individual expenses.

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?

It gives a concrete workflow: use this tool first to get the count, then use get_latest_expenses to fetch records by page. This is clear context for when to call it, though it does not explicitly contrast it with subscription-specific count or summary tools.

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