Skip to main content
Glama

finance_invoice_generator

Create professional invoices in markdown format by specifying client details and line items with prices. This tool helps businesses generate clear billing documents for services rendered.

Instructions

Generate a simple invoice in markdown format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_nameYesClient/company name
itemsYesComma-separated: 'MCP Server Dev:500,Consulting:200'
currencyNoUSD

Implementation Reference

  • The handler and registration for the finance_invoice_generator tool.
    server.tool("finance_invoice_generator", "Generate a simple invoice in markdown format", {
      client_name: z.string().describe("Client/company name"),
      items: z.string().describe("Comma-separated: 'MCP Server Dev:500,Consulting:200'"),
      currency: z.string().default("USD")
    }, async ({ client_name, items, currency }) => {
      const lineItems = items.split(",").map(i => {
        const [desc, price] = i.trim().split(":");
        return { desc: desc.trim(), price: parseFloat(price) || 0 };
      });
      const total = lineItems.reduce((s, i) => s + i.price, 0);
      const rows = lineItems.map((i, idx) => [`${idx + 1}`, i.desc, formatCurrency(i.price, currency)]);
      const date = new Date().toISOString().split("T")[0];
      const invoiceNum = `INV-${Date.now().toString(36).toUpperCase()}`;
    
      return { content: [{ type: "text", text: `# INVOICE ${invoiceNum}\n\n**Date**: ${date}\n**Bill To**: ${client_name}\n**From**: Padrao Bitcoin (CNPJ: 51.148.891/0001-69)\n\n${mdTable(["#", "Description", "Amount"], rows)}\n\n**TOTAL: ${formatCurrency(total, currency)}**\n\n**Payment**: PIX 51.148.891/0001-69 | Crypto accepted\n**Due**: Net 15` }] };
    });

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/ElromEvedElElyon/claw-mcp-toolkit'

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