Skip to main content
Glama
whitebirchio

Monarch Money MCP Server

by whitebirchio

get_categories

Retrieve all transaction categories from Monarch Money to organize and analyze financial data for budgeting and spending insights.

Instructions

Get all transaction categories available in Monarch Money

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the get_categories tool. It calls the API, handles errors, and returns a formatted response with success status, data, and summary.
    private async getCategories(): Promise<any> {
      try {
        const categories = await this.api.getCategories();
    
        return {
          success: true,
          data: categories,
          summary: `Retrieved ${categories?.length || 0} transaction categories`,
        };
      } catch (error) {
        throw new Error(
          `Failed to get categories: ${
            error instanceof Error ? error.message : 'Unknown error'
          }`
        );
      }
    }
  • src/tools.ts:150-159 (registration)
    Tool registration in getToolDefinitions() that defines the get_categories tool with its name, description, and input schema (no input parameters required).
    {
      name: 'get_categories',
      description:
        'Get all transaction categories available in Monarch Money',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • src/tools.ts:230-231 (registration)
    Routing logic in executeTool() that maps the 'get_categories' tool name to the getCategories() handler method.
    case 'get_categories':
      return await this.getCategories();
  • The underlying API method that executes a GraphQL query to fetch categories from Monarch Money API. Includes the GraphQL query definition and error handling.
    async getCategories(): Promise<any[]> {
      const query = `
        query GetCategories {
          categories {
            id
            name
            systemCategory
            group {
              id
              name
            }
          }
        }
      `;
    
      try {
        const data: any = await this.graphQLClient.request(query);
        return data.categories || [];
      } catch (error: any) {
        if (
          error.message.includes('401') ||
          error.message.includes('unauthorized')
        ) {
          throw new Error(
            'Authentication failed. Please check your MONARCH_TOKEN environment variable.'
          );
        }
        throw new Error(`Failed to get categories: ${error.message}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states what the tool does without details on traits like read-only status, rate limits, or response format. It lacks information on whether this is a safe read operation, how data is returned, or any constraints, leaving significant gaps.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured for quick understanding.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks depth. It covers the basic purpose but does not address behavioral aspects or usage context, which could be beneficial for an agent in a server with multiple financial tools.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description does not add param semantics, but this is acceptable given the lack of parameters, aligning with the baseline for zero params.

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 action ('Get') and resource ('all transaction categories available in Monarch Money'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'get_spending_by_category' or 'get_transactions', which might involve categories indirectly, so it misses full sibling distinction.

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?

The description provides no guidance on when to use this tool versus alternatives. For example, it does not specify if this is for listing categories before filtering transactions or if other tools like 'search_transactions' might be better for category-related queries, leaving the agent without usage context.

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/whitebirchio/monarch-mcp'

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