Skip to main content
Glama

get_credit_note_pdf

Download a credit note as a PDF file using its unique ID. Returns base64-encoded PDF content for decoding and use.

Instructions

Download a credit note as PDF.

Args: credit_note_id: The credit note's GUID

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
credit_note_idYes

Implementation Reference

  • The core handler function for the 'get_credit_note_pdf' tool. It fetches the PDF from the Siigo API endpoint and returns it as a base64-encoded string.
    @mcp.tool async def get_credit_note_pdf(ctx: Context, credit_note_id: str) -> str: """Download a credit note as PDF. Args: credit_note_id: The credit note'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"/credit-notes/{credit_note_id}/pdf") return base64.b64encode(pdf_bytes).decode("utf-8")
  • Maps the tool name 'get_credit_note_pdf' to its implementation in the credit_notes module for dynamic tool loading in lazy mode.
    "get_credit_note_pdf": credit_notes.get_credit_note_pdf,
  • Metadata entry in TOOL_INDEX providing the tool's name, category, and summary description, used for tool discovery via list_siigo_tools.
    {"name": "get_credit_note_pdf", "category": "credit_notes", "summary": "Download credit note 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