Skip to main content
Glama
Frihet-io

Frihet MCP Server

by Frihet-io

Search Invoices

search_invoices
Read-onlyIdempotent

Search and filter invoices by status, date range, and text query. Retrieve invoices matching client names or invoice content with cursor-based pagination.

Instructions

Search and filter invoices. Supports filtering by status and date range. The query parameter searches across client names and invoice content. Example: query='Acme', status='paid', from='2026-01-01', to='2026-03-31' / Busca y filtra facturas. Soporta filtrado por estado y rango de fechas. El parametro query busca en nombres de clientes y contenido de facturas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd date filter (YYYY-MM-DD) / Fecha fin
fromNoStart date filter (YYYY-MM-DD) / Fecha inicio
afterNoCursor for cursor-based pagination (document ID) / Cursor para paginacion
limitNoMax results (1-100) / Resultados maximos
queryNoSearch text (client name, etc.) / Texto de busqueda
fieldsNoComma-separated field names to return / Campos a devolver
offsetNoOffset / Desplazamiento
statusNoFilter by status / Filtrar por estado

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
limitYes
totalYes
offsetYes
nextCursorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.16.3
  2. Removedv1.15.2
  3. Changed3 schema fields changedv1.15.0
    • addedOutput schema / properties / data / items / properties / clientName / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / data / items / properties / clientName / type
      Removed value: -"string"
    • removedOutput schema / properties / data / items / required
      Removed value: -[
      -  "id",
      -  "clientName",
      -  "items"
      -]
  4. Changed10 schema fields changedv1.13.1
    • addedInput schema / properties / after
      Added value: +{
      +  "description": "Cursor for cursor-based pagination (document ID) / Cursor para paginacion",
      +  "type": "string"
      +}
    • removedInput schema / properties / clientName
      Removed value: -{
      -  "description": "Client name to search for / Nombre del cliente a buscar",
      -  "type": "string"
      -}
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Comma-separated field names to return / Campos a devolver",
      +  "type": "string"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "Start date filter (YYYY-MM-DD) / Fecha inicio",
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Max results / Resultados maximos"New value: +"Max results (1-100) / Resultados maximos"
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Search text (client name, etc.) / Texto de busqueda",
      +  "type": "string"
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "Filter by status / Filtrar por estado",
      +  "enum": [
      +    "draft",
      +    "sent",
      +    "paid",
      +    "overdue",
      +    "cancelled"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "description": "End date filter (YYYY-MM-DD) / Fecha fin",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "clientName"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "clientName": {
      +            "type": "string"
      +          },
      +          "createdAt": {
      +            "type": "string"
      +          },
      +          "dueDate": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "issueDate": {
      +            "type": "string"
      +          },
      +          "items": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "description": {
      +                  "type": "string"
      +                },
      +                "quantity": {
      +                  "type": "number"
      +                },
      +                "unitPrice": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "description",
      +                "quantity",
      +                "unitPrice"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "notes": {
      +            "type": "string"
      +          },
      +          "status": {
      +            "type": "string"
      +          },
      +          "taxRate": {
      +            "type": "number"
      +          },
      +          "total": {
      +            "type": "number"
      +          },
      +          "updatedAt": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "clientName",
      +          "items"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "limit": {
      +      "type": "number"
      +    },
      +    "nextCursor": {
      +      "type": "string"
      +    },
      +    "offset": {
      +      "type": "number"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "total",
      +    "limit",
      +    "offset"
      +  ],
      +  "type": "object"
      +}
  5. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds that it supports filtering and search across content, and gives an example. No contradictions. The description provides useful context beyond annotations.

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 concise and front-loaded with purpose. The example is helpful. The bilingual text adds length but is not excessive. Could be slightly tighter.

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 the presence of an output schema and detailed annotations, the description covers the main capabilities and provides an example. It does not explicitly mention pagination, but the schema handles that. Overall adequate for a search tool.

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?

Schema coverage is 100%, but the description adds meaning for the 'query' parameter (searches across client names and invoice content) and provides a concrete example. Other parameters are adequately described in the schema itself.

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 it searches and filters invoices, with specific capabilities like status and date range filtering, and the query parameter searches across client names and content. However, it doesn't explicitly differentiate from sibling 'list_invoices', which may cause confusion.

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

Usage Guidelines3/5

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

The description provides an example but does not specify when to use this tool vs alternatives like 'list_invoices' or 'get_invoice'. No guidance on when not to use it.

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

Deploy Server

Other Tools