Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

getAllBills

Retrieve billing information from Mews hospitality platform by filtering bills using IDs, customer data, date ranges, states, or pagination settings.

Instructions

Returns all bills by filter parameters, used for retrieving billing information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
BillIdsNoFilter by specific bill IDs
CustomerIdsNoFilter by customer IDs
CreatedUtcNoDate range filter for bill creation
UpdatedUtcNoDate range filter for bill updates
StatesNoFilter by bill states
LimitationNoPagination settings

Implementation Reference

  • The main handler function that processes input arguments, prepares the request data with default limitation, calls the Mews API endpoint '/api/connector/v1/bills/getAll', and returns the result as formatted JSON.
    async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> {
      const inputArgs = args as Record<string, unknown>;
      const requestData = {
        Limitation: {
          Count: 100
        },
        ...inputArgs
      };
    
      const result = await mewsRequest(config, '/api/connector/v1/bills/getAll', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema defining the parameters for filtering bills, including BillIds, CustomerIds, date ranges (CreatedUtc, UpdatedUtc), States, and Limitation for pagination.
    inputSchema: {
      type: 'object',
      properties: {
        BillIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by specific bill IDs',
          maxItems: 1000
        },
        CustomerIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by customer IDs',
          maxItems: 1000
        },
        CreatedUtc: {
          type: 'object',
          properties: {
            StartUtc: { type: 'string', description: 'Start of creation date range (ISO 8601)' },
            EndUtc: { type: 'string', description: 'End of creation date range (ISO 8601)' }
          },
          description: 'Date range filter for bill creation'
        },
        UpdatedUtc: {
          type: 'object',
          properties: {
            StartUtc: { type: 'string', description: 'Start of update date range (ISO 8601)' },
            EndUtc: { type: 'string', description: 'End of update date range (ISO 8601)' }
          },
          description: 'Date range filter for bill updates'
        },
        States: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by bill states'
        },
        Limitation: {
          type: 'object',
          properties: {
            Count: { type: 'number', description: 'Maximum number of bills to return' },
            Cursor: { type: 'string', description: 'Pagination cursor for next page' }
          },
          description: 'Pagination settings'
        }
      },
      additionalProperties: false
    },
  • Import statement that brings the getAllBillsTool into the index for aggregation.
    import { getAllBillsTool } from './finance/getAllBills.js';
  • Inclusion of getAllBillsTool in the allTools array, which is used for global tool registry, MCP registration via getToolDefinitions(), and execution via toolMap.
    // Finance tools
    getAllBillsTool,
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. It states the tool 'returns all bills by filter parameters,' implying a read-only operation, but doesn't clarify if it's safe, whether it requires authentication, if there are rate limits, or what happens with large result sets (e.g., pagination). The mention of 'filter parameters' hints at filtering but lacks details on default behavior or 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.

Conciseness4/5

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

The description is a single, efficient sentence: 'Returns all bills by filter parameters, used for retrieving billing information.' It's front-loaded with the core action and avoids unnecessary words. However, it could be slightly more structured by explicitly stating the tool's role among siblings, but it's still concise and clear.

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?

Given the complexity (6 parameters, nested objects) and lack of annotations and output schema, the description is insufficient. It doesn't explain return values, error handling, or behavioral traits like pagination (implied by 'Limitation' in schema but not described). For a tool with rich filtering options and no structured output, more context is needed to guide effective use.

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?

The input schema has 100% description coverage, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by mentioning 'filter parameters,' which aligns with the schema's properties but doesn't provide additional syntax, format, or usage details. This meets the baseline of 3 for high schema coverage.

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's purpose: 'Returns all bills by filter parameters, used for retrieving billing information.' It specifies the verb ('returns'), resource ('bills'), and scope ('by filter parameters'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'getAllPayments' or 'getAllAccountingItems', which prevents a perfect score.

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. It mentions 'used for retrieving billing information,' but this is generic and doesn't help an agent decide between this and other retrieval tools (e.g., 'getAllPayments' for payments vs. bills). There's no mention of prerequisites, exclusions, or specific contexts, leaving usage ambiguous.

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/code-rabi/mews-mcp'

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