Skip to main content
Glama

get_taxes

Retrieve configured tax information from Siigo to apply correct tax IDs when creating invoices or products in Colombian electronic invoicing.

Instructions

Get all configured taxes in the Siigo account.

Returns a list of taxes with their IDs, names, and percentages. Use these tax IDs when creating invoices or products.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_taxes' tool, decorated with @mcp.tool. It retrieves all configured taxes from the Siigo API endpoint "/taxes" using the authenticated client.
    @mcp.tool async def get_taxes(ctx: Context) -> list[dict[str, Any]]: """Get all configured taxes in the Siigo account. Returns a list of taxes with their IDs, names, and percentages. Use these tax IDs when creating invoices or products. """ return await get_client(ctx).get("/taxes")
  • Registration mapping for 'get_taxes' in the lazy/dynamic tool execution system, linking the tool name to the actual function reference.get_taxes.
    "get_taxes": reference.get_taxes,
  • Tool discovery index entry (schema metadata) defining the 'get_taxes' tool's name, category ('reference'), and one-line summary.
    {"name": "get_taxes", "category": "reference", "summary": "Get all configured taxes"},
  • Import of the 'reference' module in server.py (non-lazy mode), which triggers auto-registration of the 'get_taxes' tool via its @mcp.tool decorator.
    from siigo_mcp.tools import reference # noqa: E402, F401 from siigo_mcp.tools import customers # noqa: E402, F401 from siigo_mcp.tools import products # noqa: E402, F401 from siigo_mcp.tools import invoices # noqa: E402, F401 from siigo_mcp.tools import credit_notes # noqa: E402, F401 from siigo_mcp.tools import journals # noqa: E402, F401
  • Helper function get_client(ctx) used by the get_taxes handler to obtain an authenticated SiigoClient instance for API calls.
    def get_client(ctx: Context) -> SiigoClient: """Get Siigo client - from headers (HTTP mode) or env vars (stdio mode).""" if _transport == "http": if not ctx.request_context: raise ValueError("No request context available in HTTP mode") headers = ctx.request_context.request.headers username = headers.get("x-siigo-username") access_key = headers.get("x-siigo-access-key") partner_id = headers.get("x-siigo-partner-id") if not all([username, access_key, partner_id]): raise ValueError( "Missing required headers: x-siigo-username, x-siigo-access-key, x-siigo-partner-id" ) client_class = _get_client_class() return client_class(username=username, access_key=access_key, partner_id=partner_id) return _get_global_client()

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