Skip to main content
Glama

get_invoice_pdf

Download invoice documents as PDF files from the Siigo electronic invoicing system. Provide the invoice ID to retrieve base64-encoded PDF content for storage or sharing.

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 using get_client and returns it 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")
  • Registration of the 'get_invoice_pdf' tool in the lazy-loading tool function map used by dynamic execution.
    "get_invoice_pdf": invoices.get_invoice_pdf,
  • Tool metadata entry in the TOOL_INDEX list, providing name, category, and summary for discovery purposes.
    {"name": "get_invoice_pdf", "category": "invoices", "summary": "Download invoice as 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