Skip to main content
Glama

get_invoice_pdf

Download invoice PDFs from Siigo electronic invoicing software by providing the invoice ID. Returns base64-encoded PDF content for decoding and use.

Instructions

Download an invoice as PDF.

Args: invoice_id: The invoice's GUID

Returns the PDF content as base64-encoded string. Decode with base64.b64decode() to get binary PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYes

Implementation Reference

  • The main handler function for the 'get_invoice_pdf' tool. It fetches the invoice PDF from the Siigo API endpoint and returns the content as a base64-encoded string.
    @mcp.tool async def get_invoice_pdf(ctx: Context, invoice_id: str) -> str: """Download an invoice as PDF. Args: invoice_id: The invoice's GUID Returns the PDF content as base64-encoded string. Decode with base64.b64decode() to get binary PDF. """ pdf_bytes = await get_client(ctx).get_pdf(f"/invoices/{invoice_id}/pdf") return base64.b64encode(pdf_bytes).decode("utf-8")
  • Schema/description entry for 'get_invoice_pdf' in the TOOL_INDEX list used for tool discovery in lazy-loading mode.
    {"name": "get_invoice_pdf", "category": "invoices", "summary": "Download invoice as PDF"},
  • Registration of the 'get_invoice_pdf' tool function in the lazy-loaded _tool_functions dictionary.
    "get_invoice_pdf": invoices.get_invoice_pdf,

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/dsfaccini/siigo-mcp'

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