Skip to main content
Glama
mintlineai

Mintline MCP Server

by mintlineai

spending_trends

Analyze monthly spending trends over a specified number of months to identify financial patterns and adjust budgets.

Instructions

Get spending trends. Get monthly spending trends for the specified number of months.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
monthsYesNumber of months to include

Implementation Reference

  • Handler case for spending_trends tool in the handleTool switch statement. It calls client.getSpendingTrends with months argument (default 6) and formats the result via formatSpendingTrends.
    case "spending_trends": {
      const result = await client.getSpendingTrends({
        months: args.months || 6,
      });
      return formatSpendingTrends(result.data.trends);
    }
  • Tool definition and input schema for spending_trends. Defines name, description, and inputSchema with a 'months' numeric parameter (default 6).
    {
      name: "spending_trends",
      description: "Get monthly spending trends over time. Use this to answer 'How has my spending changed?' or 'Show me spending trends'",
      inputSchema: {
        type: "object",
        properties: {
          months: {
            type: "number",
            description: "Number of months to include (default 6)",
          },
        },
      },
    },
  • formatSpendingTrends helper function that formats the trend data into a human-readable text output with a bar chart visualization.
    function formatSpendingTrends(trends) {
      if (!trends?.length) return "No trend data found.";
    
      let text = `Monthly Spending Trends\n`;
      text += `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`;
    
      trends.forEach((t) => {
        const bar = "█".repeat(Math.min(20, Math.round(t.total / 100)));
        text += `${t.month}: ${formatCurrency(t.total)} ${bar}\n`;
      });
    
      return text;
    }
  • src/index.js:308-310 (registration)
    Case handler for spending_trends in the formatResponse function within the OpenAPI-based MCP server (src/index.js). Formats trend data as month: currency lines.
    case "spending_trends":
      if (!data.trends?.length) return "No trend data found.";
      return data.trends.map(t => `${t.month}: ${fmt(t.total)}`).join("\n");
  • src/client.js:111-116 (registration)
    getSpendingTrends API client method that sends a GET request to /api/analytics/trends with optional 'months' query parameter.
    async getSpendingTrends(params = {}) {
      const query = new URLSearchParams();
      if (params.months) query.set("months", params.months);
      const qs = query.toString();
      return request("GET", `/api/analytics/trends${qs ? `?${qs}` : ""}`);
    },
Behavior2/5

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

With no annotations present, the description carries full burden but fails to disclose whether the operation is read-only, if there are side effects, performance considerations, or data freshness. Only the basic action 'get' is implied.

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

Conciseness3/5

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

The description is only two sentences but contains redundancy ('Get spending trends' vs 'Get monthly spending trends'), making it slightly less efficient than it could be.

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

Completeness2/5

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

Lacking output schema and annotations, the description is insufficient: it does not explain the format of the trends, how months are counted, or any additional constraints, leaving the agent with significant ambiguity.

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% for the single parameter 'months', so baseline is 3. The description adds no extra meaning beyond what the schema already provides, merely restating the parameter's purpose.

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

Purpose4/5

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

The description clearly states the tool retrieves spending trends on a monthly basis with a configurable number of months, distinguishing it from sibling tools like spending_summary or top_vendors by focusing on trends over time.

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

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor are there any prerequisites or exclusions mentioned. The agent must infer usage from the tool name alone.

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/mintlineai/mintline-mcp'

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