Skip to main content
Glama
expenselm

expenselm-mcp-server

Official
by expenselm

get_subscription_expense_count_by_period

Count subscription expenses within a specified date range, providing the total number of records for period-based analytics.

Instructions

Get subscription based expense count for the provided period.

Example usage: When user want to perform analytics of subscription based expenses for a period, first use this method to get the count of total subscription based expenses first. Then can use the get_latest_subscription_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 subscription based 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.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden of explaining behavior. It does state the date format, required arguments, and that it returns an integer count. However, it does not disclose edge cases such as date inclusivity, timezone handling, or behavior when no records exist. These are meaningful gaps, though not fatal for a simple count 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?

The description is well-structured with purpose, example usage, arguments, and returns. The example is slightly verbose and partially repeats the main idea, but the opening sentence is clear, and each section serves a functional purpose.

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 two-parameter count tool, the description provides essential call details: date range, format, integer return, and a recommended follow-up tool. It lacks explicit error or edge-case handling, but it is sufficient for an agent to select and call the tool correctly in the intended workflow.

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?

The schema only provides property titles with no descriptions, so the description compensates fully. It explains from_date as 'the start date for filtering' and to_date as 'the end date for filtering', and specifies the YYYY-MM-DD format, giving the agent the semantic information needed to invoke the tool correctly.

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 the action: 'Get subscription based expense count for the provided period.' The 'subscription based' qualifier distinguishes it from the sibling get_expense_count_by_period, and the resource and date-scope are immediately understandable.

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 example usage explicitly describes a workflow: use this tool first to get the count, then use get_latest_subscription_expenses to page through records. This provides concrete context and names an alternative tool. It does not explicitly enumerate when not to use it or contrast with the non-subscription count sibling, so it stops short of a 5.

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