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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/siigo_mcp/tools/reference.py:10-17 (handler)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")
- src/siigo_mcp/tools/discovery.py:73-73 (registration)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"},
- src/siigo_mcp/server.py:110-115 (registration)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
- src/siigo_mcp/server.py:85-102 (helper)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()