{
  "name": "Free Invoice Maker",
  "description": "Free invoice maker with MCP API for AI agents. 20 tools covering full invoice lifecycle: create, edit, export (14 formats), share, template management, analytics, and AI-native features (summarize, suggest, DSL). Read-only tools work without auth.",
  "version": "2.0.0",
  "mcp_endpoint": "/api/mcp",
  "stream_endpoint": "/api/mcp/stream",
  "tools_endpoint": "/api/mcp/tools?v=2",
  "documentation": "https://freeinvoicemaker.app/api-docs",
  "openapi_spec": "https://freeinvoicemaker.app/api/openapi.json",
  "health_endpoint": "https://freeinvoicemaker.app/api/health",
  "authentication": {
    "type": "bearer",
    "prefix": "iv_",
    "token_url": "/api/mcp/authorize",
    "description": "API key (iv_...) from /settings. Read-only tools work without auth. Write tools require a free account + API key.",
    "read_tools_no_auth": ["iv.capabilities", "iv.feedback", "invoices.query", "invoices.export", "invoices.summarize", "templates.query", "entities.query"]
  },
  "quickstart": "POST /api/mcp with {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"iv.capabilities\",\"params\":{}} to get full docs, examples, and tool list. No auth needed.",
  "error_format": {
    "description": "All errors return JSON-RPC 2.0: {\"jsonrpc\":\"2.0\",\"id\":N,\"error\":{\"code\":N,\"message\":\"...\",\"data\":{...}}}. Every error message tells you exactly how to fix it.",
    "codes": [
      "UNAUTHORIZED",
      "INSUFFICIENT_SCOPE",
      "FEATURE_GATED",
      "UNKNOWN_TOOL",
      "VALIDATION_ERROR",
      "NOT_FOUND",
      "INTERNAL_ERROR"
    ]
  },
  "tools_note": "Full tool schemas served at /api/mcp/tools?v=2. All 20 v2 tools listed below.",
  "tools": [
    { "name": "invoices.create", "description": "Create a complete invoice in one call with parties, items, tax, dates, template. Returns {id, number, status, share_url}. Amounts in cents.", "auth_required": true },
    { "name": "invoices.query", "description": "List or get invoices. Filter by id, status, type, client_id, date range, free-text q. Supports pagination and field selection.", "auth_required": false },
    { "name": "invoices.mutate", "description": "Update, transition status, replace/add items, duplicate, or delete an invoice.", "auth_required": true },
    { "name": "invoices.export", "description": "Export invoice to pdf, docx, xlsx, html, csv, json, ubl, zugferd, peppol, fatturapa, facturae, ksef, qif, ical.", "auth_required": false },
    { "name": "invoices.send", "description": "Send invoice via email with share link and PDF attachment.", "auth_required": true },
    { "name": "invoices.finalize", "description": "Lock an invoice. Pass undo:true to un-finalize (Stripe can't do this).", "auth_required": true },
    { "name": "invoices.duplicate", "description": "Clone an invoice with new number, today's date, draft status.", "auth_required": true },
    { "name": "invoices.summarize", "description": "AI-native: natural language summary of one or more invoices.", "auth_required": false },
    { "name": "invoices.suggest", "description": "AI-native: suggest line items, rates, template from history.", "auth_required": true },
    { "name": "invoices.createFromDsl", "description": "Create invoice from compact DSL text (~40% fewer tokens than the JSON equivalent).", "auth_required": true },
    { "name": "invoices.analytics", "description": "Revenue analytics: outstanding, paid, overdue, aging buckets, revenue by client.", "auth_required": true },
    { "name": "invoices.automate", "description": "Manage recurring rules (RFC 5545 rrule) and webhooks.", "auth_required": true },
    { "name": "templates.query", "description": "List or get templates. Add format (html/svg/pdf) with id for preview URL.", "auth_required": false },
    { "name": "templates.mutate", "description": "Create or modify templates with atomic batch operations.", "auth_required": true },
    { "name": "templates.apply", "description": "Apply a template to an invoice.", "auth_required": true },
    { "name": "entities.query", "description": "Query clients or products by id or search text.", "auth_required": false },
    { "name": "entities.mutate", "description": "Create, update, or delete clients and products.", "auth_required": true },
    { "name": "import", "description": "Import from base64 file, URL, text, or vCard. 16 formats supported.", "auth_required": true },
    { "name": "iv.capabilities", "description": "Full platform docs: quickstart, auth instructions, examples, DSL format, export/import formats, tax presets. No auth needed.", "auth_required": false },
    { "name": "iv.feedback", "description": "Submit bug reports or feature requests. No auth needed.", "auth_required": false }
  ]
}
